Speed up runtime of ls2003.mod by reducing number of MC samples

time-shift
Johannes Pfeifer 2016-05-30 15:39:34 +02:00
parent ab378138c2
commit 06a8eeeea7
1 changed files with 13 additions and 12 deletions

View File

@ -62,12 +62,13 @@ stderr e_pies,inv_gamma_pdf,1.88,0.9827;
end;
options_.TeX=1;
disp(' ');
disp('NOW I DO STABILITY MAPPING and prepare sample for Reduced form Mapping');
disp(' ');
disp('Press ENTER to continue'); pause(5);
dynare_sensitivity(redform=1,nodisplay); //create sample of reduced form coefficients
dynare_sensitivity(redform=1,nodisplay,Nsam=512); //create sample of reduced form coefficients
// NOTE: since namendo is empty by default,
// this call does not perform the mapping of reduced form coefficient: just prepares the sample
@ -82,8 +83,8 @@ threshold_redform=[-1 0], // filter reduced form coefficients (default=[])
namendo=(pie,R), // evaluate relationships for pie and R (namendo=(:) for all variables)
namexo=(e_R), // evaluate relationships with exogenous e_R (use namexo=(:) for all shocks)
namlagendo=(R), // evaluate relationships with lagged R (use namlagendo=(:) for all lagged endogenous)
stab=0 // don't repeat again the stability mapping
);
stab=0, // don't repeat again the stability mapping
Nsam=512);
disp(' ');
@ -112,8 +113,8 @@ dynare_sensitivity(nodisplay, datafile='data_ca1.m',first_obs=8,nobs=79,prefilte
load_stab=1, // load prior sample
istart_rmse=2, //start computing rmse from second observation (i.e. rmse does not inlude initial big error)
stab=0, // don't plot again stability analysis results
rmse=1 // do rmse analysis
);
rmse=1, // do rmse analysis
Nsam=512);
disp(' ');
disp('THE PREVIOUS THREE CALLS COULD BE DONE TOGETHER');
@ -144,7 +145,7 @@ disp(' ');
disp('Press ENTER to continue'); pause(5);
// run this to generate posterior mode and Metropolis files if not yet done
estimation(datafile='data_ca1.m',first_obs=8,nobs=79,mh_nblocks=2,
estimation(datafile='data_ca1.m',first_obs=8,nobs=79,mh_nblocks=1,
prefilter=1,mh_jscale=0.5,mh_replic=5000, mode_compute=4, mh_drop=0.6, nodisplay,
bayesian_irf, filtered_vars, smoother) y_obs R_obs pie_obs dq de;
@ -161,7 +162,7 @@ disp('Typical for ML estimation, also feasible for posterior mode');
disp(' ');
disp('Press ENTER to continue'); pause(5);
dynare_sensitivity(nodisplay, pprior=0,Nsam=2048,neighborhood_width=0.2,
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
datafile='data_ca1.m',first_obs=8,nobs=79,prefilter=1,
rmse=1);
@ -172,7 +173,7 @@ disp('Typical for ML estimation, also feasible for posterior mode');
disp(' ');
disp('Press ENTER to continue'); pause(5);
dynare_sensitivity(nodisplay, pprior=0,Nsam=2048,
dynare_sensitivity(nodisplay, pprior=0,Nsam=512,
mode_file=ls2003_mode // specifies the mode file where the mode and Hessian are stored
);
@ -187,14 +188,14 @@ pprior=0,
stab=0,
rmse=1,
alpha2_rmse=0, // no correlation analysis
alpha_rmse=0 // no Smirnov sensitivity analysis
);
alpha_rmse=0, // no Smirnov sensitivity analysis
Nsam=512);
disp(' ');
disp('THE LAST TWO CALLS COULD BE DONE TOGETHER');
disp('BY USING THE COMBINED CALL');
disp(' ');
disp('dynare_sensitivity(pprior=0,Nsam=2048,alpha2_stab=0.4,mode_file=ls2003_mode,')
disp('dynare_sensitivity(pprior=0,Nsam=512,alpha2_stab=0.4,mode_file=ls2003_mode,')
disp('datafile=data_ca1.m,first_obs=8,nobs=79,prefilter=1,')
disp('rmse=1, alpha2_rmse=0, alpha_rmse=0);')
disp(' ');
@ -215,7 +216,7 @@ disp('Press ENTER to continue'); pause(5);
dynare_sensitivity(nodisplay, stab=0, // no need for stability analysis since the posterior sample is surely OK
datafile='data_ca1.m',first_obs=8,nobs=79,prefilter=1,
rmse=1,ppost=1);
rmse=1,ppost=1,Nsam=512);
collect_LaTeX_Files(M_);
if system(['pdflatex -halt-on-error ' M_.fname '_TeX_binder.tex'])