correcting tests

time-shift
Michel Juillard 2011-11-03 11:14:37 +01:00
parent d6cff06535
commit cfb57feff5
7 changed files with 23 additions and 15 deletions

View File

@ -102,6 +102,7 @@ MODFILES = \
ms-sbvar/test_upper_cholesky_nc.mod \
ms-sbvar/test_ms_variances.mod \
ms-sbvar/test_ms_variances_repeated_runs.mod \
kalman_filter_smoother/gen_data.mod \
kalman_filter_smoother/algo1.mod \
kalman_filter_smoother/algo2.mod \
kalman_filter_smoother/algo3.mod \

View File

@ -32,7 +32,7 @@ end;
varobs dw dx dy z;
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo1_mode);
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,filtered_vars);
//checking smoother consistency
X = oo_.SmoothedVariables;
@ -47,7 +47,7 @@ for t=2:200;
end;
if max(max(abs(err))) > 1e-10;
error('Test fails')
endif;
end;
d=load('data');
dat = [d.dw d.dx d.dy d.z];

View File

@ -32,7 +32,7 @@ end;
varobs dw dx dy z;
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo1_mode,kalman_algo=2);
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo1_mode,kalman_algo=2,filtered_vars);
//checking smoother consistency
X = oo_.SmoothedVariables;

View File

@ -35,7 +35,7 @@ end;
varobs w x y;
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter);
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,filtered_vars);
//checking smoother consistency
X = oo_.SmoothedVariables;

View File

@ -35,7 +35,7 @@ end;
varobs w x y;
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo3_mode,diffuse_filter,kalman_algo=4);
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo3_mode,diffuse_filter,kalman_algo=4,filtered_vars);
//checking smoother consistency
X = oo_.SmoothedVariables;

View File

@ -35,7 +35,7 @@ end;
varobs dw dx dy z;
//estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,kalman_algo=2);
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algoH1_mode,kalman_algo=2);
estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algoH1_mode,kalman_algo=2,filtered_vars);
//checking smoother consistency
X = oo_.SmoothedVariables;
@ -48,13 +48,17 @@ err = zeros(6,200);
for t=2:200;
err(:,t) = S(t,:)'-A*S(t-1,:)'-B*E(t,:)';
end;
disp(max(max(abs(err))));
if max(max(abs(err))) > 1e-10;
error('Test fails');
end;
d=load('data');
dat = [d.dw d.dx d.dy d.z];
X = oo_.SmoothedMeasurementErrors;
ME = [X.dw X.dx X.dy X.z];
disp(max(max(abs(dat(1000:1199,:)-S(:,[2:4 1])-ME))));
if max(max(abs(dat(1000:1199,:)-S(:,[2:4 1])-ME))) > 1e-10;
error('Test fails');
end;
o1 = load('algoH1_results');
obj_endo={'SmoothedVariables'; 'FilteredVariables'; 'UpdatedVariables'};
@ -68,7 +72,9 @@ for i=1:nobj_endo;
var2 = eval(['oo_.' obj_endo{i} '.' M_.endo_names(j,:)]);
err_endo(:,j) = var1-var2;
end;
disp(max(max(abs(err_endo))));
if max(max(abs(err_endo))) > 1e-10;
error('Test fails');
end;
end;
@ -80,8 +86,11 @@ for i=1:nobj_exo;
var2 = eval(['oo_.' obj_exo{i} '.' M_.exo_names(j,:)]);
err_exo(:,j,i) = var1 - var2;
end;
disp(max(max(abs(err_exo))));
if max(max(abs(err_exo))) > 1e-10;
error('Test fails');
end;
end;
disp(max(max(max(abs(err_exo)))));
disp(max(max(abs(o1.oo_.SmoothedMeasurementErrors.z - oo_.SmoothedMeasurementErrors.z))));
if max(max(abs(o1.oo_.SmoothedMeasurementErrors.z - oo_.SmoothedMeasurementErrors.z))) > 1e-10;
error('Test fails');
end;

View File

@ -55,9 +55,7 @@ var e_a; stderr 0.014;
var e_m; stderr 0.005;
end;
unit_root_vars P_obs Y_obs;
steady;
steady(nocheck);
check;