diff --git a/doc/manual/source/running-dynare.rst b/doc/manual/source/running-dynare.rst index 60469e61d..824d9f826 100644 --- a/doc/manual/source/running-dynare.rst +++ b/doc/manual/source/running-dynare.rst @@ -548,7 +548,8 @@ by the ``dynare`` command. results in the workspace available for further processing. More details are given under the relevant computing tasks. The ``M_``,``oo_``, and ``options_`` structures are saved in a file - called ``FILENAME_results.mat``. If they exist, ``estim_params_``, + called ``FILENAME_results.mat`` located in the ``MODFILENAME/Output`` folder. + If they exist, ``estim_params_``, ``bayestopt_``, ``dataset_``, ``oo_recursive_`` and ``estimation_info`` are saved in the same file. Note that Matlab by default only allows ``.mat``-files up to 2GB. You can lift this diff --git a/doc/manual/source/the-model-file.rst b/doc/manual/source/the-model-file.rst index fa0e2c066..fcc42707b 100644 --- a/doc/manual/source/the-model-file.rst +++ b/doc/manual/source/the-model-file.rst @@ -3890,7 +3890,8 @@ Computing the stochastic solution requested (i.e. ``periods`` :math:`>` 0). Note that if this option is greater than 1, the additional series will not be used for computing the empirical moments but will simply be - saved in binary form to the file ``FILENAME_simul``. Default: + saved in binary form to the file ``FILENAME_simul`` in the + ``FILENAME/Output``-folder. Default: ``1``. .. option:: solve_algo = INTEGER @@ -5297,7 +5298,8 @@ block decomposition of the model (see :opt:`block`). achieve an acceptance rate of :ref:`AcceptanceRateTarget`. The resulting scale parameter will be saved into a file named - ``MODEL_FILENAME_mh_scale.mat.`` This file can be loaded in + ``MODEL_FILENAME_mh_scale.mat`` in the ``FILENAME/Output``-folder. + This file can be loaded in subsequent runs via the ``posterior_sampler_options`` option :ref:`scale_file `. Both ``mode_compute=6`` and ``scale_file`` will overwrite any value specified in @@ -5378,7 +5380,8 @@ block decomposition of the model (see :opt:`block`). Name of the file containing previous value for the mode. When computing the mode, Dynare stores the mode (``xparam1``) and the hessian (``hh``, only if ``cova_compute=1``) in a file - called ``MODEL_FILENAME_mode.mat``. After a successful run of + called ``MODEL_FILENAME_mode.mat`` in the ``FILENAME/Output``-folder. + After a successful run of the estimation command, the ``mode_file`` will be disabled to prevent other function calls from implicitly using an updated ``mode-file``. Thus, if the mod-file contains subsequent diff --git a/matlab/compute_mh_covariance_matrix.m b/matlab/compute_mh_covariance_matrix.m index ffd0b218e..662d7b25a 100644 --- a/matlab/compute_mh_covariance_matrix.m +++ b/matlab/compute_mh_covariance_matrix.m @@ -78,4 +78,4 @@ hh = inv(posterior_covariance); fval = posterior_kernel_at_the_mode; parameter_names = bayestopt_.name; -save([M_.fname '_mh_mode.mat'],'xparam1','hh','fval','parameter_names'); \ No newline at end of file +save([M_.dname filesep 'Output' filesep M_.fname '_mh_mode.mat'],'xparam1','hh','fval','parameter_names'); \ No newline at end of file diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m index 073929ee1..a790d8a87 100644 --- a/matlab/dynare_estimation.m +++ b/matlab/dynare_estimation.m @@ -101,7 +101,7 @@ if nnobs>1 || nfirstobs > 1 end dynare_estimation_1(var_list,M_.dname); if isequal(i,1) && options_.mode_compute ~= 0 - options_.mode_file = [M_.fname '_mode']; + options_.mode_file = [M_.dname filesep 'Output' filesep M_.fname '_mode']; end if options_.recursive_estimation_restart for j=1:options_.recursive_estimation_restart diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index ee51830f9..311f283be 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -31,6 +31,10 @@ function dynare_estimation_1(var_list_,dname) global M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info +if ~exist([M_.dname filesep 'Output'],'dir') + mkdir(M_.dname,'Output'); +end + if isempty(estim_params_) mode_compute_o = options_.mode_compute; mh_replic_o = options_.mh_replic; @@ -206,7 +210,7 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation newratflag = new_rat_hess_info.newratflag; new_rat_hess_info = new_rat_hess_info.new_rat_hess_info; elseif isnumeric(options_.mode_compute) && options_.mode_compute==6 %save scaling factor - save([M_.fname '_optimal_mh_scale_parameter.mat'],'Scale'); + save([M_.dname filesep 'Output' filesep M_.fname '_optimal_mh_scale_parameter.mat'],'Scale'); options_.mh_jscale = Scale; bayestopt_.jscale(:) = options_.mh_jscale; end @@ -260,9 +264,9 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation end parameter_names = bayestopt_.name; if options_.cova_compute || options_.mode_compute==5 || options_.mode_compute==6 - save([M_.fname '_mode.mat'],'xparam1','hh','parameter_names','fval'); + save([M_.dname filesep 'Output' filesep M_.fname '_mode.mat'],'xparam1','hh','parameter_names','fval'); else - save([M_.fname '_mode.mat'],'xparam1','parameter_names','fval'); + save([M_.dname filesep 'Output' filesep M_.fname '_mode.mat'],'xparam1','parameter_names','fval'); end end @@ -375,7 +379,7 @@ end if np > 0 pindx = estim_params_.param_vals(:,1); - save([M_.fname '_params.mat'],'pindx'); + save([M_.dname filesep 'Output' filesep M_.fname '_params.mat'],'pindx'); end switch options_.MCMC_jumping_covariance @@ -472,7 +476,7 @@ if (any(bayestopt_.pshape >0 ) && options_.mh_replic) || ... else %get stored results if required if options_.load_mh_file && options_.load_results_after_load_mh - oo_load_mh=load([M_.fname '_results'],'oo_'); + oo_load_mh=load([M_.dname filesep 'Output' filesep M_.fname '_results'],'oo_'); end if ~options_.nodiagnostic if (options_.mh_replic>0 || (options_.load_mh_file && ~options_.load_results_after_load_mh)) @@ -778,7 +782,7 @@ end if np > 0 pindx = estim_params_.param_vals(:,1); - save([M_.fname '_pindx.mat'] ,'pindx'); + save([M_.dname filesep 'Output' filesep M_.fname '_pindx.mat'] ,'pindx'); end %reset qz_criterium diff --git a/matlab/gsa/filt_mc_.m b/matlab/gsa/filt_mc_.m index d15c6789d..74b7c0fe1 100644 --- a/matlab/gsa/filt_mc_.m +++ b/matlab/gsa/filt_mc_.m @@ -92,11 +92,11 @@ if ~isempty(options_.mode_file) load(options_.mode_file,'xparam1') end if options_.opt_gsa.ppost - c=load([fname_,'_mean.mat'],'xparam1'); + c=load([M_.dname filesep 'Output' filesep fname_,'_mean.mat'],'xparam1'); xparam1_mean=c.xparam1; clear c -elseif ~isempty(options_.mode_file) && exist([fname_,'_mean.mat'])==2 - c=load([fname_,'_mean.mat'],'xparam1'); +elseif ~isempty(options_.mode_file) && exist([M_.dname filesep 'Output' filesep fname_,'_mean.mat'])==2 + c=load([M_.dname filesep 'Output' filesep fname_,'_mean.mat'],'xparam1'); xparam1_mean=c.xparam1; clear c end diff --git a/matlab/marginal_density.m b/matlab/marginal_density.m index 995df30a8..bd10e86ea 100644 --- a/matlab/marginal_density.m +++ b/matlab/marginal_density.m @@ -66,7 +66,7 @@ end % (usefull if the user wants to perform some computations using % the posterior mean instead of the posterior mode ==> ). parameter_names = bayestopt_.name; -save([M_.fname '_mean.mat'],'xparam1','hh','parameter_names','SIGMA'); +save([M_.dname filesep 'Output' filesep M_.fname '_mean.mat'],'xparam1','hh','parameter_names','SIGMA'); fprintf('Estimation::marginal density: I''m computing the posterior log marginal density (modified harmonic mean)... '); logdetSIGMA = log(det(SIGMA)); diff --git a/matlab/model_comparison.m b/matlab/model_comparison.m index f49320adf..302bda814 100644 --- a/matlab/model_comparison.m +++ b/matlab/model_comparison.m @@ -81,9 +81,9 @@ for i=1:NumberOfModels mstruct.oo_ = oo; else if strcmpi(ModelNames{i}(end-3:end),'.mod') || strcmpi(ModelNames{i}(end-3:end),'.dyn') - mstruct = load([ModelNames{i}(1:end-4) '_results.mat' ],'oo_'); + mstruct = load([ModelNames{i}(1:end-4) filesep 'Output' ModelNames{i}(1:end-4) '_results.mat' ],'oo_'); else - mstruct = load([ModelNames{i} '_results.mat' ],'oo_'); + mstruct = load([ModelNames{i} filesep 'Output' filesep ModelNames{i} '_results.mat' ],'oo_'); end end try diff --git a/matlab/partial_information/dr1_PI.m b/matlab/partial_information/dr1_PI.m index a8cbc93d9..dfafa44a0 100644 --- a/matlab/partial_information/dr1_PI.m +++ b/matlab/partial_information/dr1_PI.m @@ -154,7 +154,7 @@ else end if options_.debug - save([M_.fname '_debug.mat'],'jacobia_') + save([M_.dname filesep 'Output' filesep M_.fname '_debug.mat'],'jacobia_') end dr=set_state_space(dr,M_,options_); diff --git a/matlab/simult.m b/matlab/simult.m index c03fb78db..caeae45c4 100644 --- a/matlab/simult.m +++ b/matlab/simult.m @@ -66,7 +66,7 @@ order = DynareOptions.order; replic = DynareOptions.simul_replic; if replic > 1 - fname = [DynareModel.fname,'_simul']; + fname = [DynareModel.dname filesep 'Output' DynareModel.fname,'_simul']; fh = fopen(fname,'w+'); end diff --git a/matlab/stochastic_solvers.m b/matlab/stochastic_solvers.m index 3b8d770fc..4e0448568 100644 --- a/matlab/stochastic_solvers.m +++ b/matlab/stochastic_solvers.m @@ -128,7 +128,7 @@ elseif local_order == 2 if ~isempty(infrow) fprintf('\nSTOCHASTIC_SOLVER: The Hessian of the dynamic model contains Inf.\n') fprintf('STOCHASTIC_SOLVER: Try running model_diagnostics to find the source of the problem.\n') - save([M_.fname '_debug.mat'],'hessian1') + save([M_.dname filesep 'Output' filesep M_.fname '_debug.mat'],'hessian1') end end if ~isempty(infrow) @@ -140,7 +140,7 @@ elseif local_order == 2 if ~isempty(nanrow) fprintf('\nSTOCHASTIC_SOLVER: The Hessian of the dynamic model contains NaN.\n') fprintf('STOCHASTIC_SOLVER: Try running model_diagnostics to find the source of the problem.\n') - save([M_.fname '_debug.mat'],'hessian1') + save([M_.dname filesep 'Output' filesep M_.fname '_debug.mat'],'hessian1') end end if ~isempty(nanrow) @@ -155,7 +155,7 @@ if options_.debug if ~isempty(infrow) fprintf('\nSTOCHASTIC_SOLVER: The Jacobian of the dynamic model contains Inf. The problem is associated with:\n\n') display_problematic_vars_Jacobian(infrow,infcol,M_,dr.ys,'dynamic','STOCHASTIC_SOLVER: ') - save([M_.fname '_debug.mat'],'jacobia_') + save([M_.dname filesep 'Output' filesep M_.fname '_debug.mat'],'jacobia_') end end @@ -184,7 +184,7 @@ if options_.debug if ~isempty(nanrow) fprintf('\nSTOCHASTIC_SOLVER: The Jacobian of the dynamic model contains NaN. The problem is associated with:\n\n') display_problematic_vars_Jacobian(nanrow,nancol,M_,dr.ys,'dynamic','STOCHASTIC_SOLVER: ') - save([M_.fname '_debug.mat'],'jacobia_') + save([M_.dname filesep 'Output' filesep M_.fname '_debug.mat'],'jacobia_') end end diff --git a/preprocessor b/preprocessor index 5cfe6303e..bb19d9871 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit 5cfe6303e26fcaeff204e6d2ca3988b169621f46 +Subproject commit bb19d98712f2599380dfc704f98b33531d7414de diff --git a/tests/AIM/fs2000_b1L1L_AIM.mod b/tests/AIM/fs2000_b1L1L_AIM.mod index 71a0ec1ad..ffd5d5bb0 100644 --- a/tests/AIM/fs2000_b1L1L_AIM.mod +++ b/tests/AIM/fs2000_b1L1L_AIM.mod @@ -92,7 +92,7 @@ steady(nocheck); stoch_simul(aim_solver, order=1, irf=0); -benchmark = load('fs2000_b1L1L_results'); +benchmark = load(['fs2000_b1L1L' filesep 'Output' filesep 'fs2000_b1L1L_results']); threshold = 1e-8; if max(max(abs(benchmark.oo_.dr.ghx-oo_.dr.ghx) > threshold)); diff --git a/tests/AIM/fs2000x10L9_L_AIM.mod b/tests/AIM/fs2000x10L9_L_AIM.mod index e651ff93d..e52b2db37 100644 --- a/tests/AIM/fs2000x10L9_L_AIM.mod +++ b/tests/AIM/fs2000x10L9_L_AIM.mod @@ -76,7 +76,7 @@ check; stoch_simul(aim_solver, order=1,irf=0); -benchmark = load('fs2000x10L9_L_results'); +benchmark = load(['fs2000x10L9_L' filesep 'Output' filesep 'fs2000x10L9_L_results']); threshold = 1e-8; if max(max(abs(benchmark.oo_.dr.ghx-oo_.dr.ghx) > threshold)); diff --git a/tests/AIM/fs2000x10_L9_L_AIM.mod b/tests/AIM/fs2000x10_L9_L_AIM.mod index fa80630c0..92c5c2179 100644 --- a/tests/AIM/fs2000x10_L9_L_AIM.mod +++ b/tests/AIM/fs2000x10_L9_L_AIM.mod @@ -57,7 +57,7 @@ steady; stoch_simul(aim_solver, order=1,irf=0); -benchmark = load('fs2000x10_L9_L_results'); +benchmark = load(['fs2000x10_L9_L' filesep 'Output' filesep 'fs2000x10_L9_L_results']); threshold = 1e-8; if max(max(abs(benchmark.oo_.dr.ghx-oo_.dr.ghx) > threshold)); diff --git a/tests/AIM/ls2003_2L0L_AIM.mod b/tests/AIM/ls2003_2L0L_AIM.mod index 8ff90c3e5..175b85242 100644 --- a/tests/AIM/ls2003_2L0L_AIM.mod +++ b/tests/AIM/ls2003_2L0L_AIM.mod @@ -45,7 +45,7 @@ end; stoch_simul(aim_solver, order=1,irf=0); -benchmark = load('ls2003_2L0L_results'); +benchmark = load(['ls2003_2L0L' filesep 'Output' filesep 'ls2003_2L0L_results']); threshold = 1e-8; if max(max(abs(benchmark.oo_.dr.ghx-oo_.dr.ghx) > threshold)); diff --git a/tests/AIM/ls2003_2L2L_AIM.mod b/tests/AIM/ls2003_2L2L_AIM.mod index 11f60720d..0fcef43ff 100644 --- a/tests/AIM/ls2003_2L2L_AIM.mod +++ b/tests/AIM/ls2003_2L2L_AIM.mod @@ -43,7 +43,7 @@ end; stoch_simul(aim_solver, order=1,irf=0); -benchmark = load('ls2003_2L2L_results'); +benchmark = load(['ls2003_2L2L' filesep 'Output' filesep 'ls2003_2L2L_results']); threshold = 1e-8; if max(max(abs(benchmark.oo_.dr.ghx-oo_.dr.ghx) > threshold)); diff --git a/tests/Makefile.am b/tests/Makefile.am index aa84d1cf0..5f981419e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1412,13 +1412,6 @@ clean-local: rm -f $(patsubst %.trs, %.json, $(O_TRS_FILES)) rm -f $(patsubst %.trs, %.json, $(O_XFAIL_TRS_FILES)) - rm -f $(patsubst %.mod, %_results.mat, $(MODFILES)) - rm -f $(patsubst %.mod, %_mode.mat, $(MODFILES)) - rm -f $(patsubst %.mod, %_mh_mode.mat, $(MODFILES)) - rm -f $(patsubst %.mod, %_mean.mat, $(MODFILES)) - rm -f $(patsubst %.mod, %_pindx.mat, $(MODFILES)) - rm -f $(patsubst %.mod, %_params.mat, $(MODFILES)) - rm -f $(patsubst %.mod, %_simul, $(MODFILES)) rm -f $(patsubst %.mod, %.log, $(MODFILES)) rm -rf $(patsubst %.mod, %, $(MODFILES)) diff --git a/tests/analytic_derivatives/fs2000_analytic_derivation.mod b/tests/analytic_derivatives/fs2000_analytic_derivation.mod index 677b0f2e1..c74af9d65 100644 --- a/tests/analytic_derivatives/fs2000_analytic_derivation.mod +++ b/tests/analytic_derivatives/fs2000_analytic_derivation.mod @@ -78,22 +78,22 @@ options_.solve_tolf = 1e-12; estimation(order=1,mode_compute=9,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0,prior_trunc=0); if (isoctave && user_has_octave_forge_package('optim', '1.6')) || (~isoctave && user_has_matlab_license('optimization_toolbox')) - estimation(order=1,mode_compute=1,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0 + estimation(order=1,mode_compute=1,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0 %,optim = ('DerivativeCheck', 'on','FiniteDifferenceType','central') ); - estimation(order=1,mode_compute=3,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); - estimation(order=1,mode_compute=101,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); + estimation(order=1,mode_compute=3,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); + estimation(order=1,mode_compute=101,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); end -estimation(order=1,mode_compute=5,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); -estimation(order=1,mode_compute=4,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); -estimation(order=1,mode_compute=4,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); +estimation(order=1,mode_compute=5,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); +estimation(order=1,mode_compute=4,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); +estimation(order=1,mode_compute=4,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); options_.debug=1; -estimation(order=1,mode_compute=0,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); +estimation(order=1,mode_compute=0,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); fval_ML_1=oo_.likelihood_at_initial_parameters; -estimation(order=1,mode_compute=0,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); +estimation(order=1,mode_compute=0,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); fval_ML_2=oo_.likelihood_at_initial_parameters; options_.analytic_derivation=0; -estimation(order=1,mode_compute=0,mode_file=fs2000_analytic_derivation_mode,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); +estimation(order=1,mode_compute=0,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); fval_ML_3=oo_.likelihood_at_initial_parameters; if abs(fval_ML_1-fval_ML_2)>1e-5 || abs(fval_ML_1-fval_ML_3)>1e-5 @@ -111,22 +111,22 @@ end; estimation(order=1,mode_compute=9,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0,prior_trunc=0); if (isoctave && user_has_octave_forge_package('optim', '1.6')) || (~isoctave && user_has_matlab_license('optimization_toolbox')) - estimation(order=1,mode_compute=1,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0 + estimation(order=1,mode_compute=1,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0 %,optim = ('DerivativeCheck', 'on','FiniteDifferenceType','central') ); - estimation(order=1,mode_compute=3,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); - estimation(order=1,mode_compute=101,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); + estimation(order=1,mode_compute=3,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); + estimation(order=1,mode_compute=101,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); end -estimation(order=1,mode_compute=5,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); -estimation(order=1,mode_compute=4,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); -estimation(order=1,mode_compute=4,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); +estimation(order=1,mode_compute=5,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); +estimation(order=1,mode_compute=4,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); +estimation(order=1,mode_compute=4,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,mh_nblocks=2,mh_jscale=0.8,plot_priors=0); options_.debug=1; -estimation(order=1,mode_compute=0,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); +estimation(order=1,mode_compute=0,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); fval_Bayes_1=oo_.likelihood_at_initial_parameters; -estimation(order=1,mode_compute=0,mode_file=fs2000_analytic_derivation_mode,analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); +estimation(order=1,mode_compute=0,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',analytic_derivation,kalman_algo=2,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); fval_Bayes_2=oo_.likelihood_at_initial_parameters; options_.analytic_derivation=0; -estimation(order=1,mode_compute=0,mode_file=fs2000_analytic_derivation_mode,kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); +estimation(order=1,mode_compute=0,mode_file='fs2000_analytic_derivation/Output/fs2000_analytic_derivation_mode',kalman_algo=1,datafile=my_data,nobs=192,mh_replic=0,plot_priors=0); fval_Bayes_3=oo_.likelihood_at_initial_parameters; if abs(fval_Bayes_1-fval_Bayes_2)>1e-5 || abs(fval_Bayes_1-fval_Bayes_3)>1e-5 diff --git a/tests/block_bytecode/lola_solve_one_boundary_mfs1.mod b/tests/block_bytecode/lola_solve_one_boundary_mfs1.mod index 553171257..64ff378bf 100644 --- a/tests/block_bytecode/lola_solve_one_boundary_mfs1.mod +++ b/tests/block_bytecode/lola_solve_one_boundary_mfs1.mod @@ -5,7 +5,7 @@ @#define mfs = 1 @#include "lola_common.inc" -mfs0=load('lola_solve_one_boundary_results'); +mfs0=load(['lola_solve_one_boundary' filesep 'Output' filesep 'lola_solve_one_boundary_results']); if max(max(oo_.endo_simul-mfs0.oo_.endo_simul)) > options_.dynatol.x error('Inconsistency with mfs=0') diff --git a/tests/block_bytecode/lola_solve_one_boundary_mfs2.mod b/tests/block_bytecode/lola_solve_one_boundary_mfs2.mod index f582ecc84..db5d379d5 100644 --- a/tests/block_bytecode/lola_solve_one_boundary_mfs2.mod +++ b/tests/block_bytecode/lola_solve_one_boundary_mfs2.mod @@ -5,7 +5,7 @@ @#define mfs = 2 @#include "lola_common.inc" -mfs0=load('lola_solve_one_boundary_results'); +mfs0=load(['lola_solve_one_boundary' filesep 'Output' filesep 'lola_solve_one_boundary_results']); if max(max(oo_.endo_simul-mfs0.oo_.endo_simul)) > options_.dynatol.x error('Inconsistency with mfs=0') diff --git a/tests/block_bytecode/lola_solve_one_boundary_mfs3.mod b/tests/block_bytecode/lola_solve_one_boundary_mfs3.mod index 3eb2dc9f0..16b227463 100644 --- a/tests/block_bytecode/lola_solve_one_boundary_mfs3.mod +++ b/tests/block_bytecode/lola_solve_one_boundary_mfs3.mod @@ -5,7 +5,7 @@ @#define mfs = 3 @#include "lola_common.inc" -mfs0=load('lola_solve_one_boundary_results'); +mfs0=load(['lola_solve_one_boundary' filesep 'Output' filesep 'lola_solve_one_boundary_results']); if max(max(oo_.endo_simul-mfs0.oo_.endo_simul)) > options_.dynatol.x error('Inconsistency with mfs=0') diff --git a/tests/block_bytecode/lola_stochastic_block.mod b/tests/block_bytecode/lola_stochastic_block.mod index 5f6fff6b8..954ecd462 100644 --- a/tests/block_bytecode/lola_stochastic_block.mod +++ b/tests/block_bytecode/lola_stochastic_block.mod @@ -8,7 +8,7 @@ [~, state_reorder] = sort(oo_.dr.state_var); -ref = load('lola_stochastic_results.mat'); +ref = load(['lola_stochastic' filesep 'Output' filesep 'lola_stochastic_results.mat']); [~, ref_state_reorder] = sort(ref.oo_.dr.state_var); diff --git a/tests/deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.mod b/tests/deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.mod index 52aa9de85..fb362e0dc 100644 --- a/tests/deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.mod +++ b/tests/deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.mod @@ -70,7 +70,7 @@ if max(abs(junk(M_.maximum_lag+1:end)-oo_.endo_simul(strmatch('y_backward',M_.en error('Solution of purely backwards model not correct') end -ramst_results=load('../../ramst_results.mat'); +ramst_results=load('../../ramst/Output/ramst_results.mat'); if max(abs(ramst_results.oo_.endo_simul(strmatch('k',ramst_results.M_.endo_names,'exact'),1:end-M_.maximum_lead)-oo_.endo_simul(strmatch('k',M_.endo_names,'exact'),1:end-M_.maximum_lead)))>1e-10 error('Solution of forward part of the model not correct') end diff --git a/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod b/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod index bf21b6149..eedbad702 100644 --- a/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod +++ b/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod @@ -44,7 +44,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed') end -base_results=load('sim_base_results.mat'); +base_results=load(['sim_base' filesep 'Output' filesep 'sim_base_results.mat']); if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... oo_.endo_simul(strmatch('c',M_.endo_names,'exact'),1+M_.maximum_endo_lag:end-M_.maximum_endo_lead)))>1e-8 || ... max(abs(base_results.oo_.endo_simul(strmatch('k',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... @@ -58,7 +58,7 @@ if max(abs(base_results.oo_.exo_simul(1:end-base_results.M_.maximum_lead-base_re end clear base_results; -base_results_aux_vars=load('sim_endo_lead_lag_aux_vars_results.mat'); +base_results_aux_vars=load(['sim_exo_lead_lag_aux_vars' filesep 'Output' filesep 'sim_exo_lead_lag_aux_vars_results.mat']); if max(abs(base_results_aux_vars.oo_.endo_simul(strmatch('z_backward_lag_2',base_results_aux_vars.M_.endo_names,'exact'),1:end-base_results_aux_vars.M_.maximum_lead) -... oo_.endo_simul(strmatch('AUX_ENDO_LAG_2_2',M_.endo_names,'exact'),1:end-M_.maximum_lag)))>1e-8 error('Translation of endogenous variables is wrong') diff --git a/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag_aux_vars.mod b/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag_aux_vars.mod index 9c5a26f4d..d291d9181 100644 --- a/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag_aux_vars.mod +++ b/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag_aux_vars.mod @@ -47,7 +47,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed') end -base_results=load('sim_base_results.mat'); +base_results=load(['sim_base' filesep 'Output' filesep 'sim_base_results.mat']); if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... oo_.endo_simul(strmatch('c',M_.endo_names,'exact'),1+M_.maximum_endo_lag:end-M_.maximum_endo_lead)))>1e-8 || ... max(abs(base_results.oo_.endo_simul(strmatch('k',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... diff --git a/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag.mod b/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag.mod index fa0c3d384..d84479a45 100644 --- a/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag.mod +++ b/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag.mod @@ -42,7 +42,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed') end -base_results=load('sim_base_results.mat'); +base_results=load(['sim_base' filesep 'Output' filesep 'sim_base_results.mat']); if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... oo_.endo_simul(strmatch('c',M_.endo_names,'exact'),1+M_.maximum_lag:end-M_.maximum_lead)))>1e-8 || ... max(abs(base_results.oo_.endo_simul(strmatch('k',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... @@ -51,7 +51,7 @@ if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,' end clear base_results -base_results_aux_vars=load('sim_exo_lead_lag_aux_vars_results.mat'); +base_results_aux_vars=load(['sim_exo_lead_lag_aux_vars' filesep 'Output' filesep 'sim_exo_lead_lag_aux_vars_results.mat']); if max(abs(base_results_aux_vars.oo_.endo_simul(strmatch('x_lag_3',base_results_aux_vars.M_.endo_names,'exact'),base_results_aux_vars.M_.maximum_lag+3:end-base_results_aux_vars.M_.maximum_lead)' -... oo_.exo_simul(M_.maximum_lag:end-M_.maximum_lead-3,strmatch('x', M_.exo_names, 'exact'))))>1e-8 diff --git a/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag_aux_vars.mod b/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag_aux_vars.mod index 0cf9342ae..113812b5d 100644 --- a/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag_aux_vars.mod +++ b/tests/deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag_aux_vars.mod @@ -47,7 +47,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed') end -base_results=load('sim_base_results.mat'); +base_results=load(['sim_base' filesep 'Output' filesep 'sim_base_results.mat']); if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... oo_.endo_simul(strmatch('c',M_.endo_names,'exact'),1+M_.maximum_endo_lag:end-M_.maximum_endo_lead)))>1e-8 || ... max(abs(base_results.oo_.endo_simul(strmatch('k',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... diff --git a/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag.mod b/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag.mod index d39ce7c7b..818740545 100644 --- a/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag.mod +++ b/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag.mod @@ -46,7 +46,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed') end -base_results=load('sim_base_results.mat'); +base_results=load(['sim_base' filesep 'Output' filesep 'sim_base_results.mat']); if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... oo_.endo_simul(strmatch('c',M_.endo_names,'exact'),1+M_.maximum_lag:end-M_.maximum_lead)))>1e-8 || ... max(abs(base_results.oo_.endo_simul(strmatch('k',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... @@ -55,7 +55,7 @@ if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,' end clear base_results -base_results_aux_vars=load('sim_lead_lag_aux_vars_results.mat'); +base_results_aux_vars=load(['sim_exo_lead_lag_aux_vars' filesep 'Output' filesep 'sim_exo_lead_lag_aux_vars_results.mat']); if max(abs(base_results_aux_vars.oo_.endo_simul(strmatch('x_lag_3',base_results_aux_vars.M_.endo_names,'exact'),base_results_aux_vars.M_.maximum_lag+3:end-base_results_aux_vars.M_.maximum_lead)' -... oo_.exo_simul(M_.maximum_lag:end-M_.maximum_lead-3,strmatch('x', M_.exo_names, 'exact'))))>1e-8 diff --git a/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag_aux_vars.mod b/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag_aux_vars.mod index a09c0d0e6..b35cacd45 100644 --- a/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag_aux_vars.mod +++ b/tests/deterministic_simulations/multiple_lead_lags/sim_lead_lag_aux_vars.mod @@ -57,7 +57,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed') end -base_results=load('sim_base_results.mat'); +base_results=load(['sim_base' filesep 'Output' filesep 'sim_base_results.mat']); if max(abs(base_results.oo_.endo_simul(strmatch('c',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... oo_.endo_simul(strmatch('c',M_.endo_names,'exact'),1+M_.maximum_endo_lag:end-M_.maximum_endo_lead)))>1e-8 || ... max(abs(base_results.oo_.endo_simul(strmatch('k',base_results.M_.endo_names,'exact'),1+base_results.M_.maximum_endo_lag:end-base_results.M_.maximum_endo_lead) -... diff --git a/tests/deterministic_simulations/rbc_det_exo_lag_2b.mod b/tests/deterministic_simulations/rbc_det_exo_lag_2b.mod index 8965fc18f..60e7e7cc5 100644 --- a/tests/deterministic_simulations/rbc_det_exo_lag_2b.mod +++ b/tests/deterministic_simulations/rbc_det_exo_lag_2b.mod @@ -79,6 +79,6 @@ end rplot Consumption; rplot Capital; -O=load('rbc_det_exo_lag_2a_results'); +O=load(['rbc_det_exo_lag_2a' filesep 'Output' filesep 'rbc_det_exo_lag_2a_results']); fataltest(oo_.endo_simul(1:M_.orig_endo_nbr,:),O.oo_.endo_simul(1:O.M_.orig_endo_nbr,:),1); diff --git a/tests/deterministic_simulations/rbc_det_exo_lag_2c.mod b/tests/deterministic_simulations/rbc_det_exo_lag_2c.mod index a1b5c2ae0..75e44854c 100644 --- a/tests/deterministic_simulations/rbc_det_exo_lag_2c.mod +++ b/tests/deterministic_simulations/rbc_det_exo_lag_2c.mod @@ -79,6 +79,6 @@ end rplot Consumption; rplot Capital; -O=load('rbc_det_exo_lag_2a_results'); +O=load(['rbc_det_exo_lag_2a' filesep 'Output' filesep 'rbc_det_exo_lag_2a_results']); fataltest(oo_.endo_simul(1:M_.orig_endo_nbr,:),O.oo_.endo_simul(1:O.M_.orig_endo_nbr,:),1); diff --git a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod index a4c829ffb..aec2adb46 100644 --- a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod +++ b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod @@ -81,7 +81,7 @@ end rplot Consumption; rplot Capital; -D = load('rbc_det_results'); +D = load(['rbc_det' filesep 'Output' filesep 'rbc_det_results']); if norm(D.oo_.endo_simul - oo_.endo_simul) > 1e-30; disp(norm(D.oo_.endo_simul - oo_.endo_simul)); @@ -102,7 +102,7 @@ end rplot Consumption; rplot Capital; -D = load('rbc_det_results'); +D = load(['rbc_det' filesep 'Output' filesep 'rbc_det_results']); if isoctave && options_.solve_algo==0 %%acount for somehow weaker convergence criterion in Octave's fsolve tol_crit=1e-4; diff --git a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lag.mod b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lag.mod index e44906904..3c35acebd 100644 --- a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lag.mod +++ b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lag.mod @@ -81,7 +81,7 @@ end rplot Consumption; rplot Capital; -D = load('rbc_det_results'); +D = load(['rbc_det' filesep 'Output' filesep 'rbc_det_results']); if norm(D.oo_.endo_simul(1:D.M_.orig_endo_nbr,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(1:M_.orig_endo_nbr,M_.maximum_lag+1:end-M_.maximum_lead)) > 1e-30; disp(D.oo_.endo_simul(1:D.M_.orig_endo_nbr,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(1:M_.orig_endo_nbr,M_.maximum_lag+1:end-M_.maximum_lead)); @@ -102,7 +102,7 @@ end rplot Consumption; rplot Capital; -D = load('rbc_det_results'); +D = load(['rbc_det' filesep 'Output' filesep 'rbc_det_results']); if isoctave && options_.solve_algo==0 %%acount for somehow weaker convergence criterion in Octave's fsolve tol_crit=1e-4; diff --git a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lead.mod b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lead.mod index 9d649d902..60b969a68 100644 --- a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lead.mod +++ b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7_exo_lead.mod @@ -81,7 +81,7 @@ end rplot Consumption; rplot Capital; -D = load('rbc_det_results'); +D = load(['rbc_det' filesep 'Output' filesep 'rbc_det_results']); if norm(D.oo_.endo_simul(1:D.M_.orig_endo_nbr,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(1:M_.orig_endo_nbr,M_.maximum_lag+1:end-M_.maximum_lead)) > 1e-30; disp(D.oo_.endo_simul(1:D.M_.orig_endo_nbr,D.M_.maximum_lag+1:end-D.M_.maximum_lead) - oo_.endo_simul(1:M_.orig_endo_nbr,M_.maximum_lag+1:end-M_.maximum_lead)); @@ -102,7 +102,7 @@ end rplot Consumption; rplot Capital; -D = load('rbc_det_results'); +D = load(['rbc_det' filesep 'Output' filesep 'rbc_det_results']); if isoctave && options_.solve_algo==0 %%acount for somehow weaker convergence criterion in Octave's fsolve tol_crit=1e-4; diff --git a/tests/discretionary_policy/Gali_2015_chapter_3_nonlinear.mod b/tests/discretionary_policy/Gali_2015_chapter_3_nonlinear.mod index 26ecf95d7..ca76e3033 100644 --- a/tests/discretionary_policy/Gali_2015_chapter_3_nonlinear.mod +++ b/tests/discretionary_policy/Gali_2015_chapter_3_nonlinear.mod @@ -219,7 +219,7 @@ end; planner_objective 0.5*((siggma+(varphi+alppha)/(1-alppha))*y_hat^2+epsilon/0.0215*pi^2)/100; discretionary_policy(order=1,instruments=(R),irf=20,planner_discount=betta, periods=0) y_hat pi_ann log_y log_N log_W_real log_P; -temp=load('Gali_2015_chapter_3_results.mat'); +temp=load(['Gali_2015_chapter_3' filesep 'Output' filesep 'Gali_2015_chapter_3_results.mat']); if abs(oo_.planner_objective_value-temp.oo_.planner_objective_value)>1e-6 warning('Planner objective does not match linear model') end diff --git a/tests/estimation/MH_recover/fs2000_recover.mod b/tests/estimation/MH_recover/fs2000_recover.mod index 7a55782f6..5b551e8d2 100644 --- a/tests/estimation/MH_recover/fs2000_recover.mod +++ b/tests/estimation/MH_recover/fs2000_recover.mod @@ -8,7 +8,7 @@ copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat'],[M_.d copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat'],[M_.dname '_mh2_blck2.mat']) delete([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']) -estimation(order=1, datafile='../fsdat_simul',mode_compute=0,mode_file=fs2000_recover_mode, nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); +estimation(order=1, datafile='../fsdat_simul',mode_compute=0,mode_file='fs2000_recover/Output/fs2000_recover_mode', nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); %check first unaffected chain temp1=load([M_.dname '_mh1_blck1.mat']); diff --git a/tests/estimation/MH_recover/fs2000_recover_2.mod b/tests/estimation/MH_recover/fs2000_recover_2.mod index 11800bcb9..cb70cd1c9 100644 --- a/tests/estimation/MH_recover/fs2000_recover_2.mod +++ b/tests/estimation/MH_recover/fs2000_recover_2.mod @@ -5,7 +5,7 @@ options_.MaxNumberOfBytes=2000*11*8/4; estimation(order=1, datafile='../fsdat_simul',nobs=192, loglinear, mh_replic=999, mh_nblocks=2, mh_jscale=0.8); -estimation(order=1,mode_compute=0,mode_file=fs2000_recover_2_mode, datafile='../fsdat_simul',nobs=192, loglinear, load_mh_file,mh_replic=1002, mh_nblocks=2, mh_jscale=0.8); +estimation(order=1,mode_compute=0,mode_file='fs2000_recover_2/Output/fs2000_recover_2_mode', datafile='../fsdat_simul',nobs=192, loglinear, load_mh_file,mh_replic=1002, mh_nblocks=2, mh_jscale=0.8); copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat'],[M_.dname '_mh1_blck1.mat']) copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh3_blck2.mat'],[M_.dname '_mh3_blck2.mat']) copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat'],[M_.dname '_mh4_blck2.mat']) @@ -14,7 +14,7 @@ delete([M_.dname filesep 'metropolis' filesep M_.dname '_mh3_blck2.mat']) delete([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']) delete([M_.dname filesep 'metropolis' filesep M_.dname '_mh5_blck2.mat']) -estimation(order=1, datafile='../fsdat_simul',mode_compute=0,mode_file=fs2000_recover_2_mode, nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); +estimation(order=1, datafile='../fsdat_simul',mode_compute=0,mode_file='fs2000_recover_2/Output/fs2000_recover_2_mode', nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); %check first unaffected chain temp1=load([M_.dname '_mh1_blck1.mat']); diff --git a/tests/estimation/MH_recover/fs2000_recover_3.mod b/tests/estimation/MH_recover/fs2000_recover_3.mod index ac01b4bb2..ecf0592d4 100644 --- a/tests/estimation/MH_recover/fs2000_recover_3.mod +++ b/tests/estimation/MH_recover/fs2000_recover_3.mod @@ -5,14 +5,14 @@ options_.MaxNumberOfBytes=2000*11*8/4; estimation(order=1, datafile='../fsdat_simul',nobs=192, loglinear, mh_replic=1000, mh_nblocks=2, mh_jscale=0.8); -estimation(order=1,mode_compute=0,mode_file=fs2000_recover_3_mode, datafile='../fsdat_simul',nobs=192, loglinear, load_mh_file,mh_replic=1000, mh_nblocks=2, mh_jscale=0.8); +estimation(order=1,mode_compute=0,mode_file='fs2000_recover_3/Output/fs2000_recover_3_mode', datafile='../fsdat_simul',nobs=192, loglinear, load_mh_file,mh_replic=1000, mh_nblocks=2, mh_jscale=0.8); copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat'],[M_.dname '_mh1_blck1.mat']) copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh3_blck2.mat'],[M_.dname '_mh3_blck2.mat']) copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat'],[M_.dname '_mh4_blck2.mat']) delete([M_.dname filesep 'metropolis' filesep M_.dname '_mh3_blck2.mat']) delete([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']) -estimation(order=1, datafile='../fsdat_simul',mode_compute=0,mode_file=fs2000_recover_3_mode, nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); +estimation(order=1, datafile='../fsdat_simul',mode_compute=0,mode_file='fs2000_recover_3/Output/fs2000_recover_3_mode', nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); %check first unaffected chain temp1=load([M_.dname '_mh1_blck1.mat']); diff --git a/tests/estimation/MH_recover/fs2000_recover_tarb.mod b/tests/estimation/MH_recover/fs2000_recover_tarb.mod index 4d3d9ee73..ea4cb4520 100644 --- a/tests/estimation/MH_recover/fs2000_recover_tarb.mod +++ b/tests/estimation/MH_recover/fs2000_recover_tarb.mod @@ -8,7 +8,7 @@ copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat'],[M_.d copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat'],[M_.dname '_mh2_blck2.mat']) delete([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']) -estimation(posterior_sampling_method='tailored_random_block_metropolis_hastings',order=1, datafile='../fsdat_simul',mode_compute=0,mode_file=fs2000_recover_mode, nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); +estimation(posterior_sampling_method='tailored_random_block_metropolis_hastings',order=1, datafile='../fsdat_simul',mode_compute=0,mode_file='fs2000_recover/Output/fs2000_recover_mode', nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8,mh_recover); %check first unaffected chain temp1=load([M_.dname '_mh1_blck1.mat']); diff --git a/tests/estimation/fs2000.mod b/tests/estimation/fs2000.mod index 4ab6d4ad6..f12c8d9b0 100644 --- a/tests/estimation/fs2000.mod +++ b/tests/estimation/fs2000.mod @@ -104,11 +104,11 @@ options_.smoother=0; options_.moments_varendo=0; options_.forecast=0; copyfile([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat'],[M_.dname '_mh1_blck1.mat']) -estimation(mode_compute=0,mode_file=fs2000_mode,order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=1500, mh_nblocks=1, mh_jscale=0.8); +estimation(mode_compute=0,mode_file='fs2000/Output/fs2000_mode',order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=1500, mh_nblocks=1, mh_jscale=0.8); hh=eye(size(bayestopt_.name,1)); -save('fs2000_mode.mat','hh','-append') +save('fs2000/Output/fs2000_mode.mat','hh','-append') Laplace = oo_.MarginalDensity.LaplaceApproximation; %save Laplace approximation which will be overwritten with set hh otherwise -estimation(mode_compute=0,mode_file=fs2000_mode,order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=1500, mh_nblocks=1, mh_jscale=10,load_mh_file); +estimation(mode_compute=0,mode_file='fs2000/Output/fs2000_mode',order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=1500, mh_nblocks=1, mh_jscale=10,load_mh_file); temp1=load([M_.dname '_mh1_blck1.mat']); temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat']); @@ -121,7 +121,7 @@ end save('fs2000_result.mat','oo_') options_.load_results_after_load_mh=1; -estimation(mode_compute=0,mode_file=fs2000_mode,order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=0, mh_nblocks=1, mh_jscale=10,load_mh_file,smoother) gy_obs gp_obs; +estimation(mode_compute=0,mode_file='fs2000/Output/fs2000_mode',order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=0, mh_nblocks=1, mh_jscale=10,load_mh_file,smoother) gy_obs gp_obs; oo_.MarginalDensity.LaplaceApproximation = Laplace; %reset correct Laplace diff --git a/tests/estimation/fs2000_MCMC_jumping_covariance.mod b/tests/estimation/fs2000_MCMC_jumping_covariance.mod index 91a6f20d8..423ac91f9 100644 --- a/tests/estimation/fs2000_MCMC_jumping_covariance.mod +++ b/tests/estimation/fs2000_MCMC_jumping_covariance.mod @@ -84,9 +84,9 @@ options_.mode_compute=4; options_.plot_priors=0; estimation(order=1,datafile=fsdat_simul,nobs=192,loglinear,mh_replic=1000,mh_nblocks=1,mh_jscale=0.8,mcmc_jumping_covariance=hessian); -load fs2000_MCMC_jumping_covariance_mode hh; +load('fs2000_MCMC_jumping_covariance/Output/fs2000_MCMC_jumping_covariance_mode','hh'); jumping_covariance=diag(diag(hh)); -save test_matrix.mat jumping_covariance; +save('test_matrix.mat','jumping_covariance'); estimation(order=1,datafile=fsdat_simul,nobs=192,loglinear,mh_replic=1000,mh_nblocks=1,mh_jscale=0.01,mcmc_jumping_covariance=prior_variance); estimation(order=1,datafile=fsdat_simul,nobs=192,loglinear,mh_replic=1000,mh_nblocks=1,mh_jscale=0.0001,mcmc_jumping_covariance=identity_matrix); diff --git a/tests/estimation/heteroskedastic_shocks/fs2000_het.mod b/tests/estimation/heteroskedastic_shocks/fs2000_het.mod index 2aa16d505..a0974c92c 100644 --- a/tests/estimation/heteroskedastic_shocks/fs2000_het.mod +++ b/tests/estimation/heteroskedastic_shocks/fs2000_het.mod @@ -29,5 +29,5 @@ end; estimation(order=1,datafile='../fsdat_simul',nobs=192,mode_compute=5,loglinear,mh_replic=0,smoother,filtered_vars,forecast=8,filter_step_ahead=[1:8],consider_all_endogenous,heteroskedastic_filter); -@#define mode_file_name="fs2000_het_mode" +@#define mode_file_name="'fs2000_het/Output/fs2000_het_mode'" @#include "fs2000_het_check.inc" diff --git a/tests/estimation/heteroskedastic_shocks/fs2000_het_corr.mod b/tests/estimation/heteroskedastic_shocks/fs2000_het_corr.mod index f0887ea70..dae222e46 100644 --- a/tests/estimation/heteroskedastic_shocks/fs2000_het_corr.mod +++ b/tests/estimation/heteroskedastic_shocks/fs2000_het_corr.mod @@ -33,5 +33,5 @@ end; estimation(order=1,datafile='../fsdat_simul',nobs=192,mode_compute=5,loglinear,mh_replic=0,smoother,filtered_vars,forecast=8,filter_step_ahead=[1:8],consider_all_endogenous,heteroskedastic_filter); -@#define mode_file_name="fs2000_het_corr_mode" +@#define mode_file_name="'fs2000_het_corr/Output/fs2000_het_corr_mode'" @#include "fs2000_het_check.inc" diff --git a/tests/example1_use_dll.mod b/tests/example1_use_dll.mod index 66bbe7c5c..8c5b200d6 100644 --- a/tests/example1_use_dll.mod +++ b/tests/example1_use_dll.mod @@ -44,11 +44,11 @@ end; stoch_simul(nograph); -if ~exist('example1_results.mat','file'); +if ~exist(['example1' filesep 'Output' filesep 'example1_results.mat'],'file'); error('example1 must be run first'); end; -oo1 = load('example1_results','oo_'); +oo1 = load(['example1' filesep 'Output' filesep 'example1_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/example2long.mod b/tests/example2long.mod index bdaec0050..f68bd608a 100644 --- a/tests/example2long.mod +++ b/tests/example2long.mod @@ -51,11 +51,11 @@ end; stoch_simul; -if ~exist('example1long_results.mat','file'); +if ~exist(['example1long' filesep 'Output' filesep 'example1long_results.mat'],'file'); error('example1long must be run first'); end; -oo1 = load('example1long_results','oo_'); +oo1 = load(['example1long' filesep 'Output' filesep 'example1long_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/example2long_use_dll.mod b/tests/example2long_use_dll.mod index b0a28fa01..0dab99e81 100644 --- a/tests/example2long_use_dll.mod +++ b/tests/example2long_use_dll.mod @@ -51,11 +51,12 @@ end; stoch_simul; -if ~exist('example1long_results.mat','file'); +if ~exist(['example1long' filesep 'Output' filesep 'example1long_results.mat'],'file'); error('example1long must be run first'); end; -oo1 = load('example1long_results','oo_'); +oo1 = load(['example1long' filesep 'Output' filesep 'example1long_results'],'oo_'); + dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/external_function/extfun_in_mlv.mod b/tests/external_function/extfun_in_mlv.mod index 1b2947cff..bed024d0f 100644 --- a/tests/external_function/extfun_in_mlv.mod +++ b/tests/external_function/extfun_in_mlv.mod @@ -46,7 +46,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-12 error('Failure in external function') end diff --git a/tests/external_function/first_and_2nd_deriv_given.mod b/tests/external_function/first_and_2nd_deriv_given.mod index f62110442..d4395ae53 100644 --- a/tests/external_function/first_and_2nd_deriv_given.mod +++ b/tests/external_function/first_and_2nd_deriv_given.mod @@ -45,7 +45,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-12 error('Failure in external function') end diff --git a/tests/external_function/first_and_2nd_deriv_given_dll.mod b/tests/external_function/first_and_2nd_deriv_given_dll.mod index ac42623c6..328b2e692 100644 --- a/tests/external_function/first_and_2nd_deriv_given_dll.mod +++ b/tests/external_function/first_and_2nd_deriv_given_dll.mod @@ -45,7 +45,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-12 error('Failure in external function') end diff --git a/tests/external_function/first_and_2nd_deriv_given_dll_namespace.mod b/tests/external_function/first_and_2nd_deriv_given_dll_namespace.mod index ca55aea5a..5af21e14d 100644 --- a/tests/external_function/first_and_2nd_deriv_given_dll_namespace.mod +++ b/tests/external_function/first_and_2nd_deriv_given_dll_namespace.mod @@ -47,7 +47,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-12 error('Failure in external function') end diff --git a/tests/external_function/first_and_2nd_deriv_given_namespace.mod b/tests/external_function/first_and_2nd_deriv_given_namespace.mod index 3729a17d6..cc42dc296 100644 --- a/tests/external_function/first_and_2nd_deriv_given_namespace.mod +++ b/tests/external_function/first_and_2nd_deriv_given_namespace.mod @@ -47,7 +47,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-12 error('Failure in external function') end diff --git a/tests/external_function/first_deriv_given.mod b/tests/external_function/first_deriv_given.mod index ef7ba0ab4..4262a29a1 100644 --- a/tests/external_function/first_deriv_given.mod +++ b/tests/external_function/first_deriv_given.mod @@ -45,7 +45,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-12 error('Failure in external function') end diff --git a/tests/external_function/first_deriv_given_dll.mod b/tests/external_function/first_deriv_given_dll.mod index cfaf4ae51..6f4934369 100644 --- a/tests/external_function/first_deriv_given_dll.mod +++ b/tests/external_function/first_deriv_given_dll.mod @@ -45,7 +45,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-12 error('Failure in external function') end diff --git a/tests/external_function/no_deriv_given.mod b/tests/external_function/no_deriv_given.mod index c75cd10c1..44652a504 100644 --- a/tests/external_function/no_deriv_given.mod +++ b/tests/external_function/no_deriv_given.mod @@ -45,7 +45,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-9 error('Failure in external function') end diff --git a/tests/external_function/no_deriv_given_dll.mod b/tests/external_function/no_deriv_given_dll.mod index 207416847..5ad3bcc2e 100644 --- a/tests/external_function/no_deriv_given_dll.mod +++ b/tests/external_function/no_deriv_given_dll.mod @@ -45,7 +45,7 @@ end; stoch_simul; -L = load('benchmark_results.mat'); +L = load(['benchmark' filesep 'Output' filesep 'benchmark_results.mat']); if max(max(abs(L.oo_.dr.ghu - oo_.dr.ghu))) > 1e-9 error('Failure in external function') end diff --git a/tests/gsa/ls2003.mod b/tests/gsa/ls2003.mod index 3c1b3c910..d4a56b4d5 100644 --- a/tests/gsa/ls2003.mod +++ b/tests/gsa/ls2003.mod @@ -152,7 +152,7 @@ estimation(datafile='data_ca1.m',first_obs=8,nobs=79,mh_nblocks=1, // run this to produce posterior samples of filtered, smoothed and irf variables, if not yet done //estimation(datafile='data_ca1.m',first_obs=8,nobs=79,mh_nblocks=2,prefilter=1,mh_jscale=0.3, -// mh_replic=0, mode_file=ls2003_mode, mode_compute=0, load_mh_file, bayesian_irf, +// mh_replic=0, mode_file='ls2003/Output/ls2003_mode', mode_compute=0, load_mh_file, bayesian_irf, // filtered_vars, smoother, mh_drop=0.6); disp(' '); @@ -163,7 +163,7 @@ disp(' '); disp('Press ENTER to continue'); pause(5); dynare_sensitivity(nodisplay, pprior=0,Nsam=512,neighborhood_width=0.2, -mode_file=ls2003_mode, // specifies the mode file where the mode and Hessian are stored +mode_file='ls2003/Output/ls2003_mode', // specifies the mode file where the mode and Hessian are stored datafile='data_ca1.m',first_obs=8,nobs=79,prefilter=1, rmse=1); @@ -174,7 +174,7 @@ disp(' '); disp('Press ENTER to continue'); pause(5); dynare_sensitivity(nodisplay, pprior=0,Nsam=512, -mode_file=ls2003_mode // specifies the mode file where the mode and Hessian are stored +mode_file='ls2003/Output/ls2003_mode' // specifies the mode file where the mode and Hessian are stored ); @@ -182,7 +182,7 @@ disp(' '); disp('RMSE ANALYSIS FOR MULTIVARIATE SAMPLE AT THE POSTERIOR MODE'); disp(' '); disp('Press ENTER to continue'); pause(5); -dynare_sensitivity(nodisplay, mode_file=ls2003_mode, +dynare_sensitivity(nodisplay, mode_file='ls2003/Output/ls2003_mode', datafile='data_ca1.m',first_obs=8,nobs=79,prefilter=1, pprior=0, stab=0, @@ -200,7 +200,7 @@ disp('datafile=data_ca1.m,first_obs=8,nobs=79,prefilter=1,') disp('rmse=1, alpha2_rmse=0, alpha_rmse=0);') disp(' '); disp('Press ENTER to continue'); pause(5); -//dynare_sensitivity(pprior=0,Nsam=2048,alpha2_stab=0.4,mode_file=ls2003_mode, +//dynare_sensitivity(pprior=0,Nsam=2048,alpha2_stab=0.4,mode_file='ls2003/Output/ls2003_mode', //datafile='data_ca1.m',first_obs=8,nobs=79,prefilter=1, //rmse=1, //alpha2_rmse=0, // no correlation analysis @@ -211,7 +211,7 @@ disp(' '); disp('RMSE ANALYSIS FOR POSTERIOR MCMC sample (ppost=1)'); disp('Needs a call to dynare_estimation to load all MH environment'); disp('Press ENTER to continue'); pause(5); -//estimation(datafile='data_ca1.m',first_obs=8,nobs=79,mh_nblocks=2, mode_file=ls2003_mode, load_mh_file, +//estimation(datafile='data_ca1.m',first_obs=8,nobs=79,mh_nblocks=2, mode_file='ls2003/Output/ls2003_mode', load_mh_file, // prefilter=1,mh_jscale=0.5,mh_replic=0, mode_compute=0, mh_drop=0.6); dynare_sensitivity(nodisplay, stab=0, // no need for stability analysis since the posterior sample is surely OK diff --git a/tests/histval_initval_file/sim_exo_lead_lag_initvalf.mod b/tests/histval_initval_file/sim_exo_lead_lag_initvalf.mod index 43e129e3e..ec6f47bb2 100644 --- a/tests/histval_initval_file/sim_exo_lead_lag_initvalf.mod +++ b/tests/histval_initval_file/sim_exo_lead_lag_initvalf.mod @@ -38,7 +38,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed'); end -base_results=load('sim_exo_lead_lag_results.mat'); +base_results=load(['sim_exo_lead_lag' filesep 'Output' filesep 'sim_exo_lead_lag_results.mat']); if max(max(abs(base_results.oo_.endo_simul(1:5,:) - oo_.endo_simul(1:5,:)))) > 1e-8 error('Simulation with leads and lags doesn''t match the one with auxiliary variables') end @@ -63,7 +63,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed'); end -base_results=load('sim_exo_lead_lag_results.mat'); +base_results=load(['sim_exo_lead_lag' filesep 'Output' filesep 'sim_exo_lead_lag_results.mat']); if max(max(abs(base_results.oo_.endo_simul(1:5,:) - oo_.endo_simul(1:5,:)))) > 1e-8 error('Simulation with leads and lags doesn''t match the one with auxiliary variables') end @@ -84,7 +84,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed'); end -base_results=load('sim_exo_lead_lag_results.mat'); +base_results=load(['sim_exo_lead_lag' filesep 'Output' filesep 'sim_exo_lead_lag_results.mat']); if max(max(abs(base_results.oo_.endo_simul(1:5,:) - oo_.endo_simul(1:5,:)))) > 1e-8 error('Simulation with leads and lags doesn''t match the one with auxiliary variables') end @@ -105,7 +105,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed'); end -base_results=load('sim_exo_lead_lag_results.mat'); +base_results=load(['sim_exo_lead_lag' filesep 'Output' filesep 'sim_exo_lead_lag_results.mat']); if max(max(abs(base_results.oo_.endo_simul(1:5,:) - oo_.endo_simul(1:5,:)))) > 1e-8 error('Simulation with leads and lags doesn''t match the one with auxiliary variables') end @@ -126,7 +126,7 @@ if ~oo_.deterministic_simulation.status error('Perfect foresight simulation failed'); end -base_results=load('sim_exo_lead_lag_results.mat'); +base_results=load(['sim_exo_lead_lag' filesep 'Output' filesep 'sim_exo_lead_lag_results.mat']); if max(max(abs(base_results.oo_.endo_simul(1:5,:) - oo_.endo_simul(1:5,:)))) > 1e-8 error('Simulation with leads and lags doesn''t match the one with auxiliary variables') end diff --git a/tests/k_order_perturbation/fs2000k2_m.mod b/tests/k_order_perturbation/fs2000k2_m.mod index b1dd6f80e..02ca45450 100644 --- a/tests/k_order_perturbation/fs2000k2_m.mod +++ b/tests/k_order_perturbation/fs2000k2_m.mod @@ -66,11 +66,11 @@ steady; stoch_simul(order=2,k_order_solver,periods=1000); -if ~exist('fs2000k2a_results.mat','file'); +if ~exist(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results.mat'],'file'); error('fs2000k2a must be run first'); end; -oo1 = load('fs2000k2a_results','oo_'); +oo1 = load(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/k_order_perturbation/fs2000k2_use_dll.mod b/tests/k_order_perturbation/fs2000k2_use_dll.mod index 20284beca..9b5ea9dd9 100644 --- a/tests/k_order_perturbation/fs2000k2_use_dll.mod +++ b/tests/k_order_perturbation/fs2000k2_use_dll.mod @@ -66,11 +66,11 @@ steady; stoch_simul(order=2,k_order_solver,periods=1000); -if ~exist('fs2000k2a_results.mat','file'); +if ~exist(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results.mat'],'file'); error('fs2000k2a must be run first'); end; -oo1 = load('fs2000k2a_results','oo_'); +oo1 = load(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/k_order_perturbation/fs2000k3_m.mod b/tests/k_order_perturbation/fs2000k3_m.mod index 0e2529763..fa91efec8 100644 --- a/tests/k_order_perturbation/fs2000k3_m.mod +++ b/tests/k_order_perturbation/fs2000k3_m.mod @@ -66,11 +66,11 @@ steady; stoch_simul(order=3,periods=1000); -if ~exist('fs2000k2a_results.mat','file'); +if ~exist(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results.mat'],'file'); error('fs2000k2a must be run first'); end; -oo1 = load('fs2000k2a_results','oo_'); +oo1 = load(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/k_order_perturbation/fs2000k3_use_dll.mod b/tests/k_order_perturbation/fs2000k3_use_dll.mod index 88821218a..2028443b6 100644 --- a/tests/k_order_perturbation/fs2000k3_use_dll.mod +++ b/tests/k_order_perturbation/fs2000k3_use_dll.mod @@ -66,11 +66,11 @@ steady; stoch_simul(order=3,periods=1000); -if ~exist('fs2000k2a_results.mat','file'); +if ~exist(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results.mat'],'file'); error('fs2000k2a must be run first'); end; -oo1 = load('fs2000k2a_results','oo_'); +oo1 = load(['fs2000k2a' filesep 'Output' filesep 'fs2000k2a_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/k_order_perturbation/fs2000k_1_m.mod b/tests/k_order_perturbation/fs2000k_1_m.mod index 5cd18f42c..f4bad22ce 100644 --- a/tests/k_order_perturbation/fs2000k_1_m.mod +++ b/tests/k_order_perturbation/fs2000k_1_m.mod @@ -74,11 +74,11 @@ steady; stoch_simul(order=2,k_order_solver,irf=0); -if ~exist('fs2000k2_m_results.mat','file'); +if ~exist(['fs2000k2_m' filesep 'Output' filesep 'fs2000k2_m_results.mat'],'file'); error('fs2000k2_m must be run first'); end; -oo1 = load('fs2000k2_m_results','oo_'); +oo1 = load(['fs2000k2_m' filesep 'Output' filesep 'fs2000k2_m_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/k_order_perturbation/fs2000k_1_use_dll.mod b/tests/k_order_perturbation/fs2000k_1_use_dll.mod index 4de96ae25..f4eb03008 100644 --- a/tests/k_order_perturbation/fs2000k_1_use_dll.mod +++ b/tests/k_order_perturbation/fs2000k_1_use_dll.mod @@ -73,11 +73,11 @@ steady; stoch_simul(order=2,k_order_solver,irf=0); -if ~exist('fs2000k2_use_dll_results.mat','file'); +if ~exist(['fs2000k2_use_dll' filesep 'Output' filesep 'fs2000k2_use_dll_results.mat'],'file'); error('fs2000k2_use_dll must be run first'); end; -oo1 = load('fs2000k2_use_dll_results','oo_'); +oo1 = load(['fs2000k2_use_dll' filesep 'Output' filesep 'fs2000k2_use_dll_results'],'oo_'); dr0 = oo1.oo_.dr; dr = oo_.dr; diff --git a/tests/kalman/likelihood_from_dynare/fs2000_corr_ME.mod b/tests/kalman/likelihood_from_dynare/fs2000_corr_ME.mod index 17756e640..25443b5c2 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000_corr_ME.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000_corr_ME.mod @@ -12,7 +12,7 @@ stderr gy_obs, 1; corr gp_obs, gy_obs,0; end; -@#define mode_file_name="fs2000_corr_ME_mode" +@#define mode_file_name="'fs2000_corr_ME/Output/fs2000_corr_ME_mode'" @#define data_file_name="fsdat_simul_corr_ME" @#include "fs2000_estimation_check.inc" \ No newline at end of file diff --git a/tests/kalman/likelihood_from_dynare/fs2000_corr_ME_missing.mod b/tests/kalman/likelihood_from_dynare/fs2000_corr_ME_missing.mod index 860d6242b..7810b432f 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000_corr_ME_missing.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000_corr_ME_missing.mod @@ -12,7 +12,7 @@ stderr gy_obs, 1; corr gp_obs, gy_obs,0; end; -@#define mode_file_name="fs2000_corr_ME_missing_mode" +@#define mode_file_name="'fs2000_corr_ME_missing/Output/fs2000_corr_ME_missing_mode'" @#define data_file_name="fsdat_simul_corr_ME_missing" @#include "fs2000_estimation_check.inc" \ No newline at end of file diff --git a/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME.mod b/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME.mod index 7376f42bb..95cd231ea 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME.mod @@ -29,7 +29,7 @@ stderr gy_obs, 1; //corr gp_obs, gy_obs,0; end; -@#define mode_file_name="fs2000_uncorr_ME_mode" +@#define mode_file_name="'fs2000_uncorr_ME/Output/fs2000_uncorr_ME_mode'" @#define data_file_name="fsdat_simul_uncorr_ME" @#include "fs2000_estimation_check.inc" \ No newline at end of file diff --git a/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME_missing.mod b/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME_missing.mod index 77cac9269..3dd1c5497 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME_missing.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000_uncorr_ME_missing.mod @@ -12,7 +12,7 @@ stderr gy_obs, 1; //corr gp_obs, gy_obs,0; end; -@#define mode_file_name="fs2000_uncorr_ME_missing_mode" +@#define mode_file_name="'fs2000_uncorr_ME_missing/Output/fs2000_uncorr_ME_missing_mode'" @#define data_file_name="fsdat_simul_uncorr_ME_missing" @#include "fs2000_estimation_check.inc" diff --git a/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME.mod b/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME.mod index edeaa1743..2f9de9afd 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME.mod @@ -12,7 +12,7 @@ stderr Y_obs, 0.05; corr Y_obs, P_obs,0.5; end; -@#define mode_file_name="fs2000ns_corr_ME_mode" +@#define mode_file_name="'fs2000ns_corr_ME/Output/fs2000ns_corr_ME_mode'" @#define data_file_name="fs_ns_dat_simul_corr_ME" @#include "fs2000ns_estimation_check.inc" diff --git a/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME_missing.mod b/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME_missing.mod index 41741474c..da8317d5c 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME_missing.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000ns_corr_ME_missing.mod @@ -12,7 +12,7 @@ stderr Y_obs, 0.05; corr Y_obs, P_obs,0.5; end; -@#define mode_file_name="fs2000ns_corr_ME_missing_mode" +@#define mode_file_name="'fs2000ns_corr_ME_missing/Output/fs2000ns_corr_ME_missing_mode'" @#define data_file_name="fs_ns_dat_simul_corr_ME_missing" @#include "fs2000ns_estimation_check.inc" diff --git a/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME.mod b/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME.mod index 61072d20f..0e6ba9443 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME.mod @@ -36,7 +36,7 @@ stderr Y_obs, 0.05; //corr gp_obs, gy_obs,0; end; -@#define mode_file_name="fs2000ns_uncorr_ME_mode" +@#define mode_file_name="'fs2000ns_uncorr_ME/Output/fs2000ns_uncorr_ME_mode'" @#define data_file_name="fs_ns_dat_simul_uncorr_ME" @#include "fs2000ns_estimation_check.inc" diff --git a/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME_missing.mod b/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME_missing.mod index 2d0550e50..fcf83f8aa 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME_missing.mod +++ b/tests/kalman/likelihood_from_dynare/fs2000ns_uncorr_ME_missing.mod @@ -12,7 +12,7 @@ stderr Y_obs, 0.05; //corr gp_obs, gy_obs,0; end; -@#define mode_file_name="fs2000ns_uncorr_ME_missing_mode" +@#define mode_file_name="'fs2000ns_uncorr_ME_missing/Output/fs2000ns_uncorr_ME_missing_mode'" @#define data_file_name="fs_ns_dat_simul_uncorr_ME_missing" @#include "fs2000ns_estimation_check.inc" diff --git a/tests/kalman_filter_smoother/algo2.mod b/tests/kalman_filter_smoother/algo2.mod index 89bca7750..b18eeb42a 100644 --- a/tests/kalman_filter_smoother/algo2.mod +++ b/tests/kalman_filter_smoother/algo2.mod @@ -32,7 +32,7 @@ end; varobs dw dx dy z; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo1_mode,kalman_algo=2,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo1/Output/algo1_mode',kalman_algo=2,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -55,7 +55,7 @@ if max(max(abs(dat(1000:1199,:)-S(:,[2:4 1])))) > 1e-10; error('Test fails'); end; -o1 = load('algo1_results'); +o1 = load(['algo1' filesep 'Output' filesep 'algo1_results.mat']); obj_endo={'SmoothedVariables'; 'FilteredVariables'; 'UpdatedVariables'}; obj_exo = {'SmoothedShocks';}; nobj_endo = size(obj_endo,1); diff --git a/tests/kalman_filter_smoother/algo4.mod b/tests/kalman_filter_smoother/algo4.mod index 1d07bc93c..7d26340ce 100644 --- a/tests/kalman_filter_smoother/algo4.mod +++ b/tests/kalman_filter_smoother/algo4.mod @@ -35,7 +35,7 @@ end; varobs w x y; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo3_mode,diffuse_filter,kalman_algo=4,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter,kalman_algo=4,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -58,7 +58,7 @@ if max(max(abs(dat(1000:1199,:)-S(:,[7:9])))) > 1e-10; error('Test fails'); end; -o1 = load('algo3_results'); +o1 = load(['algo3' filesep 'Output' filesep 'algo3_results.mat']); obj_endo={'SmoothedVariables'; 'FilteredVariables'; 'UpdatedVariables'}; obj_exo = {'SmoothedShocks';}; nobj_endo = size(obj_endo,1); diff --git a/tests/kalman_filter_smoother/algo4a.mod b/tests/kalman_filter_smoother/algo4a.mod index 9ca467501..28c8b6511 100644 --- a/tests/kalman_filter_smoother/algo4a.mod +++ b/tests/kalman_filter_smoother/algo4a.mod @@ -34,7 +34,7 @@ end; varobs dw dx y z; estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter); -//estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo3_mode,diffuse_filter); +//estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter); //checking smoother consistency X = oo_.SmoothedVariables; diff --git a/tests/kalman_filter_smoother/algo4b.mod b/tests/kalman_filter_smoother/algo4b.mod index 37d743bbb..0e6c6da92 100644 --- a/tests/kalman_filter_smoother/algo4b.mod +++ b/tests/kalman_filter_smoother/algo4b.mod @@ -34,7 +34,7 @@ end; varobs dw dx y z; estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,smoothed_state_uncertainty); -//estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo3_mode,diffuse_filter); +//estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter); //checking smoother consistency X = oo_.SmoothedVariables; diff --git a/tests/kalman_filter_smoother/algoH2.mod b/tests/kalman_filter_smoother/algoH2.mod index b6d5f2b4b..39f750995 100644 --- a/tests/kalman_filter_smoother/algoH2.mod +++ b/tests/kalman_filter_smoother/algoH2.mod @@ -35,7 +35,7 @@ end; varobs dw dx dy z; //estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,kalman_algo=2); -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algoH1_mode,kalman_algo=2,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algoH1/Output/algoH1_mode',kalman_algo=2,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -60,7 +60,7 @@ if max(max(abs(dat(1000:1199,:)-S(:,[2:4 1])-ME))) > 1e-10; error('Test fails'); end; -o1 = load('algoH1_results'); +o1 = load(['algoH1' filesep 'Output' filesep 'algoH1_results.mat']); obj_endo={'SmoothedVariables'; 'FilteredVariables'; 'UpdatedVariables'}; obj_exo = {'SmoothedShocks';}; nobj_endo = size(obj_endo,1); diff --git a/tests/lmmcp/sw_newton.mod b/tests/lmmcp/sw_newton.mod index f40297e0f..bab473d02 100644 --- a/tests/lmmcp/sw_newton.mod +++ b/tests/lmmcp/sw_newton.mod @@ -71,7 +71,7 @@ simul(periods=1000); newton_solution_is_wrong = abs(evaluate_max_dynamic_residual(str2func('sw_newton.dynamic'), oo_.endo_simul, oo_.exo_simul, M_.params, oo_.steady_state, 1000, size(oo_.endo_simul, 1), 1, M_.lead_lag_incidence))>options_.dynatol.f; -lmmcp = load('sw_lmmcp_results'); +lmmcp = load(['sw_lmmcp' filesep 'Output' filesep 'sw_lmmcp_results']); lmmcp_solution_is_wrong = abs(evaluate_max_dynamic_residual(str2func('sw_newton.dynamic'), lmmcp.oo_.endo_simul, lmmcp.oo_.exo_simul, M_.params, oo_.steady_state, 1000, size(oo_.endo_simul, 1), 1, M_.lead_lag_incidence))>options_.dynatol.f; diff --git a/tests/loglinear/example4_loglinear_lagged_exogenous_a.mod b/tests/loglinear/example4_loglinear_lagged_exogenous_a.mod index cf93edac9..5d843aabb 100644 --- a/tests/loglinear/example4_loglinear_lagged_exogenous_a.mod +++ b/tests/loglinear/example4_loglinear_lagged_exogenous_a.mod @@ -69,7 +69,7 @@ end; stoch_simul(loglinear,order=1); -D = load('example4_loglinear_lagged_exogenous_results'); +D = load(['example4_loglinear_lagged_exogenous' filesep 'Output' filesep 'example4_loglinear_lagged_exogenous_results']); test1 = D.oo_.dr.ghx - oo_.dr.ghx; if norm(test1) > 1e-16; diff --git a/tests/occbin/model_borrcon/borrcon_0_std_shocks.mod b/tests/occbin/model_borrcon/borrcon_0_std_shocks.mod index 2943458db..c43a0a216 100644 --- a/tests/occbin/model_borrcon/borrcon_0_std_shocks.mod +++ b/tests/occbin/model_borrcon/borrcon_0_std_shocks.mod @@ -53,7 +53,7 @@ end; @#include "borrcon_common.inc" -orig_results=load('borrcon_results.mat'); +orig_results=load(['borrcon' filesep 'Output' filesep 'borrcon_results.mat']); if max(max(abs(oo_.occbin.piecewise-orig_results.oo_.occbin.piecewise)))>1e-10 error('Results do not match') end diff --git a/tests/occbin/model_irrcap_twoconstraints/dynrbc_0_std_shocks.mod b/tests/occbin/model_irrcap_twoconstraints/dynrbc_0_std_shocks.mod index 1c0579d5a..f7c09446d 100644 --- a/tests/occbin/model_irrcap_twoconstraints/dynrbc_0_std_shocks.mod +++ b/tests/occbin/model_irrcap_twoconstraints/dynrbc_0_std_shocks.mod @@ -59,7 +59,7 @@ end; @#include "dynrbc_common.inc" -orig_results=load('dynrbc_results.mat'); +orig_results=load(['dynrbc' filesep 'Output' filesep 'dynrbc_results.mat']); if max(max(abs(oo_.occbin.piecewise-orig_results.oo_.occbin.piecewise)))>1e-10 error('Results do not match') end diff --git a/tests/optimal_policy/neo_growth_ramsey.mod b/tests/optimal_policy/neo_growth_ramsey.mod index 2c8ea07dc..8185ca2f4 100644 --- a/tests/optimal_policy/neo_growth_ramsey.mod +++ b/tests/optimal_policy/neo_growth_ramsey.mod @@ -33,13 +33,13 @@ stoch_simul(order=2, irf=0); planner_objective_value = evaluate_planner_objective(M_, options_, oo_); -if ~exist('neo_growth_results.mat','file'); +if ~exist(['neo_growth' filesep 'Output' filesep 'neo_growth_results.mat'],'file'); error('neo_growth must be run first'); end; -oo1 = load('neo_growth_results','oo_'); -M1 = load('neo_growth_results','M_'); -options1 = load('neo_growth_results','options_'); +oo1 = load(['neo_growth' filesep 'Output' filesep 'neo_growth_results'],'oo_'); +M1 = load(['neo_growth' filesep 'Output' filesep 'neo_growth_results'],'M_'); +options1 = load(['neo_growth' filesep 'Output' filesep 'neo_growth_results'],'options_'); unc_W_hand = oo1.oo_.mean(strmatch('W',M1.M_.endo_names,'exact')); initial_condition_states = repmat(oo1.oo_.dr.ys,1,M1.M_.maximum_lag); diff --git a/tests/optimal_policy/neo_growth_ramsey_foresight.mod b/tests/optimal_policy/neo_growth_ramsey_foresight.mod index 57c34056b..b4175f58f 100644 --- a/tests/optimal_policy/neo_growth_ramsey_foresight.mod +++ b/tests/optimal_policy/neo_growth_ramsey_foresight.mod @@ -39,9 +39,9 @@ if ~exist('neo_growth_foresight_results.mat','file'); error('neo_growth_foresight must be run first'); end; -oo1 = load('neo_growth_foresight_results','oo_'); -M1 = load('neo_growth_foresight_results','M_'); -options1 = load('neo_growth_foresight_results','options_'); +oo1 = load(['neo_growth_foresight' filesep 'Output' filesep 'neo_growth_foresight_results'],'oo_'); +M1 = load(['neo_growth_foresight' filesep 'Output' filesep 'neo_growth_foresight_results'],'M_'); +options1 = load(['neo_growth_foresight' filesep 'Output' filesep 'neo_growth_foresight_results'],'options_'); cond_W_hand = oo1.oo_.endo_simul(strmatch('W',M1.M_.endo_names,'exact'),2); unc_W_hand = oo1.oo_.endo_simul(strmatch('W',M1.M_.endo_names,'exact'),end); diff --git a/tests/optimal_policy/neo_growth_ramsey_k_order.mod b/tests/optimal_policy/neo_growth_ramsey_k_order.mod index 658ed7151..02a82d48b 100644 --- a/tests/optimal_policy/neo_growth_ramsey_k_order.mod +++ b/tests/optimal_policy/neo_growth_ramsey_k_order.mod @@ -38,13 +38,13 @@ evaluate_planner_objective; if condWelfare~=oo_.planner_objective_value(1) error('Values do not match'); end -if ~exist('neo_growth_k_order_results.mat','file'); +if ~exist(['neo_growth_k_order' filesep 'Output' filesep 'neo_growth_k_order_results.mat'],'file'); error('neo_growth_k_order must be run first'); end; -oo = load('neo_growth_k_order_results','oo_'); -M = load('neo_growth_k_order_results','M_'); -options = load('neo_growth_k_order_results','options_'); +oo = load(['neo_growth_k_order' filesep 'Output' filesep 'neo_growth_k_order_results'],'oo_'); +M = load(['neo_growth_k_order' filesep 'Output' filesep 'neo_growth_k_order_results'],'M_'); +options = load(['neo_growth_k_order' filesep 'Output' filesep 'neo_growth_k_order_results'],'options_'); ind_U = strmatch('U', M.M_.endo_names,'exact'); ind_W = strmatch('W', M.M_.endo_names,'exact'); diff --git a/tests/optimal_policy/nk_ramsey_expectation_a.mod b/tests/optimal_policy/nk_ramsey_expectation_a.mod index fc7978937..4a0f85aaf 100644 --- a/tests/optimal_policy/nk_ramsey_expectation_a.mod +++ b/tests/optimal_policy/nk_ramsey_expectation_a.mod @@ -93,7 +93,7 @@ ramsey_model(planner_discount=0.99); stoch_simul(order=1,irf=0); evaluate_planner_objective; -o1=load('nk_ramsey_expectation_results'); +o1=load(['nk_ramsey_expectation' filesep 'Output' filesep 'nk_ramsey_expectation_results']); if (norm(o1.oo_.dr.ghx-oo_.dr.ghx,inf) > 1e-12) error('ghx doesn''t match') end diff --git a/tests/optimizers/fs2000_102.mod b/tests/optimizers/fs2000_102.mod index 40646a9c0..f23ae2d77 100644 --- a/tests/optimizers/fs2000_102.mod +++ b/tests/optimizers/fs2000_102.mod @@ -1,5 +1,5 @@ @#include "fs2000.common.inc" if ~isoctave() && exist('simulannealbnd','file') - estimation(mode_compute=102,mode_file='../estimation/fs2000_mode',order=1, datafile='../fs2000/fsdat_simul', nobs=192, mh_replic=0, mh_nblocks=2, mh_jscale=0.8); + estimation(mode_compute=102,mode_file='../estimation/fs2000/Output/fs2000_mode',order=1, datafile='../fs2000/fsdat_simul', nobs=192, mh_replic=0, mh_nblocks=2, mh_jscale=0.8); end diff --git a/tests/optimizers/fs2000_6.mod b/tests/optimizers/fs2000_6.mod index 21738c869..000fa1932 100644 --- a/tests/optimizers/fs2000_6.mod +++ b/tests/optimizers/fs2000_6.mod @@ -3,5 +3,5 @@ estimation(mode_compute=6,order=1, datafile='../fs2000/fsdat_simul', nobs=192, mh_replic=0, optim=('nclimb-mh', 10, 'ncov-mh', 1000, 'nscale-mh', 5000)); // test the mode file generated with mode_compute=6 -estimation(order=1,datafile='../fs2000/fsdat_simul',nobs=192,loglinear,mode_compute=0,mode_file=fs2000_6_mode,mh_replic=10, - posterior_sampler_options=('scale_file','fs2000_6_optimal_mh_scale_parameter')); +estimation(order=1,datafile='../fs2000/fsdat_simul',nobs=192,loglinear,mode_compute=0,mode_file='fs2000_6/Output/fs2000_6_mode',mh_replic=10, + posterior_sampler_options=('scale_file','fs2000_6/Output/fs2000_6_optimal_mh_scale_parameter')); diff --git a/tests/parallel/ls2003.mod b/tests/parallel/ls2003.mod index 64db3899c..cf3d8d076 100644 --- a/tests/parallel/ls2003.mod +++ b/tests/parallel/ls2003.mod @@ -66,7 +66,7 @@ end; estimation(datafile=data_ca1,first_obs=8,nobs=79,mh_replic=0,nodisplay); -estimation(datafile=data_ca1,first_obs=8,nobs=79,mode_compute=0,nodisplay, mode_file=ls2003_mode, mh_nblocks=4, prefilter=1, mh_jscale=0.5, mh_replic=2000); -estimation(datafile=data_ca1,first_obs=8,nobs=79,mode_compute=0,nodisplay, mode_file=ls2003_mode, mh_nblocks=4,prefilter=1,mh_jscale=0.5,mh_replic=2000,bayesian_irf,load_mh_file,smoother,forecast=12, filtered_vars, filter_step_ahead=[1 2 3 4]) y y_s R pie dq pie_s de A y_obs pie_obs R_obs; +estimation(datafile=data_ca1,first_obs=8,nobs=79,mode_compute=0,nodisplay, mode_file='ls2003/Output/ls2003_mode', mh_nblocks=4, prefilter=1, mh_jscale=0.5, mh_replic=2000); +estimation(datafile=data_ca1,first_obs=8,nobs=79,mode_compute=0,nodisplay, mode_file='ls2003/Output/ls2003_mode', mh_nblocks=4,prefilter=1,mh_jscale=0.5,mh_replic=2000,bayesian_irf,load_mh_file,smoother,forecast=12, filtered_vars, filter_step_ahead=[1 2 3 4]) y y_s R pie dq pie_s de A y_obs pie_obs R_obs; diff --git a/tests/pruning/AS_pruned_state_space_red_shock.mod b/tests/pruning/AS_pruned_state_space_red_shock.mod index dfbc3571c..177688e05 100644 --- a/tests/pruning/AS_pruned_state_space_red_shock.mod +++ b/tests/pruning/AS_pruned_state_space_red_shock.mod @@ -144,7 +144,7 @@ for iorder = 1:3 error('Something wrong with pruned_state_space.m compared to Andreasen et al 2018 Toolbox v2 at order %d.',iorder); end if iorder==3 - pruned_without_shock = load('AnSchorfheide_pruned_state_space_results.mat'); + pruned_without_shock = load(['AnSchorfheide_pruned_state_space' filesep 'Output' filesep 'AnSchorfheide_pruned_state_space_results.mat']); pruned_without_shock = pruned_without_shock.oo_.pruned; norm_E_yx = norm(pruned.E_y - pruned_without_shock.E_y , Inf); fprintf('max(sum(abs(E[y;x]''))): %d\n',norm_E_yx); diff --git a/tests/second_order/ds2.mod b/tests/second_order/ds2.mod index 66fa7fdb4..45a92208e 100644 --- a/tests/second_order/ds2.mod +++ b/tests/second_order/ds2.mod @@ -68,7 +68,7 @@ model_diagnostics; check; stoch_simul(order=2,irf=0); -o1 = load('ds1_results','oo_'); +o1 = load(['ds1' filesep 'Output' filesep 'ds1_results'],'oo_'); oo1 = o1.oo_.dr; oo2 = oo_.dr; if any(abs(oo1.ghxx-oo2.ghxx) > 1e-14);error('ds1 with missing variable doesn''t reproduce ds2');end; diff --git a/tests/smoother2histval/fs2000_simul.mod b/tests/smoother2histval/fs2000_simul.mod index a682c76c0..9b1b81f1c 100644 --- a/tests/smoother2histval/fs2000_simul.mod +++ b/tests/smoother2histval/fs2000_simul.mod @@ -62,11 +62,11 @@ var e_a; stderr 0.014; var e_m; stderr 0.005; end; -results_estimation=load('fs2000_smooth_results'); +results_estimation=load(['fs2000_smooth' filesep 'Output' filesep 'fs2000_smooth_results']); M_.params=results_estimation.M_.params; steady; -OO = load('fs2000_smooth_results.mat'); +OO = load(['fs2000_smooth' filesep 'Output' filesep 'fs2000_smooth_results']);; M_.params = OO.M_.params; histval_file(filename = 'fs2000_histval.mat');