diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_no_prefilt_first_obs_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_no_prefilt_first_obs_MC.mod index 92798b4576a1d29bc91002961d93a029f22355c0..091dfc2709ccbb8e32395abccb88fff28d564fef 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_no_prefilt_first_obs_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_no_prefilt_first_obs_MC.mod @@ -1,17 +1,17 @@ @#include "../Trend_exp_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=400, +estimation(order=1,datafile='Trend_loglin_no_prefilt_first_obs_MC_Exp_AR1_trend_data_with_constant',mh_replic=400, mode_compute=4,first_obs=1000,loglinear,smoother,forecast=100,prefilter=0, - mcmc_jumping_covariance='MCMC_jump_covar', + mcmc_jumping_covariance='Trend_loglin_no_prefilt_first_obs_MC_MCMC_jump_covar', filtered_vars, filter_step_ahead = [1,2,4], mh_nblocks=1,mh_jscale=0.3,no_posterior_kernel_density) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglin_no_prefilt_first_obs_MC_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_loglin_no_prefilt_first_obs_MC_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_prefilt_first_obs_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_prefilt_first_obs_MC.mod index 7ed7bb9c86e4ec91524b2782be343cce7371b2aa..775067c8ec75b02d43d346c47a022b7604828d78 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_prefilt_first_obs_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglin_prefilt_first_obs_MC.mod @@ -1,23 +1,23 @@ @#include "../Trend_exp_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=400, +estimation(order=1,datafile='Trend_loglin_prefilt_first_obs_MC_Exp_AR1_trend_data_with_constant',mh_replic=400, mode_compute=4,first_obs=1000,loglinear,smoother,forecast=100,prefilter=1, - mcmc_jumping_covariance='MCMC_jump_covar_prefilter', + mcmc_jumping_covariance='Trend_loglin_prefilt_first_obs_MC_MCMC_jump_covar_prefilter', filtered_vars, filter_step_ahead = [1,2,4], mh_nblocks=1,mh_jscale=1e-4,no_posterior_kernel_density) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglin_prefilt_first_obs_MC_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params_prefilter'); +loaded_par=load('Trend_loglin_prefilt_first_obs_MC_orig_params_prefilter'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end -loaded_par_full=load('orig_params'); +loaded_par_full=load('Trend_loglin_prefilt_first_obs_MC_orig_params'); y_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_y',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_y',loaded_par_full.param_names,'exact')); p_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_p',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_p',loaded_par_full.param_names,'exact')); diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_no_prefilter_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_no_prefilter_MC.mod index 33edf99a1fdf82b180a9848063c3290481a3994c..9353109a5ccf05e0fdd7a04133ef9b6d07994aef 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_no_prefilter_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_no_prefilter_MC.mod @@ -1,17 +1,17 @@ @#include "../Trend_exp_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=400, +estimation(order=1,datafile='Trend_loglinear_no_prefilter_MC_Exp_AR1_trend_data_with_constant',mh_replic=400, mode_compute=4,first_obs=1,loglinear,diffuse_filter,smoother,forecast=100,prefilter=0, - mcmc_jumping_covariance='MCMC_jump_covar', + mcmc_jumping_covariance='Trend_loglinear_no_prefilter_MC_MCMC_jump_covar', filtered_vars, filter_step_ahead = [1,2,4], mh_nblocks=1,mh_jscale=0.3) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglinear_no_prefilter_MC_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_loglinear_no_prefilter_MC_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_prefilter_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_prefilter_MC.mod index 191e8c8ea64dd25e00c0f26bfae6728fbeef8f81..0ddcb37426bb5c8b3c9c6323bbf95b93e46fd29c 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_prefilter_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_loglinear_prefilter_MC.mod @@ -1,23 +1,23 @@ @#include "../Trend_exp_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=400, +estimation(order=1,datafile='Trend_loglinear_prefilter_MC_Exp_AR1_trend_data_with_constant',mh_replic=400, mode_compute=4,first_obs=1,loglinear,smoother,forecast=100,prefilter=1, - mcmc_jumping_covariance='MCMC_jump_covar_prefilter', + mcmc_jumping_covariance='Trend_loglinear_prefilter_MC_MCMC_jump_covar_prefilter', filtered_vars, filter_step_ahead = [1,2,4], mh_nblocks=1,mh_jscale=1e-4) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglinear_prefilter_MC_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params_prefilter'); +loaded_par=load('Trend_loglinear_prefilter_MC_orig_params_prefilter'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end -loaded_par_full=load('orig_params'); +loaded_par_full=load('Trend_loglinear_prefilter_MC_orig_params'); y_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_y',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_y',loaded_par_full.param_names,'exact')); p_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_p',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_p',loaded_par_full.param_names,'exact')); diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_MC.mod index 5c0b2b984f7c88e36419d671060bc232ac840aa8..8cf321d725acb02595dffb4e00be86f7f49854ad 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_MC.mod @@ -1,17 +1,17 @@ @#include "../Trend_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=400, +estimation(order=1,datafile='Trend_no_prefilter_MC_AR1_trend_data_with_constant',mh_replic=400, mode_compute=4,first_obs=1,smoother,mh_nblocks=1,mh_jscale=0.3, filtered_vars, filter_step_ahead = [1,2,4], - mcmc_jumping_covariance='MCMC_jump_covar',forecast=100,prefilter=0) P_obs Y_obs junk2; + mcmc_jumping_covariance='Trend_no_prefilter_MC_MCMC_jump_covar',forecast=100,prefilter=0) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_no_prefilter_MC_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_no_prefilter_MC_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_first_obs_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_first_obs_MC.mod index 15f487eec4ca235841d54c5a08d729c7f3ac4c01..90a9a76cb702ebd7101619352e5341fd687c4e8a 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_first_obs_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_no_prefilter_first_obs_MC.mod @@ -1,18 +1,18 @@ @#include "../Trend_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant', +estimation(order=1,datafile='Trend_no_prefilter_first_obs_MC_AR1_trend_data_with_constant', mh_replic=400,mode_compute=4,first_obs=1000,smoother,forecast=100,prefilter=0, - mcmc_jumping_covariance='MCMC_jump_covar', + mcmc_jumping_covariance='Trend_no_prefilter_first_obs_MC_MCMC_jump_covar', filtered_vars, filter_step_ahead = [1,2,4], mh_nblocks=1,mh_jscale=0.3,no_posterior_kernel_density) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_no_prefilter_first_obs_MC_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_no_prefilter_first_obs_MC_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_MC.mod index 686b0a56d239913764466ba1d8f433b0bac5ffa5..ba2f88b731264ba63ecd6fb0f3004027ff4001ee 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_MC.mod @@ -1,23 +1,23 @@ @#include "../Trend_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=400,mode_compute=4, +estimation(order=1,datafile='Trend_prefilter_MC_AR1_trend_data_with_constant',mh_replic=400,mode_compute=4, first_obs=1,smoother,prefilter=1, mh_nblocks=1,mh_jscale=1e-4, filtered_vars, filter_step_ahead = [1,2,4], - mcmc_jumping_covariance='MCMC_jump_covar_prefilter',forecast=100) P_obs Y_obs junk2; + mcmc_jumping_covariance='Trend_prefilter_MC_MCMC_jump_covar_prefilter',forecast=100) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_prefilter_MC_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params_prefilter'); +loaded_par=load('Trend_prefilter_MC_orig_params_prefilter'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end -loaded_par_full=load('orig_params'); +loaded_par_full=load('Trend_prefilter_MC_orig_params'); y_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_y',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_y',loaded_par_full.param_names,'exact')); p_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_p',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_p',loaded_par_full.param_names,'exact')); diff --git a/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_first_obs_MC.mod b/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_first_obs_MC.mod index 68b44622c395d50ef2485fed438340b2d5516609..4cfef3cadad5e6629a878f49bcbc55d021b598b7 100644 --- a/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_first_obs_MC.mod +++ b/tests/observation_trends_and_prefiltering/MCMC/Trend_prefilter_first_obs_MC.mod @@ -1,23 +1,23 @@ @#include "../Trend_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=400,mode_compute=4, +estimation(order=1,datafile='Trend_prefilter_first_obs_MC_AR1_trend_data_with_constant',mh_replic=400,mode_compute=4, first_obs=1000,smoother,prefilter=1, mh_nblocks=1,mh_jscale=1e-4, filtered_vars, filter_step_ahead = [1,2,4], - mcmc_jumping_covariance='MCMC_jump_covar_prefilter',forecast=100,no_posterior_kernel_density) P_obs Y_obs junk2; + mcmc_jumping_covariance='Trend_prefilter_first_obs_MC_MCMC_jump_covar_prefilter',forecast=100,no_posterior_kernel_density) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_prefilter_first_obs_MC_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params_prefilter'); +loaded_par=load('Trend_prefilter_first_obs_MC_orig_params_prefilter'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end -loaded_par_full=load('orig_params'); +loaded_par_full=load('Trend_prefilter_first_obs_MC_orig_params'); y_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_y',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_y',loaded_par_full.param_names,'exact')); p_forecast_100_periods=loaded_par_full.orig_params(strmatch('const_p',loaded_par_full.param_names,'exact'))+(options_.first_obs+options_.nobs-1+options_.forecast)*loaded_par_full.orig_params(strmatch('g_p',loaded_par_full.param_names,'exact')); diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter.mod b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter.mod index ed638c1dd3883dec40a2349f58baead9d6cce4cf..b98e24e815cfef472cf0536b4e0aa72dd7397911 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter.mod @@ -1,17 +1,17 @@ @#include "../Trend_exp_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=0, +estimation(order=1,datafile='Trend_loglinear_no_prefilter_Exp_AR1_trend_data_with_constant',mh_replic=0, mode_compute=4,first_obs=1, filtered_vars, filter_step_ahead = [1,2,4], loglinear,smoother,forecast=100,prefilter=0) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglinear_no_prefilter_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_loglinear_no_prefilter_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter_first_obs.mod b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter_first_obs.mod index 86e09466b55d3e1c69231e799b7ebe422c2ff8f7..5451c790420560def55a6114cacd2715d19e0e9d 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter_first_obs.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter_first_obs.mod @@ -1,17 +1,17 @@ @#include "../Trend_exp_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=0, +estimation(order=1,datafile='Trend_loglinear_no_prefilter_first_obs_Exp_AR1_trend_data_with_constant',mh_replic=0, mode_compute=4,first_obs=1000, filtered_vars, filter_step_ahead = [1,2,4], loglinear,smoother,forecast=100,prefilter=0) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglinear_no_prefilter_first_obs_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_loglinear_no_prefilter_first_obs_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter.mod b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter.mod index bc0eff74220f9da8343829a9fcf6de3b6a22a6a6..302c5eb321c685a033cee26a6cdc8d356dc4a44f 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter.mod @@ -1,17 +1,17 @@ @#include "../Trend_exp_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=0,mode_compute=4, +estimation(order=1,datafile='Trend_loglinear_prefilter_Exp_AR1_trend_data_with_constant',mh_replic=0,mode_compute=4, first_obs=1,smoother,loglinear, filtered_vars, filter_step_ahead = [1,2,4], forecast=100,prefilter=1) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglinear_prefilter_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_loglinear_prefilter_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameter estimates do not match') diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter_first_obs.mod b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter_first_obs.mod index 298d9c8480623ff3de8903c040dc1e4aaf5669b4..9ae1f90bb4300baed6f554319f320e675a94fc37 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter_first_obs.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_loglinear_prefilter_first_obs.mod @@ -1,17 +1,17 @@ @#include "../Trend_exp_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='Exp_AR1_trend_data_with_constant',mh_replic=0,mode_compute=4, +estimation(order=1,datafile='Trend_loglinear_prefilter_first_obs_Exp_AR1_trend_data_with_constant',mh_replic=0,mode_compute=4, first_obs=1000,smoother,loglinear, filtered_vars, filter_step_ahead = [1,2,4], forecast=100,prefilter=1) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Trend_loglinear_prefilter_first_obs_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_loglinear_prefilter_first_obs_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameter estimates do not match') diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter.mod b/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter.mod index d7ada7c7b4c274dbfde0fe72d02990068da6e48a..1e617af876bec52c8b5d1d77ed82a19bc821175b 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter.mod @@ -1,16 +1,16 @@ @#include "../Trend_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=0, +estimation(order=1,datafile='Trend_no_prefilter_AR1_trend_data_with_constant',mh_replic=0, mode_compute=4,first_obs=1, filtered_vars, filter_step_ahead = [1,2,4], diffuse_filter,smoother,forecast=100,prefilter=0) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_no_prefilter_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_no_prefilter_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_first_obs.mod b/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_first_obs.mod index a120ee412a7dd9b4c7406d2c6de1159c7392c927..feab481a6d121ae4457db107b769b9cb4e91a6e8 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_first_obs.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_first_obs.mod @@ -1,17 +1,17 @@ @#include "../Trend_model_no_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=0, +estimation(order=1,datafile='Trend_no_prefilter_first_obs_AR1_trend_data_with_constant',mh_replic=0, mode_compute=4,first_obs=1000, filtered_vars, filter_step_ahead = [1,2,4], smoother,forecast=100,prefilter=0) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_no_prefilter_first_obs_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_no_prefilter_first_obs_orig_params'); if max(abs(M_.params-loaded_par.orig_params)./loaded_par.orig_params)>0.03 error('Parameter estimates do not match') end diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_selected_var.mod b/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_selected_var.mod index b64d27fddc0079b964991b4916eed0458978f205..2a25030d0444926afd7eaa7735f4c258cf64426a 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_selected_var.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_no_prefilter_selected_var.mod @@ -63,9 +63,9 @@ estimated_params_init(use_calibration); end; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=0, +estimation(order=1,datafile='Trend_no_prefilter_selected_var_AR1_trend_data_with_constant',mh_replic=0, mode_compute=4,first_obs=1,nobs=1000, filtered_vars, filter_step_ahead = [1,2,4], diffuse_filter,filter_covariance,smoother,forecast=0,prefilter=0,filter_decomposition) P_obs Y_obs junk2; @@ -82,7 +82,7 @@ oo_.UpdatedVariables = []; oo_.SmoothedShocks = []; set_dynare_seed('default'); -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=0, +estimation(order=1,datafile='Trend_no_prefilter_selected_var_AR1_trend_data_with_constant',mh_replic=0, mode_compute=4,first_obs=1,nobs=1000, filtered_vars, filter_step_ahead = [1,2,4], diffuse_filter,smoother,forecast=0,filter_covariance,prefilter=0,filter_decomposition,selected_variables_only) P_obs Y_obs junk2; diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_prefilter.mod b/tests/observation_trends_and_prefiltering/ML/Trend_prefilter.mod index 764184a602c674c7954bef75ed76c30c55b51fd9..e6a73210d78e52d792b2beb8ca5e72a67b9e4e33 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_prefilter.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_prefilter.mod @@ -1,17 +1,17 @@ @#include "../Trend_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname) -estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=0,mode_compute=4, +estimation(order=1,datafile='Trend_prefilter_AR1_trend_data_with_constant',mh_replic=0,mode_compute=4, first_obs=1, filtered_vars, filter_step_ahead = [1,2,4], smoother,forecast=100,prefilter=1) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_prefilter_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_prefilter_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameter estimates do not match') diff --git a/tests/observation_trends_and_prefiltering/ML/Trend_prefilter_first_obs.mod b/tests/observation_trends_and_prefiltering/ML/Trend_prefilter_first_obs.mod index 19483496d7b72e5420083e16299cda4d311f1e12..f9fc52af24d09260623b95075bbb5a4b96293858 100644 --- a/tests/observation_trends_and_prefiltering/ML/Trend_prefilter_first_obs.mod +++ b/tests/observation_trends_and_prefiltering/ML/Trend_prefilter_first_obs.mod @@ -1,18 +1,18 @@ @#include "../Trend_model_prefilter_common.inc" addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -estimation(order=1,datafile='AR1_trend_data_with_constant', +estimation(order=1,datafile='Trend_prefilter_first_obs_AR1_trend_data_with_constant', mh_replic=0,mode_compute=4, filtered_vars, filter_step_ahead = [1,2,4], first_obs=1000,diffuse_filter,smoother,forecast=100,prefilter=1) P_obs Y_obs junk2; -load('AR1_trend_data_with_constant'); +load('Trend_prefilter_first_obs_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Trend_prefilter_first_obs_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameter estimates do not match') diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefil_f_obs_loglin_cal_smoother.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefil_f_obs_loglin_cal_smoother.mod index cbec86f6d26fb3c7480b2df099fa3ad28aab8021..ad67064ffd336bd5e88c3edcb8250096df025e77 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefil_f_obs_loglin_cal_smoother.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefil_f_obs_loglin_cal_smoother.mod @@ -2,15 +2,15 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='Exp_AR1_trend_data_with_constant',prefilter=0,loglinear,first_obs=1000, +calib_smoother(datafile='Tr_no_prefil_f_obs_loglin_cal_smoother_Exp_AR1_trend_data_with_constant',prefilter=0,loglinear,first_obs=1000, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Tr_no_prefil_f_obs_loglin_cal_smoother_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_no_prefil_f_obs_loglin_cal_smoother_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilt_first_obs_cal_smooth.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilt_first_obs_cal_smooth.mod index e9f2c47978685d0001de588c8fe5b66b781eef1d..f5da7ef7dc657129e1ff7773e0b0dc38ed4ed9c0 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilt_first_obs_cal_smooth.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilt_first_obs_cal_smooth.mod @@ -2,16 +2,16 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='AR1_trend_data_with_constant',prefilter=0,first_obs=1000, +calib_smoother(datafile='Tr_no_prefilt_first_obs_cal_smooth_AR1_trend_data_with_constant',prefilter=0,first_obs=1000, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs; -load('AR1_trend_data_with_constant'); +load('Tr_no_prefilt_first_obs_cal_smooth_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_no_prefilt_first_obs_cal_smooth_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_calib_smoother.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_calib_smoother.mod index 2d49952a8da2bacd13ce33b0d3ac24bd7635a524..01cdb3b31263c046b1eb925efb3fb3476daa4243 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_calib_smoother.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_calib_smoother.mod @@ -2,15 +2,15 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='AR1_trend_data_with_constant',prefilter=0, +calib_smoother(datafile='Tr_no_prefilter_calib_smoother_AR1_trend_data_with_constant',prefilter=0, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs; -load('AR1_trend_data_with_constant'); +load('Tr_no_prefilter_calib_smoother_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_no_prefilter_calib_smoother_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_loglin_calib_smoother.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_loglin_calib_smoother.mod index b3c242fd409df23d798fcebddc298f5e83151c1c..ec2bcafdd35933ff71985aa027176607e9e20c39 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_loglin_calib_smoother.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_no_prefilter_loglin_calib_smoother.mod @@ -2,16 +2,16 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='Exp_AR1_trend_data_with_constant',prefilter=0,loglinear, +calib_smoother(datafile='Tr_no_prefilter_loglin_calib_smoother_Exp_AR1_trend_data_with_constant',prefilter=0,loglinear, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Tr_no_prefilter_loglin_calib_smoother_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_no_prefilter_loglin_calib_smoother_orig_params'); if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefil_f_obs_loglin_cal_smoother.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefil_f_obs_loglin_cal_smoother.mod index 16fa8a76d51f618b8841ffa81494c1ab5c4c2b48..59baf74b0788f3738905ae28a24584180c14b102 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefil_f_obs_loglin_cal_smoother.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefil_f_obs_loglin_cal_smoother.mod @@ -2,15 +2,15 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='Exp_AR1_trend_data_with_constant',prefilter=1,loglinear,first_obs=1000, +calib_smoother(datafile='Tr_prefil_f_obs_loglin_cal_smoother_Exp_AR1_trend_data_with_constant',prefilter=1,loglinear,first_obs=1000, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Tr_prefil_f_obs_loglin_cal_smoother_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_prefil_f_obs_loglin_cal_smoother_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilt_first_obs_cal_smooth.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilt_first_obs_cal_smooth.mod index 4c87f01e6db689d925a03bd997c0ac6de652537b..cca9d259a0ee7b10a41afddd0f7d12895ea6a851 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilt_first_obs_cal_smooth.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilt_first_obs_cal_smooth.mod @@ -2,15 +2,15 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='AR1_trend_data_with_constant',prefilter=1,first_obs=1000, +calib_smoother(datafile='Tr_prefilt_first_obs_cal_smooth_AR1_trend_data_with_constant',prefilter=1,first_obs=1000, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs; -load('AR1_trend_data_with_constant'); +load('Tr_prefilt_first_obs_cal_smooth_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_prefilt_first_obs_cal_smooth_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_calib_smoother.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_calib_smoother.mod index 4c5ca5b1a183a88349f4af9f8db8898161b66476..dfe56e7efbef122fb55b6c01de6d3c7cf41ab90c 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_calib_smoother.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_calib_smoother.mod @@ -2,15 +2,15 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='AR1_trend_data_with_constant',prefilter=1, +calib_smoother(datafile='Tr_prefilter_calib_smoother_AR1_trend_data_with_constant',prefilter=1, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs; -load('AR1_trend_data_with_constant'); +load('Tr_prefilter_calib_smoother_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_prefilter_calib_smoother_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_loglin_calib_smoother.mod b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_loglin_calib_smoother.mod index 216741f7dc367308eb344e55f387df2c129f02c7..63576f4ac003ca7c75064b93d6641e8cffdcb689 100644 --- a/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_loglin_calib_smoother.mod +++ b/tests/observation_trends_and_prefiltering/calib_smoother/Tr_prefilter_loglin_calib_smoother.mod @@ -2,15 +2,15 @@ options_.filter_decomposition=1; addpath('..'); -generate_trend_stationary_AR1; +generate_trend_stationary_AR1(M_.fname); -calib_smoother(datafile='Exp_AR1_trend_data_with_constant',prefilter=1,loglinear, +calib_smoother(datafile='Tr_prefilter_loglin_calib_smoother_Exp_AR1_trend_data_with_constant',prefilter=1,loglinear, // filter_decomposition, filtered_vars, filter_step_ahead = [1,2,4]) P_obs Y_obs junk2; -load('Exp_AR1_trend_data_with_constant'); +load('Tr_prefilter_loglin_calib_smoother_Exp_AR1_trend_data_with_constant'); @#include "../Trend_load_data_common.inc" -loaded_par=load('orig_params'); +loaded_par=load('Tr_prefilter_loglin_calib_smoother_orig_params'); if max(abs((M_.params-loaded_par.orig_params([1:4,7:8]))./loaded_par.orig_params([1:4,7:8])))>0.03 error('Parameters do not match') end diff --git a/tests/observation_trends_and_prefiltering/generate_trend_stationary_AR1.m b/tests/observation_trends_and_prefiltering/generate_trend_stationary_AR1.m index e56da7779e271711479be7c034fb0336f87f007e..a2ea9f96d52f2671aec2809fe6e636a2905700cd 100644 --- a/tests/observation_trends_and_prefiltering/generate_trend_stationary_AR1.m +++ b/tests/observation_trends_and_prefiltering/generate_trend_stationary_AR1.m @@ -1,4 +1,4 @@ -function generate_trend_stationary_AR1 +function generate_trend_stationary_AR1(fname) n_periods=10000; rho_y=0.5; rho_p=0.5; @@ -12,17 +12,17 @@ sigma_p=0.001; orig_params=[rho_y rho_p g_y g_p sigma_y sigma_p]'; param_names={'rho_y'; 'rho_p'; 'g_y'; 'g_p'; 'sigma_y'; 'sigma_p'}; -save orig_params_prefilter.mat orig_params param_names +save([fname '_orig_params_prefilter.mat'],'orig_params','param_names') orig_params = [rho_y rho_p g_y g_p const_y const_p sigma_y sigma_p]'; param_names = {'rho_y'; 'rho_p'; 'g_y'; 'g_p'; 'const_y'; 'const_p'; 'sigma_y'; 'sigma_p'}; -save orig_params.mat orig_params param_names +save([fname '_orig_params.mat'],'orig_params','param_names') jumping_covariance=diag([1e-8; 1e-8; 1e-16; 1e-16; 1e-8; 1e-8; 1e-12; 1e-12;])^-1; -save MCMC_jump_covar.mat jumping_covariance +save([fname '_MCMC_jump_covar.mat'],'jumping_covariance'); jumping_covariance=diag([1e-8; 1e-8; 1e-16; 1e-16; 1e-12; 1e-12;])^-1; -save MCMC_jump_covar_prefilter.mat jumping_covariance +save([fname '_MCMC_jump_covar_prefilter.mat'],'jumping_covariance'); %% data without constant log_P=zeros(1,n_periods); @@ -40,7 +40,7 @@ log_Y=log_Y+g_y*(1:n_periods); Y_obs=exp(log_Y); P_obs=exp(log_P); junk2=exp(junk2_orig); -save Exp_AR1_trend_data_no_constant.mat Y_obs P_obs junk2 +save([fname '_Exp_AR1_trend_data_no_constant.mat'],'Y_obs','P_obs','junk2') % % [b_p,~,~,~,stats_p] = regress(log(P_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' log(P_obs(1:end-1)')]); % [b_y,~,~,~,stats_y] = regress(log(Y_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' log(Y_obs(1:end-1)')]); @@ -48,7 +48,7 @@ save Exp_AR1_trend_data_no_constant.mat Y_obs P_obs junk2 Y_obs=log_Y; P_obs=log_P; junk2=junk2_orig; -save AR1_trend_data_no_constant.mat Y_obs P_obs junk2 +save([fname '_AR1_trend_data_no_constant.mat'],'Y_obs','P_obs','junk2') % [b_p,~,~,~,stats_p] = regress((P_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' (P_obs(1:end-1)')]); % [b_y,~,~,~,stats_y] = regress((Y_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' (Y_obs(1:end-1)')]); @@ -69,7 +69,7 @@ log_Y=log_Y+g_y*(1:n_periods); Y_obs=exp(log_Y); P_obs=exp(log_P); junk2=exp(junk2_orig); -save Exp_AR1_trend_data_with_constant.mat Y_obs P_obs junk2 +save([fname '_Exp_AR1_trend_data_with_constant.mat'],'Y_obs','P_obs','junk2') % [b,bint,r,rint,stats] = regress(log(P_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' log(P_obs(1:end-1)')]); % [b,bint,r,rint,stats] = regress(log(Y_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' log(Y_obs(1:end-1)')]); @@ -77,9 +77,7 @@ save Exp_AR1_trend_data_with_constant.mat Y_obs P_obs junk2 Y_obs=log_Y; P_obs=log_P; junk2=junk2_orig; -save AR1_trend_data_with_constant.mat Y_obs P_obs junk2 +save([fname '_AR1_trend_data_with_constant.mat'],'Y_obs','P_obs','junk2') % [b_p,~,~,~,stats_p] = regress((P_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' (P_obs(1:end-1)')]); -% [b_y,~,~,~,stats_y] = regress((Y_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' (Y_obs(1:end-1)')]); - - +% [b_y,~,~,~,stats_y] = regress((Y_obs(2:end))',[ones(n_periods-1,1) (2:n_periods)' (Y_obs(1:end-1)')]); \ No newline at end of file