Adapted integration tests to ea49f971e58a4b40b422d06d808d863124092ef4.

FilteredVariablesKStepAheadVariances is computed and saved iff
filter_covariance option is used in estimation command.
time-shift
Stéphane Adjemian (Charybdis) 2017-03-17 18:10:00 +01:00
parent a68e958cf7
commit 2125d82cae
2 changed files with 6 additions and 6 deletions

View File

@ -116,7 +116,7 @@ corr e_m, e_a, 0;
stderr gp_obs, 0.01;
end;
options_.prior_trunc=0;
estimation(order=1,datafile='../fsdat_simul', nobs=192, loglinear, forecast=8,smoother,filtered_vars,filter_step_ahead=[1,2,4],filter_decomposition,selected_variables_only) m P c e W R k d y gy_obs;
estimation(order=1,datafile='../fsdat_simul', nobs=192, loglinear, forecast=8,smoother,filter_covariance,filtered_vars,filter_step_ahead=[1,2,4],filter_decomposition,selected_variables_only) m P c e W R k d y gy_obs;
if size(oo_.FilteredVariablesKStepAhead,3)~=(options_.nobs+max(options_.filter_step_ahead)) || ...
@ -124,8 +124,8 @@ if size(oo_.FilteredVariablesKStepAhead,3)~=(options_.nobs+max(options_.filter_s
error('FilteredVariablesKStepAhead has the wrong length')
end
if size(oo_.FilteredVariablesKStepAheadVariances,4)~=(options_.nobs+max(options_.filter_step_ahead)) || ...
size(oo_.FilteredVariablesKStepAheadVariances,1)~=(length(options_.filter_step_ahead))
if options_.filter_covariance && (size(oo_.FilteredVariablesKStepAheadVariances,4)~=(options_.nobs+max(options_.filter_step_ahead)) || ...
size(oo_.FilteredVariablesKStepAheadVariances,1)~=(length(options_.filter_step_ahead)))
error('FilteredVariablesKStepAhead has the wrong length')
end

View File

@ -68,7 +68,7 @@ generate_trend_stationary_AR1;
estimation(order=1,datafile='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,prefilter=0,filter_decomposition) P_obs Y_obs junk2;
diffuse_filter,filter_covariance,smoother,forecast=0,prefilter=0,filter_decomposition) P_obs Y_obs junk2;
%Test selected_variables_only option
oo_all_variables=oo_;
@ -85,7 +85,7 @@ set_dynare_seed('default');
estimation(order=1,datafile='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,prefilter=0,filter_decomposition,selected_variables_only) P_obs Y_obs junk2;
diffuse_filter,smoother,forecast=0,filter_covariance,prefilter=0,filter_decomposition,selected_variables_only) P_obs Y_obs junk2;
% do checks
@ -118,7 +118,7 @@ if max(max(max(abs(oo_.FilteredVariablesKStepAhead-oo_all_variables.FilteredVari
error('FilteredVariablesKStepAhead is wrong')
end
if max(max(max(max(abs(oo_.FilteredVariablesKStepAheadVariances-oo_all_variables.FilteredVariablesKStepAheadVariances(:,[Y_pos;P_pos;junk2_pos],[Y_pos;P_pos;junk2_pos],:))))))>1e-8
if options_.filter_covariance && max(max(max(max(abs(oo_.FilteredVariablesKStepAheadVariances-oo_all_variables.FilteredVariablesKStepAheadVariances(:,[Y_pos;P_pos;junk2_pos],[Y_pos;P_pos;junk2_pos],:))))))>1e-8
error('FilteredVariablesKStepAheadVariances is wrong')
end