From 2125d82cae3e83c979fec03e5d023c2cf0af8096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Fri, 17 Mar 2017 18:10:00 +0100 Subject: [PATCH] Adapted integration tests to ea49f971e58a4b40b422d06d808d863124092ef4. FilteredVariablesKStepAheadVariances is computed and saved iff filter_covariance option is used in estimation command. --- .../check_variable_dimensions/fs2000_ML.mod | 6 +++--- .../ML/Trend_no_prefilter_selected_var.mod | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/kalman_filter_smoother/check_variable_dimensions/fs2000_ML.mod b/tests/kalman_filter_smoother/check_variable_dimensions/fs2000_ML.mod index 6b396682c..b333d7ff0 100644 --- a/tests/kalman_filter_smoother/check_variable_dimensions/fs2000_ML.mod +++ b/tests/kalman_filter_smoother/check_variable_dimensions/fs2000_ML.mod @@ -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 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 d785da2ab..b64d27fdd 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 @@ -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