2015-05-19 17:18:47 +02:00
|
|
|
@#include "../Trend_model_prefilter_common.inc"
|
|
|
|
|
2016-03-31 19:57:16 +02:00
|
|
|
addpath('..');
|
|
|
|
generate_trend_stationary_AR1;
|
|
|
|
|
2016-04-12 14:58:11 +02:00
|
|
|
estimation(order=1,datafile='AR1_trend_data_with_constant',mh_replic=400,mode_compute=4,
|
2015-05-19 17:18:47 +02:00
|
|
|
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) P_obs Y_obs junk2;
|
|
|
|
|
2016-03-31 19:57:16 +02:00
|
|
|
load('AR1_trend_data_with_constant');
|
2015-05-19 17:18:47 +02:00
|
|
|
@#include "../Trend_load_data_common.inc"
|
|
|
|
|
2016-03-31 19:57:16 +02:00
|
|
|
loaded_par=load('orig_params_prefilter');
|
2015-05-19 17:18:47 +02:00
|
|
|
|
|
|
|
if max(abs((M_.params-loaded_par.orig_params)./loaded_par.orig_params))>0.03
|
|
|
|
error('Parameter estimates do not match')
|
|
|
|
end
|
2016-03-31 19:57:16 +02:00
|
|
|
loaded_par_full=load('orig_params');
|
2015-05-19 17:18:47 +02:00
|
|
|
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'));
|
|
|
|
|
|
|
|
@#include "../Trend_diagnostics_MCMC_common.inc"
|