Factorize Kalman filter unit tests
parent
36ccec75ce
commit
06ff0c7bb6
|
@ -443,6 +443,12 @@ observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter_first_obs.m.
|
|||
observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter_first_obs.o.trs: observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter.o.trs
|
||||
observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter.m.trs: observation_trends_and_prefiltering/ML/Trend_no_prefilter.m.trs
|
||||
observation_trends_and_prefiltering/ML/Trend_loglinear_no_prefilter.o.trs: observation_trends_and_prefiltering/ML/Trend_no_prefilter.o.trs
|
||||
kalman/likelihood_from_dynare/fs2000_corr_ME.m.trs: kalman/likelihood_from_dynare/fs2000_uncorr_ME.m.trs
|
||||
kalman/likelihood_from_dynare/fs2000_corr_ME.o.trs: kalman/likelihood_from_dynare/fs2000_uncorr_ME.o.trs
|
||||
kalman/likelihood_from_dynare/fs2000_uncorr_ME_missing.m.trs: kalman/likelihood_from_dynare/fs2000_uncorr_ME.m.trs
|
||||
kalman/likelihood_from_dynare/fs2000_uncorr_ME_missing.o.trs: kalman/likelihood_from_dynare/fs2000_uncorr_ME.o.trs
|
||||
kalman/likelihood_from_dynare/fs2000_corr_ME_missing.m.trs: kalman/likelihood_from_dynare/fs2000_uncorr_ME.m.trs
|
||||
kalman/likelihood_from_dynare/fs2000_corr_ME_missing.o.trs: kalman/likelihood_from_dynare/fs2000_uncorr_ME.o.trs
|
||||
|
||||
lmmcp/sw_newton.m.trs: lmmcp/sw_lmmcp.m.trs
|
||||
lmmcp/sw_newton.o.trs: lmmcp/sw_lmmcp.o.trs
|
||||
|
@ -531,12 +537,11 @@ EXTRA_DIST = \
|
|||
ms-sbvar/archive-files/specification_2v2c.dat \
|
||||
recursive/data_ca1.m \
|
||||
kalman_filter_smoother/fsdat_simul.m \
|
||||
kalman/likelihood_from_dynare/fsdat_simul_corr_ME_missing.m \
|
||||
kalman/likelihood_from_dynare/fsdat_simul_uncorr_ME.m \
|
||||
kalman/likelihood_from_dynare/fsdat_simul_uncorr_ME_missing.m \
|
||||
kalman/lik_init/fs2000_common.inc \
|
||||
kalman/lik_init/fs2000_ns_common.inc \
|
||||
kalman_filter_smoother/compare_results_simulation/fsdat_simul_logged.m \
|
||||
kalman/likelihood_from_dynare/fs2000_model.inc \
|
||||
kalman/likelihood_from_dynare/fs2000_estimation_check.inc \
|
||||
identification/kim/kim2_steadystate.m \
|
||||
identification/as2007/as2007_steadystate.m \
|
||||
estimation/fsdat_simul.m \
|
||||
|
|
|
@ -1,104 +1,4 @@
|
|||
/*
|
||||
* This file is based on the cash in advance model described
|
||||
* Frank Schorfheide (2000): "Loss function-based evaluation of DSGE models",
|
||||
* Journal of Applied Econometrics, 15(6), 645-670.
|
||||
*
|
||||
* The equations are taken from J. Nason and T. Cogley (1994): "Testing the
|
||||
* implications of long-run neutrality for monetary business cycle models",
|
||||
* Journal of Applied Econometrics, 9, S37-S70.
|
||||
* Note that there is an initial minus sign missing in equation (A1), p. S63.
|
||||
*
|
||||
* This implementation was written by Michel Juillard. Please note that the
|
||||
* following copyright notice only applies to this Dynare implementation of the
|
||||
* model.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004-2013 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
* Dynare is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Dynare is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var m P c e W R k d n l gy_obs gp_obs y dA;
|
||||
varexo e_a e_m;
|
||||
|
||||
parameters alp bet gam mst rho psi del theta;
|
||||
|
||||
alp = 0.33;
|
||||
bet = 0.99;
|
||||
gam = 0.003;
|
||||
mst = 1.011;
|
||||
rho = 0.7;
|
||||
psi = 0.787;
|
||||
del = 0.02;
|
||||
theta=0;
|
||||
|
||||
model;
|
||||
dA = exp(gam+e_a);
|
||||
log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
|
||||
W = l/n;
|
||||
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
|
||||
R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
|
||||
c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
|
||||
P*c = m;
|
||||
m-1+d = l;
|
||||
e = exp(e_a);
|
||||
y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
|
||||
gy_obs = dA*y/y(-1);
|
||||
gp_obs = (P/P(-1))*m(-1)/dA;
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
dA = exp(gam);
|
||||
gst = 1/dA;
|
||||
m = mst;
|
||||
khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
|
||||
xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
|
||||
nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
|
||||
n = xist/(nust+xist);
|
||||
P = xist + nust;
|
||||
k = khst*n;
|
||||
|
||||
l = psi*mst*n/( (1-psi)*(1-n) );
|
||||
c = mst/P;
|
||||
d = l - mst + 1;
|
||||
y = k^alp*n^(1-alp)*gst^alp;
|
||||
R = mst/bet;
|
||||
W = l/n;
|
||||
ist = y-c;
|
||||
q = 1 - d;
|
||||
|
||||
e = 1;
|
||||
|
||||
gp_obs = m/dA;
|
||||
gy_obs = dA;
|
||||
end;
|
||||
|
||||
varobs gp_obs gy_obs;
|
||||
|
||||
shocks;
|
||||
var e_a; stderr 0.014;
|
||||
var e_m; stderr 0.005;
|
||||
corr gy_obs,gp_obs = 0.5;
|
||||
end;
|
||||
|
||||
steady;
|
||||
|
||||
@#include "fs2000_model.inc"
|
||||
|
||||
estimated_params;
|
||||
alp, 0.356;
|
||||
|
@ -112,57 +12,7 @@ stderr gy_obs, 1;
|
|||
corr gp_obs, gy_obs,0;
|
||||
end;
|
||||
|
||||
options_.TeX=1;
|
||||
options_.debug=1;
|
||||
@#define mode_file_name="fs2000_corr_ME_mode"
|
||||
@#define data_file_name="fsdat_simul_corr_ME"
|
||||
|
||||
%%default
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=0,mode_compute=4,order=1,datafile='../../fs2000/fsdat_simul',smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_0=oo_.likelihood_at_initial_parameters;
|
||||
%%Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=1,mode_file=fs2000_corr_ME_mode,mode_compute=0,order=1,datafile='../../fs2000/fsdat_simul',smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_1=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,1)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,1)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,1)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=3,mode_file=fs2000_corr_ME_mode,mode_compute=0,order=1,datafile='../../fs2000/fsdat_simul',smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_3=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,3)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,3)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,3)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=2,mode_file=fs2000_corr_ME_mode,mode_compute=0,datafile='../../fs2000/fsdat_simul',smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_2=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,2)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,2)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,2)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=4,mode_file=fs2000_corr_ME_mode,mode_compute=0,datafile='../../fs2000/fsdat_simul',smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_4=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,4)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,4)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,4)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
if max(max(abs(SmoothedMeasurementErrors-repmat(SmoothedMeasurementErrors(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedMeasurementErrors do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedShocks-repmat(SmoothedShocks(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedShocks do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedVariables-repmat(SmoothedVariables(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedVariables do not match')
|
||||
end
|
||||
|
||||
if max(abs([fval_algo_2,fval_algo_3,fval_algo_4]-fval_algo_1))>1e-6
|
||||
error('Likelihoods do not match')
|
||||
end
|
||||
@#include "fs2000_estimation_check.inc"
|
|
@ -1,104 +1,4 @@
|
|||
/*
|
||||
* This file is based on the cash in advance model described
|
||||
* Frank Schorfheide (2000): "Loss function-based evaluation of DSGE models",
|
||||
* Journal of Applied Econometrics, 15(6), 645-670.
|
||||
*
|
||||
* The equations are taken from J. Nason and T. Cogley (1994): "Testing the
|
||||
* implications of long-run neutrality for monetary business cycle models",
|
||||
* Journal of Applied Econometrics, 9, S37-S70.
|
||||
* Note that there is an initial minus sign missing in equation (A1), p. S63.
|
||||
*
|
||||
* This implementation was written by Michel Juillard. Please note that the
|
||||
* following copyright notice only applies to this Dynare implementation of the
|
||||
* model.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004-2013 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
* Dynare is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Dynare is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var m P c e W R k d n l gy_obs gp_obs y dA;
|
||||
varexo e_a e_m;
|
||||
|
||||
parameters alp bet gam mst rho psi del theta;
|
||||
|
||||
alp = 0.33;
|
||||
bet = 0.99;
|
||||
gam = 0.003;
|
||||
mst = 1.011;
|
||||
rho = 0.7;
|
||||
psi = 0.787;
|
||||
del = 0.02;
|
||||
theta=0;
|
||||
|
||||
model;
|
||||
dA = exp(gam+e_a);
|
||||
log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
|
||||
W = l/n;
|
||||
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
|
||||
R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
|
||||
c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
|
||||
P*c = m;
|
||||
m-1+d = l;
|
||||
e = exp(e_a);
|
||||
y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
|
||||
gy_obs = dA*y/y(-1);
|
||||
gp_obs = (P/P(-1))*m(-1)/dA;
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
dA = exp(gam);
|
||||
gst = 1/dA;
|
||||
m = mst;
|
||||
khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
|
||||
xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
|
||||
nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
|
||||
n = xist/(nust+xist);
|
||||
P = xist + nust;
|
||||
k = khst*n;
|
||||
|
||||
l = psi*mst*n/( (1-psi)*(1-n) );
|
||||
c = mst/P;
|
||||
d = l - mst + 1;
|
||||
y = k^alp*n^(1-alp)*gst^alp;
|
||||
R = mst/bet;
|
||||
W = l/n;
|
||||
ist = y-c;
|
||||
q = 1 - d;
|
||||
|
||||
e = 1;
|
||||
|
||||
gp_obs = m/dA;
|
||||
gy_obs = dA;
|
||||
end;
|
||||
|
||||
varobs gp_obs gy_obs;
|
||||
|
||||
shocks;
|
||||
var e_a; stderr 0.014;
|
||||
var e_m; stderr 0.005;
|
||||
corr gy_obs,gp_obs = 0.5;
|
||||
end;
|
||||
|
||||
steady;
|
||||
|
||||
@#include "fs2000_model.inc"
|
||||
|
||||
estimated_params;
|
||||
alp, 0.356;
|
||||
|
@ -112,57 +12,7 @@ stderr gy_obs, 1;
|
|||
corr gp_obs, gy_obs,0;
|
||||
end;
|
||||
|
||||
options_.TeX=1;
|
||||
options_.debug=1;
|
||||
@#define mode_file_name="fs2000_corr_ME_missing_mode"
|
||||
@#define data_file_name="fsdat_simul_corr_ME_missing"
|
||||
|
||||
%%default
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=0,mode_compute=4,order=1,datafile=fsdat_simul_corr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_0=oo_.likelihood_at_initial_parameters;
|
||||
%%Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=1,mode_file=fs2000_corr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_corr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_1=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,1)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,1)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,1)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=3,mode_file=fs2000_corr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_corr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_3=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,3)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,3)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,3)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=2,mode_file=fs2000_corr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_corr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_2=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,2)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,2)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,2)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=4,mode_file=fs2000_corr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_corr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_4=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,4)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,4)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,4)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
if max(max(abs(SmoothedMeasurementErrors-repmat(SmoothedMeasurementErrors(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedMeasurementErrors do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedShocks-repmat(SmoothedShocks(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedShocks do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedVariables-repmat(SmoothedVariables(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedVariables do not match')
|
||||
end
|
||||
|
||||
if max(abs([fval_algo_2,fval_algo_3,fval_algo_4]-fval_algo_1))>1e-6
|
||||
error('Likelihoods do not match')
|
||||
end
|
||||
@#include "fs2000_estimation_check.inc"
|
|
@ -0,0 +1,51 @@
|
|||
%%default
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=0,mode_compute=4,order=1,datafile=@{data_file_name},smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_0=oo_.likelihood_at_initial_parameters;
|
||||
%%Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=1,mode_file=@{mode_file_name},mode_compute=0,order=1,datafile=@{data_file_name},smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_1=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,1)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,1)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,1)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=3,mode_file=@{mode_file_name},mode_compute=0,order=1,datafile=@{data_file_name},smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_3=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,3)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,3)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,3)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=2,mode_file=@{mode_file_name},mode_compute=0,datafile=@{data_file_name},smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_2=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,2)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,2)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,2)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=4,mode_file=@{mode_file_name},mode_compute=0,datafile=@{data_file_name},smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_4=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,4)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,4)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,4)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
if max(max(abs(SmoothedMeasurementErrors-repmat(SmoothedMeasurementErrors(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedMeasurementErrors do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedShocks-repmat(SmoothedShocks(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedShocks do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedVariables-repmat(SmoothedVariables(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedVariables do not match')
|
||||
end
|
||||
|
||||
if max(abs([fval_algo_2,fval_algo_3,fval_algo_4]-fval_algo_1))>1e-6
|
||||
error('Likelihoods do not match')
|
||||
end
|
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* This file is based on the cash in advance model described
|
||||
* Frank Schorfheide (2000): "Loss function-based evaluation of DSGE models",
|
||||
* Journal of Applied Econometrics, 15(6), 645-670.
|
||||
*
|
||||
* The equations are taken from J. Nason and T. Cogley (1994): "Testing the
|
||||
* implications of long-run neutrality for monetary business cycle models",
|
||||
* Journal of Applied Econometrics, 9, S37-S70.
|
||||
* Note that there is an initial minus sign missing in equation (A1), p. S63.
|
||||
*
|
||||
* This implementation was written by Michel Juillard. Please note that the
|
||||
* following copyright notice only applies to this Dynare implementation of the
|
||||
* model.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004-2013 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
* Dynare is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Dynare is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var m P c e W R k d n l gy_obs gp_obs y dA;
|
||||
varexo e_a e_m;
|
||||
|
||||
parameters alp bet gam mst rho psi del theta;
|
||||
|
||||
alp = 0.33;
|
||||
bet = 0.99;
|
||||
gam = 0.003;
|
||||
mst = 1.011;
|
||||
rho = 0.7;
|
||||
psi = 0.787;
|
||||
del = 0.02;
|
||||
theta=0;
|
||||
|
||||
model;
|
||||
dA = exp(gam+e_a);
|
||||
log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
|
||||
W = l/n;
|
||||
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
|
||||
R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
|
||||
c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
|
||||
P*c = m;
|
||||
m-1+d = l;
|
||||
e = exp(e_a);
|
||||
y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
|
||||
gy_obs = dA*y/y(-1);
|
||||
gp_obs = (P/P(-1))*m(-1)/dA;
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
dA = exp(gam);
|
||||
gst = 1/dA;
|
||||
m = mst;
|
||||
khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
|
||||
xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
|
||||
nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
|
||||
n = xist/(nust+xist);
|
||||
P = xist + nust;
|
||||
k = khst*n;
|
||||
|
||||
l = psi*mst*n/( (1-psi)*(1-n) );
|
||||
c = mst/P;
|
||||
d = l - mst + 1;
|
||||
y = k^alp*n^(1-alp)*gst^alp;
|
||||
R = mst/bet;
|
||||
W = l/n;
|
||||
ist = y-c;
|
||||
q = 1 - d;
|
||||
|
||||
e = 1;
|
||||
|
||||
gp_obs = m/dA;
|
||||
gy_obs = dA;
|
||||
end;
|
||||
|
||||
varobs gp_obs gy_obs;
|
||||
|
||||
shocks;
|
||||
var e_a; stderr 0.014;
|
||||
var e_m; stderr 0.005;
|
||||
corr gy_obs,gp_obs = 0.5;
|
||||
end;
|
||||
|
||||
options_.TeX=1;
|
||||
options_.debug=1;
|
||||
|
|
@ -1,119 +1,21 @@
|
|||
/*
|
||||
* This file is based on the cash in advance model described
|
||||
* Frank Schorfheide (2000): "Loss function-based evaluation of DSGE models",
|
||||
* Journal of Applied Econometrics, 15(6), 645-670.
|
||||
*
|
||||
* The equations are taken from J. Nason and T. Cogley (1994): "Testing the
|
||||
* implications of long-run neutrality for monetary business cycle models",
|
||||
* Journal of Applied Econometrics, 9, S37-S70.
|
||||
* Note that there is an initial minus sign missing in equation (A1), p. S63.
|
||||
*
|
||||
* This implementation was written by Michel Juillard. Please note that the
|
||||
* following copyright notice only applies to this Dynare implementation of the
|
||||
* model.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004-2013 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
* Dynare is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Dynare is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var m P c e W R k d n l gy_obs gp_obs y dA;
|
||||
varexo e_a e_m;
|
||||
|
||||
parameters alp bet gam mst rho psi del theta;
|
||||
|
||||
alp = 0.33;
|
||||
bet = 0.99;
|
||||
gam = 0.003;
|
||||
mst = 1.011;
|
||||
rho = 0.7;
|
||||
psi = 0.787;
|
||||
del = 0.02;
|
||||
theta=0;
|
||||
|
||||
model;
|
||||
dA = exp(gam+e_a);
|
||||
log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
|
||||
W = l/n;
|
||||
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
|
||||
R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
|
||||
c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
|
||||
P*c = m;
|
||||
m-1+d = l;
|
||||
e = exp(e_a);
|
||||
y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
|
||||
gy_obs = dA*y/y(-1);
|
||||
gp_obs = (P/P(-1))*m(-1)/dA;
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
dA = exp(gam);
|
||||
gst = 1/dA;
|
||||
m = mst;
|
||||
khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
|
||||
xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
|
||||
nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
|
||||
n = xist/(nust+xist);
|
||||
P = xist + nust;
|
||||
k = khst*n;
|
||||
|
||||
l = psi*mst*n/( (1-psi)*(1-n) );
|
||||
c = mst/P;
|
||||
d = l - mst + 1;
|
||||
y = k^alp*n^(1-alp)*gst^alp;
|
||||
R = mst/bet;
|
||||
W = l/n;
|
||||
ist = y-c;
|
||||
q = 1 - d;
|
||||
|
||||
e = 1;
|
||||
|
||||
gp_obs = m/dA;
|
||||
gy_obs = dA;
|
||||
end;
|
||||
|
||||
varobs gp_obs gy_obs;
|
||||
|
||||
shocks;
|
||||
var e_a; stderr 0.014;
|
||||
var e_m; stderr 0.005;
|
||||
end;
|
||||
|
||||
steady;
|
||||
|
||||
// stoch_simul(periods=200, order=1,irf=0);
|
||||
// temp=oo_.endo_simul;
|
||||
// %add measurement error
|
||||
// oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)+0.05*randn(1,size(oo_.endo_simul,2));
|
||||
// oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)+0.05*randn(1,size(oo_.endo_simul,2));
|
||||
// datatomfile('fsdat_simul_uncorr_ME', char('gy_obs', 'gp_obs'));
|
||||
// oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),[7,199])=NaN;
|
||||
// oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),[151,199])=NaN;
|
||||
// datatomfile('fsdat_simul_uncorr_ME_missing', char('gy_obs', 'gp_obs'));
|
||||
// shock_mat=chol([1 0.5; 0.5 1])*0.05*randn(2,size(oo_.endo_simul,2));
|
||||
// oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)+shock_mat(1,:);
|
||||
// oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)+shock_mat(2,:);
|
||||
// oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),[7,199])=NaN;
|
||||
// oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),[151,199])=NaN;
|
||||
// datatomfile('fsdat_simul_corr_ME_missing', char('gy_obs', 'gp_obs'));
|
||||
@#include "fs2000_model.inc"
|
||||
|
||||
stoch_simul(periods=200, order=1,irf=0);
|
||||
temp=oo_.endo_simul;
|
||||
%add measurement error
|
||||
oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)+0.05*randn(1,size(oo_.endo_simul,2));
|
||||
oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)+0.05*randn(1,size(oo_.endo_simul,2));
|
||||
datatomfile('fsdat_simul_uncorr_ME', char('gy_obs', 'gp_obs'));
|
||||
oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),[7,199])=NaN;
|
||||
oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),[151,199])=NaN;
|
||||
datatomfile('fsdat_simul_uncorr_ME_missing', char('gy_obs', 'gp_obs'));
|
||||
shock_mat=chol([1 0.5; 0.5 1])*0.05*randn(2,size(oo_.endo_simul,2));
|
||||
oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),:)+shock_mat(1,:);
|
||||
oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)=oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),:)+shock_mat(2,:);
|
||||
datatomfile('fsdat_simul_corr_ME', char('gy_obs', 'gp_obs'));
|
||||
oo_.endo_simul(strmatch('gy_obs',M_.endo_names,'exact'),[7,199])=NaN;
|
||||
oo_.endo_simul(strmatch('gp_obs',M_.endo_names,'exact'),[151,199])=NaN;
|
||||
datatomfile('fsdat_simul_corr_ME_missing', char('gy_obs', 'gp_obs'));
|
||||
|
||||
estimated_params;
|
||||
alp, 0.356;
|
||||
|
@ -127,57 +29,7 @@ stderr gy_obs, 1;
|
|||
//corr gp_obs, gy_obs,0;
|
||||
end;
|
||||
|
||||
options_.TeX=1;
|
||||
options_.debug=1;
|
||||
@#define mode_file_name="fs2000_uncorr_ME_mode"
|
||||
@#define data_file_name="fsdat_simul_uncorr_ME"
|
||||
|
||||
%%default
|
||||
estimation(kalman_algo=0,mode_compute=4,order=1,datafile=fsdat_simul_uncorr_ME,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_0=oo_.likelihood_at_initial_parameters;
|
||||
%%Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=1,mode_file=fs2000_uncorr_ME_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_1=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,1)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,1)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,1)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=3,mode_file=fs2000_uncorr_ME_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_3=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,3)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,3)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,3)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=2,mode_file=fs2000_uncorr_ME_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_2=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,2)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,2)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,2)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=4,mode_file=fs2000_uncorr_ME_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_4=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,4)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,4)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,4)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
|
||||
if max(max(abs(SmoothedMeasurementErrors-repmat(SmoothedMeasurementErrors(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedMeasurementErrors do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedShocks-repmat(SmoothedShocks(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedShocks do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedVariables-repmat(SmoothedVariables(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedVariables do not match')
|
||||
end
|
||||
|
||||
if max(abs([fval_algo_1 fval_algo_2,fval_algo_3,fval_algo_4]-fval_algo_1))>1e-6
|
||||
error('Likelihoods do not match')
|
||||
end
|
||||
@#include "fs2000_estimation_check.inc"
|
|
@ -1,102 +1,4 @@
|
|||
/*
|
||||
* This file is based on the cash in advance model described
|
||||
* Frank Schorfheide (2000): "Loss function-based evaluation of DSGE models",
|
||||
* Journal of Applied Econometrics, 15(6), 645-670.
|
||||
*
|
||||
* The equations are taken from J. Nason and T. Cogley (1994): "Testing the
|
||||
* implications of long-run neutrality for monetary business cycle models",
|
||||
* Journal of Applied Econometrics, 9, S37-S70.
|
||||
* Note that there is an initial minus sign missing in equation (A1), p. S63.
|
||||
*
|
||||
* This implementation was written by Michel Juillard. Please note that the
|
||||
* following copyright notice only applies to this Dynare implementation of the
|
||||
* model.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004-2013 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
* Dynare is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Dynare is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var m P c e W R k d n l gy_obs gp_obs y dA;
|
||||
varexo e_a e_m;
|
||||
|
||||
parameters alp bet gam mst rho psi del theta;
|
||||
|
||||
alp = 0.33;
|
||||
bet = 0.99;
|
||||
gam = 0.003;
|
||||
mst = 1.011;
|
||||
rho = 0.7;
|
||||
psi = 0.787;
|
||||
del = 0.02;
|
||||
theta=0;
|
||||
|
||||
model;
|
||||
dA = exp(gam+e_a);
|
||||
log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
|
||||
W = l/n;
|
||||
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
|
||||
R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
|
||||
c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
|
||||
P*c = m;
|
||||
m-1+d = l;
|
||||
e = exp(e_a);
|
||||
y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
|
||||
gy_obs = dA*y/y(-1);
|
||||
gp_obs = (P/P(-1))*m(-1)/dA;
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
dA = exp(gam);
|
||||
gst = 1/dA;
|
||||
m = mst;
|
||||
khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
|
||||
xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
|
||||
nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
|
||||
n = xist/(nust+xist);
|
||||
P = xist + nust;
|
||||
k = khst*n;
|
||||
|
||||
l = psi*mst*n/( (1-psi)*(1-n) );
|
||||
c = mst/P;
|
||||
d = l - mst + 1;
|
||||
y = k^alp*n^(1-alp)*gst^alp;
|
||||
R = mst/bet;
|
||||
W = l/n;
|
||||
ist = y-c;
|
||||
q = 1 - d;
|
||||
|
||||
e = 1;
|
||||
|
||||
gp_obs = m/dA;
|
||||
gy_obs = dA;
|
||||
end;
|
||||
|
||||
varobs gp_obs gy_obs;
|
||||
|
||||
shocks;
|
||||
var e_a; stderr 0.014;
|
||||
var e_m; stderr 0.005;
|
||||
end;
|
||||
|
||||
steady;
|
||||
@#include "fs2000_model.inc"
|
||||
|
||||
estimated_params;
|
||||
alp, 0.356;
|
||||
|
@ -110,55 +12,7 @@ stderr gy_obs, 1;
|
|||
//corr gp_obs, gy_obs,0;
|
||||
end;
|
||||
|
||||
options_.TeX=1;
|
||||
options_.debug=1;
|
||||
@#define mode_file_name="fs2000_uncorr_ME_missing_mode"
|
||||
@#define data_file_name="fsdat_simul_uncorr_ME_missing"
|
||||
|
||||
%%default
|
||||
estimation(kalman_algo=0,mode_compute=4,order=1,datafile=fsdat_simul_uncorr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_0=oo_.likelihood_at_initial_parameters;
|
||||
%%Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=1,mode_file=fs2000_uncorr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_1=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,1)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,1)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,1)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
%%Univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=3,mode_file=fs2000_uncorr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_3=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,3)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,3)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,3)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse Multivariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=2,mode_file=fs2000_uncorr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_2=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,2)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,2)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,2)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
%%Diffuse univariate Kalman Filter
|
||||
options_.lik_init=1;
|
||||
estimation(kalman_algo=4,mode_file=fs2000_uncorr_ME_missing_mode,mode_compute=0,order=1,datafile=fsdat_simul_uncorr_ME_missing,smoother,filter_decomposition,forecast = 8,filtered_vars,filter_step_ahead=[1,3],irf=20) m P c e W R k d y gy_obs;
|
||||
fval_algo_4=oo_.likelihood_at_initial_parameters;
|
||||
SmoothedMeasurementErrors(:,:,4)=cell2mat(struct2cell(oo_.SmoothedMeasurementErrors));
|
||||
SmoothedShocks(:,:,4)=cell2mat(struct2cell(oo_.SmoothedShocks));
|
||||
SmoothedVariables(:,:,4)=cell2mat(struct2cell(oo_.SmoothedVariables));
|
||||
|
||||
if max(max(abs(SmoothedMeasurementErrors-repmat(SmoothedMeasurementErrors(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedMeasurementErrors do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedShocks-repmat(SmoothedShocks(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedShocks do not match')
|
||||
end
|
||||
|
||||
if max(max(abs(SmoothedVariables-repmat(SmoothedVariables(:,:,1),1,1,4))))>1e-8
|
||||
error('SmoothedVariables do not match')
|
||||
end
|
||||
|
||||
if max(abs([fval_algo_2,fval_algo_3,fval_algo_4]-fval_algo_1))>1e-6
|
||||
error('Likelihoods do not match')
|
||||
end
|
||||
@#include "fs2000_estimation_check.inc"
|
|
@ -1,408 +0,0 @@
|
|||
% Dataset generated by fs2000_uncorr_ME.m.
|
||||
% 14-Jun-2016 17:56:00
|
||||
gy_obs = [
|
||||
1.0109609
|
||||
0.97642646
|
||||
0.96315626
|
||||
0.95745501
|
||||
0.97985018
|
||||
0.98698404
|
||||
NaN
|
||||
0.97758449
|
||||
1.0372816
|
||||
1.0458945
|
||||
1.0332673
|
||||
0.97502186
|
||||
0.94303873
|
||||
0.90973739
|
||||
0.99226447
|
||||
1.1009692
|
||||
1.0053564
|
||||
0.94758433
|
||||
0.9567912
|
||||
0.87110654
|
||||
1.0446766
|
||||
1.0111115
|
||||
0.86655595
|
||||
1.0215822
|
||||
1.0472621
|
||||
0.908667
|
||||
1.1514238
|
||||
0.89857157
|
||||
1.060294
|
||||
1.013061
|
||||
0.96731591
|
||||
0.9138868
|
||||
0.98929905
|
||||
0.97839349
|
||||
0.85327882
|
||||
0.89567237
|
||||
1.0052162
|
||||
0.98056641
|
||||
0.92769265
|
||||
1.1388486
|
||||
1.0496267
|
||||
0.98826525
|
||||
0.97595184
|
||||
1.0090495
|
||||
0.89012437
|
||||
1.0911123
|
||||
0.99972573
|
||||
1.0037704
|
||||
0.93309032
|
||||
1.0777157
|
||||
1.0195358
|
||||
0.93789726
|
||||
0.93761622
|
||||
0.99192629
|
||||
0.99058658
|
||||
0.96107042
|
||||
0.97133837
|
||||
0.89782855
|
||||
0.89300512
|
||||
1.1139143
|
||||
1.0940156
|
||||
1.1159643
|
||||
0.98698884
|
||||
1.0290253
|
||||
0.96175065
|
||||
0.90738687
|
||||
0.99696118
|
||||
0.97020529
|
||||
1.1340389
|
||||
1.0148178
|
||||
1.0718094
|
||||
1.0246439
|
||||
1.0853133
|
||||
0.9376242
|
||||
0.98567328
|
||||
1.0127188
|
||||
0.89367724
|
||||
1.1355668
|
||||
0.96168471
|
||||
1.0507627
|
||||
0.97586638
|
||||
0.99626073
|
||||
1.0162793
|
||||
1.0616655
|
||||
1.0678168
|
||||
0.97154114
|
||||
0.99647212
|
||||
1.0420533
|
||||
1.0217119
|
||||
1.1918036
|
||||
0.92459188
|
||||
1.0202248
|
||||
1.1838137
|
||||
0.98797992
|
||||
1.000314
|
||||
0.92258543
|
||||
0.98650265
|
||||
1.0416953
|
||||
1.0685879
|
||||
1.0723427
|
||||
1.0187821
|
||||
1.0227766
|
||||
1.0229143
|
||||
0.98194776
|
||||
0.99438303
|
||||
1.0064659
|
||||
0.88075679
|
||||
1.2524675
|
||||
0.98155486
|
||||
0.94454137
|
||||
0.91557661
|
||||
0.94205973
|
||||
0.95937251
|
||||
1.0861095
|
||||
0.95876852
|
||||
1.1358827
|
||||
0.97599938
|
||||
0.98529744
|
||||
1.1516775
|
||||
1.2405386
|
||||
0.88366791
|
||||
0.85121878
|
||||
0.9844267
|
||||
0.96547309
|
||||
0.96460182
|
||||
1.0839974
|
||||
1.1668071
|
||||
1.0287994
|
||||
1.0180404
|
||||
1.0132839
|
||||
1.0273246
|
||||
1.0382224
|
||||
1.0030073
|
||||
0.96332671
|
||||
0.99994006
|
||||
0.99648052
|
||||
1.0565757
|
||||
1.0387682
|
||||
0.90149605
|
||||
1.0537697
|
||||
1.1070891
|
||||
0.99672816
|
||||
1.0670392
|
||||
0.9810588
|
||||
1.0392032
|
||||
1.0431335
|
||||
0.91577584
|
||||
1.027802
|
||||
0.96260436
|
||||
0.85928141
|
||||
0.96465077
|
||||
1.0163289
|
||||
0.98117748
|
||||
1.0331503
|
||||
1.0033069
|
||||
0.90657866
|
||||
1.0963327
|
||||
0.84171175
|
||||
1.0262137
|
||||
1.1035421
|
||||
1.0091114
|
||||
1.0007519
|
||||
1.2000436
|
||||
1.0487303
|
||||
0.97031189
|
||||
1.0637329
|
||||
1.0283992
|
||||
1.0893456
|
||||
1.0592114
|
||||
0.97353829
|
||||
1.0326355
|
||||
1.0745714
|
||||
0.99375808
|
||||
1.1411619
|
||||
1.0828585
|
||||
0.83939772
|
||||
0.87515849
|
||||
0.96132978
|
||||
1.0772758
|
||||
1.0185846
|
||||
0.99000922
|
||||
0.96689881
|
||||
1.1259479
|
||||
0.92506257
|
||||
1.0039843
|
||||
0.93819156
|
||||
1.0443276
|
||||
1.0782669
|
||||
0.90842532
|
||||
1.0840948
|
||||
0.9993092
|
||||
1.0253587
|
||||
1.058007
|
||||
1.069575
|
||||
0.85747319
|
||||
1.0449107
|
||||
0.95307215
|
||||
0.96357006
|
||||
NaN
|
||||
1.0147373
|
||||
];
|
||||
|
||||
gp_obs = [
|
||||
0.97641139
|
||||
1.0835387
|
||||
1.0201422
|
||||
0.9965768
|
||||
1.0679288
|
||||
0.94310955
|
||||
1.02692
|
||||
1.0766354
|
||||
0.99291694
|
||||
1.0758558
|
||||
1.0223423
|
||||
0.953096
|
||||
0.95557758
|
||||
1.0626314
|
||||
0.95623269
|
||||
0.99722683
|
||||
1.0724598
|
||||
1.0685878
|
||||
1.0925098
|
||||
1.0060236
|
||||
1.044239
|
||||
1.0010542
|
||||
0.9095508
|
||||
1.0209972
|
||||
0.96154318
|
||||
0.96426173
|
||||
1.096074
|
||||
0.92189876
|
||||
1.0576579
|
||||
0.97575926
|
||||
1.0373979
|
||||
1.0060191
|
||||
0.88276069
|
||||
0.99418001
|
||||
1.0066328
|
||||
0.95684524
|
||||
1.0486087
|
||||
0.85117929
|
||||
0.83268536
|
||||
0.99478843
|
||||
0.91192351
|
||||
0.9873018
|
||||
0.86550156
|
||||
1.0176583
|
||||
0.95770069
|
||||
1.1049287
|
||||
1.0822732
|
||||
0.99394903
|
||||
1.020333
|
||||
0.95132673
|
||||
0.89484016
|
||||
1.0472374
|
||||
0.99930771
|
||||
1.0854244
|
||||
0.93423194
|
||||
0.98676402
|
||||
0.98664845
|
||||
0.98267411
|
||||
0.95051396
|
||||
0.99980157
|
||||
1.0823984
|
||||
0.90190298
|
||||
1.008969
|
||||
0.86171467
|
||||
0.94455682
|
||||
0.97917936
|
||||
0.98479622
|
||||
0.97453798
|
||||
1.0617859
|
||||
0.99353433
|
||||
1.0422265
|
||||
0.95311075
|
||||
1.0732908
|
||||
1.0428699
|
||||
1.156329
|
||||
1.0503186
|
||||
1.0463145
|
||||
1.0770277
|
||||
1.0610048
|
||||
0.99620784
|
||||
0.93563853
|
||||
0.97661085
|
||||
1.0713851
|
||||
1.0249986
|
||||
0.95524394
|
||||
1.0154089
|
||||
1.0612265
|
||||
1.0419124
|
||||
0.97997092
|
||||
1.0311427
|
||||
1.1117738
|
||||
1.0540805
|
||||
1.0294702
|
||||
0.99083418
|
||||
0.87573216
|
||||
0.89835666
|
||||
1.0160201
|
||||
1.0708264
|
||||
1.019447
|
||||
0.92475214
|
||||
1.0698928
|
||||
0.98237724
|
||||
1.0314822
|
||||
1.013597
|
||||
1.0148469
|
||||
1.0708994
|
||||
1.0619818
|
||||
0.99435012
|
||||
0.91915364
|
||||
0.95040793
|
||||
0.919936
|
||||
0.99663848
|
||||
1.0317468
|
||||
0.93628249
|
||||
0.88433423
|
||||
1.0976301
|
||||
1.1131723
|
||||
1.0119619
|
||||
1.0387386
|
||||
1.0881946
|
||||
0.95853899
|
||||
0.98744557
|
||||
0.96373938
|
||||
1.0736045
|
||||
1.0142062
|
||||
1.04146
|
||||
1.0114068
|
||||
0.9344964
|
||||
1.01653
|
||||
0.9760068
|
||||
0.9675109
|
||||
0.98498547
|
||||
0.97943987
|
||||
0.82709931
|
||||
0.98329725
|
||||
0.91502538
|
||||
0.93625216
|
||||
0.94584179
|
||||
0.96191095
|
||||
1.1728771
|
||||
1.0140516
|
||||
0.89530207
|
||||
0.94334423
|
||||
0.92887834
|
||||
0.95378136
|
||||
1.0127008
|
||||
0.97136082
|
||||
1.0745622
|
||||
0.92417618
|
||||
0.85770118
|
||||
NaN
|
||||
1.0440046
|
||||
1.0086679
|
||||
0.91750251
|
||||
1.0573989
|
||||
0.97088121
|
||||
1.0015049
|
||||
1.0403713
|
||||
1.0228201
|
||||
0.90967756
|
||||
0.98839521
|
||||
1.0862834
|
||||
1.0452364
|
||||
1.0129798
|
||||
1.0504615
|
||||
1.0673073
|
||||
0.95170616
|
||||
1.0757234
|
||||
1.0151971
|
||||
1.0083416
|
||||
0.97789045
|
||||
1.0665525
|
||||
1.0079413
|
||||
1.0822921
|
||||
1.0423627
|
||||
0.91265687
|
||||
0.97524101
|
||||
1.013278
|
||||
1.0818822
|
||||
1.0019729
|
||||
1.0558259
|
||||
0.96626308
|
||||
0.93379096
|
||||
0.89050659
|
||||
0.98798506
|
||||
1.1290532
|
||||
1.0484984
|
||||
1.0867873
|
||||
1.049982
|
||||
0.92204043
|
||||
0.88462983
|
||||
1.0675095
|
||||
0.98330347
|
||||
1.0956124
|
||||
1.0234829
|
||||
1.0073299
|
||||
0.9892484
|
||||
0.91541384
|
||||
NaN
|
||||
1.0836086
|
||||
];
|
||||
|
|
@ -1,408 +0,0 @@
|
|||
% Dataset generated by fs2000_uncorr_ME.m.
|
||||
% 14-Jun-2016 17:56:00
|
||||
gy_obs = [
|
||||
1.0224259
|
||||
0.99908273
|
||||
0.93370418
|
||||
0.94627491
|
||||
1.0245535
|
||||
0.9906322
|
||||
1.0695086
|
||||
0.99829236
|
||||
1.0643052
|
||||
1.0445309
|
||||
1.071544
|
||||
1.0181028
|
||||
0.97654409
|
||||
0.93901485
|
||||
1.0154622
|
||||
1.0560989
|
||||
0.97547846
|
||||
0.93811148
|
||||
0.99215884
|
||||
0.96630557
|
||||
0.97701983
|
||||
0.99774688
|
||||
0.99440984
|
||||
0.99743537
|
||||
1.0469891
|
||||
0.99787056
|
||||
1.0791108
|
||||
1.0177172
|
||||
1.0835064
|
||||
0.96359903
|
||||
1.0157776
|
||||
0.99652771
|
||||
1.0527206
|
||||
1.0144405
|
||||
0.87912366
|
||||
0.9287501
|
||||
0.9282937
|
||||
1.0142865
|
||||
1.0581016
|
||||
0.98427946
|
||||
1.0611337
|
||||
1.0318925
|
||||
0.94003123
|
||||
1.0336267
|
||||
0.96869309
|
||||
1.0640407
|
||||
1.0090411
|
||||
1.0765134
|
||||
0.98171208
|
||||
1.0274647
|
||||
1.0103261
|
||||
0.90288561
|
||||
0.95752317
|
||||
1.0390283
|
||||
1.0218154
|
||||
0.920374
|
||||
0.98901108
|
||||
1.0272675
|
||||
0.97232462
|
||||
1.0495532
|
||||
1.007013
|
||||
1.1115362
|
||||
0.94334961
|
||||
1.027119
|
||||
0.93702093
|
||||
0.96273938
|
||||
0.95313173
|
||||
1.026679
|
||||
1.0328615
|
||||
1.022859
|
||||
0.98497394
|
||||
1.0219405
|
||||
1.0328825
|
||||
0.99443075
|
||||
1.005472
|
||||
1.029994
|
||||
0.95340522
|
||||
1.0536237
|
||||
0.96027541
|
||||
0.97024615
|
||||
1.0083931
|
||||
0.97198733
|
||||
1.0172831
|
||||
1.0174496
|
||||
1.0526027
|
||||
0.97732435
|
||||
1.0003652
|
||||
0.99532521
|
||||
1.0124101
|
||||
1.0182806
|
||||
0.95454402
|
||||
1.0059302
|
||||
1.0391731
|
||||
0.99271583
|
||||
1.0977708
|
||||
0.97005896
|
||||
0.96205559
|
||||
0.91548111
|
||||
1.0674565
|
||||
1.0433971
|
||||
1.001825
|
||||
1.0595878
|
||||
1.0135852
|
||||
1.0213014
|
||||
1.0065148
|
||||
1.0173219
|
||||
0.99733265
|
||||
1.1338072
|
||||
0.94200332
|
||||
0.92938523
|
||||
0.93151868
|
||||
0.96404171
|
||||
0.96248426
|
||||
0.99227535
|
||||
0.98841099
|
||||
1.0355095
|
||||
1.0105344
|
||||
1.0338619
|
||||
1.0930513
|
||||
1.0569413
|
||||
0.92442868
|
||||
0.89067118
|
||||
1.0508567
|
||||
0.9088979
|
||||
1.0074071
|
||||
0.99535314
|
||||
1.1168796
|
||||
0.99480709
|
||||
1.004074
|
||||
1.0424087
|
||||
1.02863
|
||||
0.99894362
|
||||
0.97849677
|
||||
0.94805695
|
||||
1.0189938
|
||||
0.93938764
|
||||
0.96459395
|
||||
1.0733958
|
||||
0.96493726
|
||||
0.99614879
|
||||
1.0593605
|
||||
0.99212417
|
||||
1.0665918
|
||||
0.97781741
|
||||
1.0697296
|
||||
1.0351349
|
||||
1.0046531
|
||||
0.95990931
|
||||
0.91930623
|
||||
0.96297019
|
||||
0.98212161
|
||||
0.98699778
|
||||
1.0631623
|
||||
0.99357437
|
||||
1.070322
|
||||
0.98796739
|
||||
1.0494699
|
||||
0.95059454
|
||||
0.99597581
|
||||
1.0592266
|
||||
0.96976169
|
||||
0.98285125
|
||||
1.106665
|
||||
1.0388458
|
||||
0.95377078
|
||||
1.0279609
|
||||
0.98208063
|
||||
1.0377092
|
||||
1.1002241
|
||||
0.8908646
|
||||
1.0366502
|
||||
1.0772479
|
||||
1.0009545
|
||||
1.0840645
|
||||
1.0190552
|
||||
0.95204723
|
||||
0.88423815
|
||||
1.0097017
|
||||
1.0394062
|
||||
1.0205829
|
||||
1.0175604
|
||||
0.99299324
|
||||
1.0197424
|
||||
0.91855078
|
||||
0.9612351
|
||||
0.94322061
|
||||
1.0184429
|
||||
1.006739
|
||||
0.94109961
|
||||
0.97861081
|
||||
0.99857073
|
||||
0.96563843
|
||||
1.0323723
|
||||
1.0205026
|
||||
1.0120605
|
||||
1.0405064
|
||||
1.0053125
|
||||
1.0189163
|
||||
1.0150631
|
||||
1.0593963
|
||||
];
|
||||
|
||||
gp_obs = [
|
||||
1.0431333
|
||||
1.1051879
|
||||
1.0023005
|
||||
1.012329
|
||||
1.0934588
|
||||
1.0233471
|
||||
1.0152123
|
||||
1.0559708
|
||||
1.0335466
|
||||
1.0874685
|
||||
1.0531435
|
||||
1.0330357
|
||||
0.9791139
|
||||
1.0343687
|
||||
0.93282259
|
||||
1.0040195
|
||||
1.0447679
|
||||
1.0451674
|
||||
1.044427
|
||||
1.0852145
|
||||
1.0469552
|
||||
1.0167837
|
||||
1.0426151
|
||||
1.033411
|
||||
0.94397995
|
||||
0.99584763
|
||||
1.0701857
|
||||
1.0173029
|
||||
1.0483916
|
||||
0.97170083
|
||||
1.0241408
|
||||
1.0476302
|
||||
0.935995
|
||||
1.033149
|
||||
1.0266562
|
||||
0.97864912
|
||||
1.0221817
|
||||
0.91469994
|
||||
0.91776163
|
||||
0.95268336
|
||||
0.95410936
|
||||
0.96358831
|
||||
0.9388255
|
||||
1.0213083
|
||||
0.92127369
|
||||
1.0221288
|
||||
1.0645551
|
||||
1.0210064
|
||||
1.0033339
|
||||
0.97703217
|
||||
0.91667969
|
||||
0.99543826
|
||||
1.0442043
|
||||
1.0927802
|
||||
0.97172283
|
||||
0.93192173
|
||||
0.99550659
|
||||
1.0162115
|
||||
0.96723841
|
||||
0.93384208
|
||||
1.0874596
|
||||
0.86650349
|
||||
0.97583264
|
||||
0.92581376
|
||||
0.94852058
|
||||
1.0092129
|
||||
1.0198589
|
||||
0.96524178
|
||||
1.0606794
|
||||
1.0341616
|
||||
1.0368143
|
||||
0.99433651
|
||||
1.0564403
|
||||
1.0411491
|
||||
1.1515984
|
||||
1.0585416
|
||||
1.0603135
|
||||
1.0014812
|
||||
0.95805984
|
||||
0.98891125
|
||||
0.96589115
|
||||
1.0066881
|
||||
1.0331233
|
||||
0.98616833
|
||||
0.9726033
|
||||
0.98092518
|
||||
1.0098426
|
||||
1.0294537
|
||||
0.96413923
|
||||
1.0360114
|
||||
1.0288474
|
||||
1.0821359
|
||||
1.0056133
|
||||
1.0245158
|
||||
0.95230673
|
||||
0.94395733
|
||||
1.0297738
|
||||
1.0054163
|
||||
1.0316911
|
||||
0.97439737
|
||||
1.0988662
|
||||
1.0114671
|
||||
1.0651747
|
||||
0.98965229
|
||||
0.9991897
|
||||
1.059228
|
||||
1.0418093
|
||||
0.94934757
|
||||
0.92953431
|
||||
0.93983161
|
||||
0.95589634
|
||||
1.0042065
|
||||
0.99551072
|
||||
0.99358454
|
||||
0.94679108
|
||||
1.0365791
|
||||
1.0290083
|
||||
1.0021404
|
||||
1.0323651
|
||||
0.96900533
|
||||
1.0411174
|
||||
1.0241698
|
||||
1.01257
|
||||
0.9823848
|
||||
1.0263528
|
||||
0.98894333
|
||||
0.96697893
|
||||
0.951027
|
||||
1.0294827
|
||||
0.94852151
|
||||
0.97561346
|
||||
0.94221704
|
||||
0.97101555
|
||||
0.8248814
|
||||
0.9492286
|
||||
0.93815252
|
||||
0.9438839
|
||||
0.98470904
|
||||
1.003176
|
||||
1.1037238
|
||||
0.97706352
|
||||
1.003535
|
||||
0.92805822
|
||||
0.98538008
|
||||
0.91954377
|
||||
0.98875133
|
||||
1.0421065
|
||||
1.0228905
|
||||
0.99052194
|
||||
0.9215206
|
||||
1.0671178
|
||||
1.1070108
|
||||
0.99977792
|
||||
0.95226577
|
||||
1.0638652
|
||||
0.97013018
|
||||
0.99207659
|
||||
1.0636164
|
||||
0.94428973
|
||||
0.91214922
|
||||
1.0336336
|
||||
1.0251177
|
||||
1.0136102
|
||||
1.0383598
|
||||
1.0863217
|
||||
1.0551032
|
||||
0.97014678
|
||||
1.0413778
|
||||
1.0084315
|
||||
1.0034729
|
||||
0.95811651
|
||||
1.0473638
|
||||
1.0087349
|
||||
1.0233021
|
||||
0.97098563
|
||||
0.93211026
|
||||
1.0114051
|
||||
0.98655964
|
||||
1.0693516
|
||||
1.0396693
|
||||
1.0604449
|
||||
0.95189222
|
||||
0.95467216
|
||||
0.93529849
|
||||
1.0299501
|
||||
1.1558391
|
||||
1.0480068
|
||||
0.95908782
|
||||
1.0520119
|
||||
0.97169359
|
||||
0.93124185
|
||||
1.053327
|
||||
0.99537851
|
||||
1.0318507
|
||||
1.0942064
|
||||
1.0356823
|
||||
1.0540669
|
||||
0.93291541
|
||||
1.0581534
|
||||
1.1244273
|
||||
];
|
||||
|
|
@ -1,408 +0,0 @@
|
|||
% Dataset generated by fs2000_uncorr_ME.m.
|
||||
% 14-Jun-2016 17:56:00
|
||||
gy_obs = [
|
||||
1.0224259
|
||||
0.99908273
|
||||
0.93370418
|
||||
0.94627491
|
||||
1.0245535
|
||||
0.9906322
|
||||
NaN
|
||||
0.99829236
|
||||
1.0643052
|
||||
1.0445309
|
||||
1.071544
|
||||
1.0181028
|
||||
0.97654409
|
||||
0.93901485
|
||||
1.0154622
|
||||
1.0560989
|
||||
0.97547846
|
||||
0.93811148
|
||||
0.99215884
|
||||
0.96630557
|
||||
0.97701983
|
||||
0.99774688
|
||||
0.99440984
|
||||
0.99743537
|
||||
1.0469891
|
||||
0.99787056
|
||||
1.0791108
|
||||
1.0177172
|
||||
1.0835064
|
||||
0.96359903
|
||||
1.0157776
|
||||
0.99652771
|
||||
1.0527206
|
||||
1.0144405
|
||||
0.87912366
|
||||
0.9287501
|
||||
0.9282937
|
||||
1.0142865
|
||||
1.0581016
|
||||
0.98427946
|
||||
1.0611337
|
||||
1.0318925
|
||||
0.94003123
|
||||
1.0336267
|
||||
0.96869309
|
||||
1.0640407
|
||||
1.0090411
|
||||
1.0765134
|
||||
0.98171208
|
||||
1.0274647
|
||||
1.0103261
|
||||
0.90288561
|
||||
0.95752317
|
||||
1.0390283
|
||||
1.0218154
|
||||
0.920374
|
||||
0.98901108
|
||||
1.0272675
|
||||
0.97232462
|
||||
1.0495532
|
||||
1.007013
|
||||
1.1115362
|
||||
0.94334961
|
||||
1.027119
|
||||
0.93702093
|
||||
0.96273938
|
||||
0.95313173
|
||||
1.026679
|
||||
1.0328615
|
||||
1.022859
|
||||
0.98497394
|
||||
1.0219405
|
||||
1.0328825
|
||||
0.99443075
|
||||
1.005472
|
||||
1.029994
|
||||
0.95340522
|
||||
1.0536237
|
||||
0.96027541
|
||||
0.97024615
|
||||
1.0083931
|
||||
0.97198733
|
||||
1.0172831
|
||||
1.0174496
|
||||
1.0526027
|
||||
0.97732435
|
||||
1.0003652
|
||||
0.99532521
|
||||
1.0124101
|
||||
1.0182806
|
||||
0.95454402
|
||||
1.0059302
|
||||
1.0391731
|
||||
0.99271583
|
||||
1.0977708
|
||||
0.97005896
|
||||
0.96205559
|
||||
0.91548111
|
||||
1.0674565
|
||||
1.0433971
|
||||
1.001825
|
||||
1.0595878
|
||||
1.0135852
|
||||
1.0213014
|
||||
1.0065148
|
||||
1.0173219
|
||||
0.99733265
|
||||
1.1338072
|
||||
0.94200332
|
||||
0.92938523
|
||||
0.93151868
|
||||
0.96404171
|
||||
0.96248426
|
||||
0.99227535
|
||||
0.98841099
|
||||
1.0355095
|
||||
1.0105344
|
||||
1.0338619
|
||||
1.0930513
|
||||
1.0569413
|
||||
0.92442868
|
||||
0.89067118
|
||||
1.0508567
|
||||
0.9088979
|
||||
1.0074071
|
||||
0.99535314
|
||||
1.1168796
|
||||
0.99480709
|
||||
1.004074
|
||||
1.0424087
|
||||
1.02863
|
||||
0.99894362
|
||||
0.97849677
|
||||
0.94805695
|
||||
1.0189938
|
||||
0.93938764
|
||||
0.96459395
|
||||
1.0733958
|
||||
0.96493726
|
||||
0.99614879
|
||||
1.0593605
|
||||
0.99212417
|
||||
1.0665918
|
||||
0.97781741
|
||||
1.0697296
|
||||
1.0351349
|
||||
1.0046531
|
||||
0.95990931
|
||||
0.91930623
|
||||
0.96297019
|
||||
0.98212161
|
||||
0.98699778
|
||||
1.0631623
|
||||
0.99357437
|
||||
1.070322
|
||||
0.98796739
|
||||
1.0494699
|
||||
0.95059454
|
||||
0.99597581
|
||||
1.0592266
|
||||
0.96976169
|
||||
0.98285125
|
||||
1.106665
|
||||
1.0388458
|
||||
0.95377078
|
||||
1.0279609
|
||||
0.98208063
|
||||
1.0377092
|
||||
1.1002241
|
||||
0.8908646
|
||||
1.0366502
|
||||
1.0772479
|
||||
1.0009545
|
||||
1.0840645
|
||||
1.0190552
|
||||
0.95204723
|
||||
0.88423815
|
||||
1.0097017
|
||||
1.0394062
|
||||
1.0205829
|
||||
1.0175604
|
||||
0.99299324
|
||||
1.0197424
|
||||
0.91855078
|
||||
0.9612351
|
||||
0.94322061
|
||||
1.0184429
|
||||
1.006739
|
||||
0.94109961
|
||||
0.97861081
|
||||
0.99857073
|
||||
0.96563843
|
||||
1.0323723
|
||||
1.0205026
|
||||
1.0120605
|
||||
1.0405064
|
||||
1.0053125
|
||||
1.0189163
|
||||
NaN
|
||||
1.0593963
|
||||
];
|
||||
|
||||
gp_obs = [
|
||||
1.0431333
|
||||
1.1051879
|
||||
1.0023005
|
||||
1.012329
|
||||
1.0934588
|
||||
1.0233471
|
||||
1.0152123
|
||||
1.0559708
|
||||
1.0335466
|
||||
1.0874685
|
||||
1.0531435
|
||||
1.0330357
|
||||
0.9791139
|
||||
1.0343687
|
||||
0.93282259
|
||||
1.0040195
|
||||
1.0447679
|
||||
1.0451674
|
||||
1.044427
|
||||
1.0852145
|
||||
1.0469552
|
||||
1.0167837
|
||||
1.0426151
|
||||
1.033411
|
||||
0.94397995
|
||||
0.99584763
|
||||
1.0701857
|
||||
1.0173029
|
||||
1.0483916
|
||||
0.97170083
|
||||
1.0241408
|
||||
1.0476302
|
||||
0.935995
|
||||
1.033149
|
||||
1.0266562
|
||||
0.97864912
|
||||
1.0221817
|
||||
0.91469994
|
||||
0.91776163
|
||||
0.95268336
|
||||
0.95410936
|
||||
0.96358831
|
||||
0.9388255
|
||||
1.0213083
|
||||
0.92127369
|
||||
1.0221288
|
||||
1.0645551
|
||||
1.0210064
|
||||
1.0033339
|
||||
0.97703217
|
||||
0.91667969
|
||||
0.99543826
|
||||
1.0442043
|
||||
1.0927802
|
||||
0.97172283
|
||||
0.93192173
|
||||
0.99550659
|
||||
1.0162115
|
||||
0.96723841
|
||||
0.93384208
|
||||
1.0874596
|
||||
0.86650349
|
||||
0.97583264
|
||||
0.92581376
|
||||
0.94852058
|
||||
1.0092129
|
||||
1.0198589
|
||||
0.96524178
|
||||
1.0606794
|
||||
1.0341616
|
||||
1.0368143
|
||||
0.99433651
|
||||
1.0564403
|
||||
1.0411491
|
||||
1.1515984
|
||||
1.0585416
|
||||
1.0603135
|
||||
1.0014812
|
||||
0.95805984
|
||||
0.98891125
|
||||
0.96589115
|
||||
1.0066881
|
||||
1.0331233
|
||||
0.98616833
|
||||
0.9726033
|
||||
0.98092518
|
||||
1.0098426
|
||||
1.0294537
|
||||
0.96413923
|
||||
1.0360114
|
||||
1.0288474
|
||||
1.0821359
|
||||
1.0056133
|
||||
1.0245158
|
||||
0.95230673
|
||||
0.94395733
|
||||
1.0297738
|
||||
1.0054163
|
||||
1.0316911
|
||||
0.97439737
|
||||
1.0988662
|
||||
1.0114671
|
||||
1.0651747
|
||||
0.98965229
|
||||
0.9991897
|
||||
1.059228
|
||||
1.0418093
|
||||
0.94934757
|
||||
0.92953431
|
||||
0.93983161
|
||||
0.95589634
|
||||
1.0042065
|
||||
0.99551072
|
||||
0.99358454
|
||||
0.94679108
|
||||
1.0365791
|
||||
1.0290083
|
||||
1.0021404
|
||||
1.0323651
|
||||
0.96900533
|
||||
1.0411174
|
||||
1.0241698
|
||||
1.01257
|
||||
0.9823848
|
||||
1.0263528
|
||||
0.98894333
|
||||
0.96697893
|
||||
0.951027
|
||||
1.0294827
|
||||
0.94852151
|
||||
0.97561346
|
||||
0.94221704
|
||||
0.97101555
|
||||
0.8248814
|
||||
0.9492286
|
||||
0.93815252
|
||||
0.9438839
|
||||
0.98470904
|
||||
1.003176
|
||||
1.1037238
|
||||
0.97706352
|
||||
1.003535
|
||||
0.92805822
|
||||
0.98538008
|
||||
0.91954377
|
||||
0.98875133
|
||||
1.0421065
|
||||
1.0228905
|
||||
0.99052194
|
||||
0.9215206
|
||||
NaN
|
||||
1.1070108
|
||||
0.99977792
|
||||
0.95226577
|
||||
1.0638652
|
||||
0.97013018
|
||||
0.99207659
|
||||
1.0636164
|
||||
0.94428973
|
||||
0.91214922
|
||||
1.0336336
|
||||
1.0251177
|
||||
1.0136102
|
||||
1.0383598
|
||||
1.0863217
|
||||
1.0551032
|
||||
0.97014678
|
||||
1.0413778
|
||||
1.0084315
|
||||
1.0034729
|
||||
0.95811651
|
||||
1.0473638
|
||||
1.0087349
|
||||
1.0233021
|
||||
0.97098563
|
||||
0.93211026
|
||||
1.0114051
|
||||
0.98655964
|
||||
1.0693516
|
||||
1.0396693
|
||||
1.0604449
|
||||
0.95189222
|
||||
0.95467216
|
||||
0.93529849
|
||||
1.0299501
|
||||
1.1558391
|
||||
1.0480068
|
||||
0.95908782
|
||||
1.0520119
|
||||
0.97169359
|
||||
0.93124185
|
||||
1.053327
|
||||
0.99537851
|
||||
1.0318507
|
||||
1.0942064
|
||||
1.0356823
|
||||
1.0540669
|
||||
0.93291541
|
||||
NaN
|
||||
1.1244273
|
||||
];
|
||||
|
Loading…
Reference in New Issue