diff --git a/matlab/ms-sbvar/ms_estimation.m b/matlab/ms-sbvar/ms_estimation.m index eb28f94340ebf4d3244a7af8135a6c74ffb33091..6d5eec32d704d61ff4de834515ab2cd9701788dc 100644 --- a/matlab/ms-sbvar/ms_estimation.m +++ b/matlab/ms-sbvar/ms_estimation.m @@ -41,6 +41,12 @@ if options_.ms.create_init clean_ms_estimation_files(options_.ms.file_tag); clean_ms_estimation_files(options_.ms.output_file_tag); else + if exist(['init_' options_.ms.file_tag '.dat'],'file') ~= 2 || ... + exist(['matlab_' options_.ms.file_tag '.prn'],'file') ~= 2 || ... + exist([options_.ms.file_tag '_markov_file.dat'],'file') ~= 2 + error(['You must run ms_estimation without no_create_init as '... + 'you are missing an initialization file it needs.']); + end if ~strcmp(options_.ms.file_tag, options_.ms.output_file_tag) clean_ms_estimation_files(options_.ms.output_file_tag); end diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy index 33da47b0dbb5bb816214d7736ff9004d95c2766e..89643f9df5d015d2ef64d390326b3a171a002368 100644 --- a/preprocessor/DynareBison.yy +++ b/preprocessor/DynareBison.yy @@ -2518,7 +2518,7 @@ o_cova_compute : COVA_COMPUTE EQUAL INT_NUMBER ; o_output_file_tag : OUTPUT_FILE_TAG EQUAL filename {driver.option_str("ms.output_file_tag", $3); }; o_file_tag : FILE_TAG EQUAL filename { driver.option_str("ms.file_tag", $3); }; -o_no_create_init : NO_CREATE_INIT { driver.option_str("ms.create_init", "0"); }; +o_no_create_init : NO_CREATE_INIT { driver.option_num("ms.create_init", "0"); }; o_simulation_file_tag : SIMULATION_FILE_TAG EQUAL filename { driver.option_str("ms.simulation_file_tag", $3); }; o_coefficients_prior_hyperparameters : COEFFICIENTS_PRIOR_HYPERPARAMETERS EQUAL vec_value { driver.option_num("ms.coefficients_prior_hyperparameters",$3); };