From 2c879cc64c9e33428b39234c42a0c64986dc75a6 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Fri, 18 Nov 2022 22:04:07 +0100 Subject: [PATCH 1/2] compute_trend_coefficients.m: fix header --- matlab/compute_trend_coefficients.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/compute_trend_coefficients.m b/matlab/compute_trend_coefficients.m index 48f08bbaf..2dbed2ae2 100644 --- a/matlab/compute_trend_coefficients.m +++ b/matlab/compute_trend_coefficients.m @@ -1,5 +1,5 @@ function [trend_addition, trend_coeff]=compute_trend_coefficients(M_,DynareOptions,nvarobs,ntobs) -% [trend_addition, trend_coeff]=compute_trend_coefficients(DynareOptions,nvarobs,ntobs) +% [trend_addition, trend_coeff]=compute_trend_coefficients(M_,DynareOptions,nvarobs,ntobs) % Computes the trend coefficiencts and the trend, accounting for % prefiltering % From 801baacc8c7b0cd065ba1a27ec7569dc71539933 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Fri, 18 Nov 2022 22:04:58 +0100 Subject: [PATCH 2/2] fs2000_smoother_only_ns.mod: check for correctness of smoothed observables Related to 178e892e --- .../fs2000_smoother_only_ns.mod | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/kalman_filter_smoother/fs2000_smoother_only_ns.mod b/tests/kalman_filter_smoother/fs2000_smoother_only_ns.mod index 59e1980f5..5c49531bd 100644 --- a/tests/kalman_filter_smoother/fs2000_smoother_only_ns.mod +++ b/tests/kalman_filter_smoother/fs2000_smoother_only_ns.mod @@ -107,9 +107,24 @@ P_obs (log(mst)-gam); Y_obs (gam); end; +fsdat_simul; +P_obs_data=log(P_obs(1:192)); +Y_obs_data=log(Y_obs(1:192)); + estimation(order=1, datafile=fsdat_simul, mode_compute=0,nobs=192, loglinear,diffuse_filter, smoother,smoothed_state_uncertainty) m P c e W R k d n l gy_obs gp_obs y dA; +if max(abs(oo_.SmoothedVariables.Y_obs-Y_obs_data))>1e-10 || max(abs(oo_.SmoothedVariables.P_obs-P_obs_data))>1e-10 + error('Smoothed observables do not match') +end estimation(order=1, datafile=fsdat_simul, mode_compute=0,nobs=192, loglinear,diffuse_filter, smoother,kalman_algo=3,smoothed_state_uncertainty) m P c e W R k d n l gy_obs gp_obs y dA; +if max(abs(oo_.SmoothedVariables.Y_obs-Y_obs_data))>1e-10 || max(abs(oo_.SmoothedVariables.P_obs-P_obs_data))>1e-10 + error('Smoothed observables do not match') +end estimation(order=1, datafile=fsdat_simul, mode_compute=0,nobs=192, loglinear,diffuse_filter, smoother,kalman_algo=4,smoothed_state_uncertainty) m P c e W R k d n l gy_obs gp_obs y dA; +if max(abs(oo_.SmoothedVariables.Y_obs-Y_obs_data))>1e-10 || max(abs(oo_.SmoothedVariables.P_obs-P_obs_data))>1e-10 + error('Smoothed observables do not match') +end + + /* * The following lines were used to generate the data file. If you want to