diff --git a/tests/Makefile.am b/tests/Makefile.am index f4f2ec1637c891023f46b598bb261057d017b5fe..527d4cdd229b172a74fb121ce1e3a72d5d15e593 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1470,7 +1470,8 @@ clean-local: rm -f arima/data1.m arima/data2.m \ k_order_perturbation/*.jnl \ k_order_perturbation/*.mat \ - kalman_filter_smoother/data.mat + kalman_filter_smoother/data_algo.mat \ + kalman_filter_smoother/data_Pinf_Pstar.mat rm -f data_ca1_csv.csv diff --git a/tests/kalman_filter_smoother/algo1.mod b/tests/kalman_filter_smoother/algo1.mod index 95e34daf1d2d9cf494bd9da1aa91fc3b30ae68a2..7cbaf4eb89ed55ffae04a9b31f6754d310af84f2 100644 --- a/tests/kalman_filter_smoother/algo1.mod +++ b/tests/kalman_filter_smoother/algo1.mod @@ -32,7 +32,7 @@ end; varobs dw dx dy z; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -49,8 +49,8 @@ if max(max(abs(err))) > 1e-10; error('Test fails') end; -d=load('data'); +d=load('data_algo'); dat = [d.dw d.dx d.dy d.z]; if max(max(abs(dat(1000:1199,:)-S(:,[2:4 1])))) > 1e-10; error('Test fails'); -end; \ No newline at end of file +end; diff --git a/tests/kalman_filter_smoother/algo2.mod b/tests/kalman_filter_smoother/algo2.mod index b18eeb42a1763247b3a0eabbe448e1e493be4a25..63fb74c442d0be9facd118a17b452688acad723a 100644 --- a/tests/kalman_filter_smoother/algo2.mod +++ b/tests/kalman_filter_smoother/algo2.mod @@ -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/Output/algo1_mode',kalman_algo=2,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo1/Output/algo1_mode',kalman_algo=2,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -49,7 +49,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.dw d.dx d.dy d.z]; if max(max(abs(dat(1000:1199,:)-S(:,[2:4 1])))) > 1e-10; error('Test fails'); diff --git a/tests/kalman_filter_smoother/algo3.mod b/tests/kalman_filter_smoother/algo3.mod index 4a7b0c668c8e5e8cff87de950263914763a21305..9aa866252e46fb9d6558f7d2ae08603ba73e5970 100644 --- a/tests/kalman_filter_smoother/algo3.mod +++ b/tests/kalman_filter_smoother/algo3.mod @@ -35,7 +35,7 @@ end; varobs w x y; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -52,7 +52,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.w d.x d.y]; if max(max(abs(dat(1000:1199,:)-S(:,[7:9])))) > 1e-10; error('Test fails'); diff --git a/tests/kalman_filter_smoother/algo4.mod b/tests/kalman_filter_smoother/algo4.mod index 7d26340ce74234762dab5dab5c4dd74246183f9d..4ebd8bd45931daabef4875baecc69cce755b21b0 100644 --- a/tests/kalman_filter_smoother/algo4.mod +++ b/tests/kalman_filter_smoother/algo4.mod @@ -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/Output/algo3_mode',diffuse_filter,kalman_algo=4,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter,kalman_algo=4,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -52,7 +52,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.w d.x d.y]; if max(max(abs(dat(1000:1199,:)-S(:,[7:9])))) > 1e-10; error('Test fails'); diff --git a/tests/kalman_filter_smoother/algo4a.mod b/tests/kalman_filter_smoother/algo4a.mod index 28c8b6511483f58355c4e00d28da4cf95535507e..0ee94e30f633929d0d64487f08ac6c8205175fd0 100644 --- a/tests/kalman_filter_smoother/algo4a.mod +++ b/tests/kalman_filter_smoother/algo4a.mod @@ -33,8 +33,8 @@ end; varobs dw dx y z; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter); -//estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter); +//estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter); //checking smoother consistency X = oo_.SmoothedVariables; @@ -51,7 +51,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.dw d.dx d.y d.z]; if max(max(abs(dat(1000:1199,:)-S(:,[2 3 7 1])))) > 1e-10; error('Test fails'); diff --git a/tests/kalman_filter_smoother/algo4b.mod b/tests/kalman_filter_smoother/algo4b.mod index 0e6c6da92597e3cf6d001ac48e2269cd652400be..568484afe0dcd29581a532337cfebe861c1f344d 100644 --- a/tests/kalman_filter_smoother/algo4b.mod +++ b/tests/kalman_filter_smoother/algo4b.mod @@ -33,8 +33,8 @@ end; varobs dw dx y z; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,smoothed_state_uncertainty); -//estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,smoothed_state_uncertainty); +//estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algo3/Output/algo3_mode',diffuse_filter); //checking smoother consistency X = oo_.SmoothedVariables; @@ -51,7 +51,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.dw d.dx d.y d.z]; if max(max(abs(dat(1000:1199,:)-S(:,[2 3 7 1])))) > 1e-10; error('Test fails'); diff --git a/tests/kalman_filter_smoother/algoH1.mod b/tests/kalman_filter_smoother/algoH1.mod index 200dec37f2bbbd4436cd120ec87dd8a9e5b186db..7a852b97917553c7d41ce620862104e788e595a2 100644 --- a/tests/kalman_filter_smoother/algoH1.mod +++ b/tests/kalman_filter_smoother/algoH1.mod @@ -34,7 +34,7 @@ end; varobs dw dx dy z; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,filtered_vars,smoothed_state_uncertainty); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -51,7 +51,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.dw d.dx d.dy d.z]; X = oo_.SmoothedMeasurementErrors; ME = [X.dw X.dx X.dy X.z]; diff --git a/tests/kalman_filter_smoother/algoH2.mod b/tests/kalman_filter_smoother/algoH2.mod index 39f750995b5af24388a31b36db9749b1a98bdfaa..e25801ba39cbc9f5c197223bbc0b7823166c7ebe 100644 --- a/tests/kalman_filter_smoother/algoH2.mod +++ b/tests/kalman_filter_smoother/algoH2.mod @@ -34,8 +34,8 @@ 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/Output/algoH1_mode',kalman_algo=2,filtered_vars,smoothed_state_uncertainty); +//estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,kalman_algo=2); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file='algoH1/Output/algoH1_mode',kalman_algo=2,filtered_vars,smoothed_state_uncertainty); //checking smoother consistency X = oo_.SmoothedVariables; @@ -52,7 +52,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.dw d.dx d.dy d.z]; X = oo_.SmoothedMeasurementErrors; ME = [X.dw X.dx X.dy X.z]; diff --git a/tests/kalman_filter_smoother/algoH3.mod b/tests/kalman_filter_smoother/algoH3.mod index bc4d77436f6684cc842c6b0beef61947d59c328e..b25dce072d66abc34f7ba80d8f4a5973a829861e 100644 --- a/tests/kalman_filter_smoother/algoH3.mod +++ b/tests/kalman_filter_smoother/algoH3.mod @@ -37,7 +37,7 @@ end; varobs w x y; -estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,smoothed_state_uncertainty); +estimation(datafile=data_algo,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,smoothed_state_uncertainty); stoch_simul(irf=0); @@ -56,7 +56,7 @@ if max(max(abs(err))) > 1e-10; error('Test fails'); end; -d=load('data'); +d=load('data_algo'); dat = [d.w d.x d.y]; X = oo_.SmoothedMeasurementErrors; ME = [X.w X.x X.y]; diff --git a/tests/kalman_filter_smoother/gen_data.mod b/tests/kalman_filter_smoother/gen_data.mod index e8afaad769acbc209b71ed220685a107eeec7056..1c44380a0fd47e456df934f54929babfa4e3a66d 100644 --- a/tests/kalman_filter_smoother/gen_data.mod +++ b/tests/kalman_filter_smoother/gen_data.mod @@ -35,4 +35,4 @@ stoch_simul(periods=2000,irf=0); plot([w x y z]); -save data.mat w x y z dw dx dy; \ No newline at end of file +save data_algo.mat w x y z dw dx dy; diff --git a/tests/kalman_filter_smoother/test_compute_Pinf_Pstar.mod b/tests/kalman_filter_smoother/test_compute_Pinf_Pstar.mod index 3836769c7a7972240def3629a7465a54a0bd4d32..24f2db61515f1880e7ec57f9fa9434316667ee01 100644 --- a/tests/kalman_filter_smoother/test_compute_Pinf_Pstar.mod +++ b/tests/kalman_filter_smoother/test_compute_Pinf_Pstar.mod @@ -91,7 +91,7 @@ varobs v1, v2, v3; options_.qz_criterium = 1+1e-6; -calib_smoother(datafile=Data,diffuse_filter); +calib_smoother(datafile=data_Pinf_Pstar,diffuse_filter); mf = bayestopt_.smoother_var_list(bayestopt_.smoother_mf); Q = M_.Sigma_e; diff --git a/tests/kalman_filter_smoother/test_compute_Pinf_Pstar_data.mod b/tests/kalman_filter_smoother/test_compute_Pinf_Pstar_data.mod index 5652b7a2804c3d7ac8b68baa7e0bcc5132647912..e3032458d9f45da70ad0159684c8d1eb777dfd44 100644 --- a/tests/kalman_filter_smoother/test_compute_Pinf_Pstar_data.mod +++ b/tests/kalman_filter_smoother/test_compute_Pinf_Pstar_data.mod @@ -86,4 +86,4 @@ end; stoch_simul(order=1,irf=20,periods=500); -save Data.mat v1 v2 v3; +save data_Pinf_Pstar.mat v1 v2 v3;