Factorized tests and removed time consuming and out of scope parts.

time-shift
Stéphane Adjemian (Charybdis) 2015-11-04 22:19:14 +01:00
parent a7ed27b889
commit cbe236730c
11 changed files with 242 additions and 36 deletions

View File

@ -164,8 +164,14 @@ MODFILES = \
ms-sbvar/test_ms_variances_repeated_runs.mod \
ms-dsge/test_ms_dsge.mod \
kalman/lyapunov/fs2000_lyap.mod \
kalman/fs2000_ns_lik_init.mod \
kalman/fs2000_lik_init.mod \
kalman/lik_init/fs2000_ns_lik_init_2.mod \
kalman/lik_init/fs2000_ns_lik_init_3.mod \
kalman/lik_init/fs2000_ns_lik_init_5.mod \
kalman/lik_init/fs2000_lik_init_1.mod \
kalman/lik_init/fs2000_lik_init_2.mod \
kalman/lik_init/fs2000_lik_init_3.mod \
kalman/lik_init/fs2000_lik_init_4.mod \
kalman/lik_init/fs2000_lik_init_5.mod \
kalman_filter_smoother/gen_data.mod \
kalman_filter_smoother/algo1.mod \
kalman_filter_smoother/algo2.mod \
@ -452,6 +458,8 @@ EXTRA_DIST = \
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 \
identification/kim/kim2_steadystate.m \
identification/as2007/as2007_steadystate.m \
estimation/fsdat_simul.m \

View File

@ -14,7 +14,7 @@
*/
/*
* Copyright (C) 2004-2013 Dynare Team
* Copyright (C) 2004-2015 Dynare Team
*
* This file is part of Dynare.
*
@ -99,7 +99,6 @@ end;
steady;
estimated_params;
alp, 0.356;
gam, 0.0085;
@ -112,26 +111,7 @@ stderr gy_obs, 1;
corr gp_obs, gy_obs,0;
end;
options_.TeX=1;
options_.debug=1;
data(file='../../fs2000/fsdat_simul.m');
%%default
options_.lik_init=1;
estimation(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;
options_.lik_init=2;
estimation(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;
options_.lik_init=3;
estimation(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;
options_.lik_init=4;
estimation(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;
options_.lik_init=5;
estimation(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;
[dataset_, dataset_info, xparam1, hh, M_, options_, oo_, estim_params_, bayestopt_, bounds] = ...
dynare_estimation_init(char(), M_.fname, [], M_, options_, oo_, estim_params_, bayestopt_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_common.inc"
options_.lik_init = 1;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_common.inc"
options_.lik_init = 2;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_common.inc"
options_.lik_init = 3;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_common.inc"
options_.lik_init = 4;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_common.inc"
options_.lik_init = 5;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

View File

@ -1,5 +1,36 @@
// See fs2000.mod in the examples/ directory for details on the model
// This version estimates the model in level rather than in growth rates
/*
* 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. This version estimates the model in level rather than in growth rates.
*/
/*
* Copyright (C) 2004-2015 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_obs P_obs y dA;
varexo e_a e_m;
@ -87,12 +118,7 @@ P_obs (log(mst)-gam);
Y_obs (gam);
end;
%%default
options_.lik_init=2;
estimation(kalman_algo=1,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;
data(file='../../fs2000/fsdat_simul.m');
options_.lik_init=3;
estimation(kalman_algo=3,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;
options_.lik_init=5;
estimation(kalman_algo=1,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;
[dataset_, dataset_info, xparam1, hh, M_, options_, oo_, estim_params_, bayestopt_, bounds] = ...
dynare_estimation_init(char(), M_.fname, [], M_, options_, oo_, estim_params_, bayestopt_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_ns_common.inc"
options_.lik_init = 2;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_ns_common.inc"
options_.lik_init = 3;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 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/>.
*/
@#include "fs2000_ns_common.inc"
options_.lik_init = 5;
oo_ = initial_estimation_checks(str2func('dsge_likelihood'),xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);