irf_matching: fixed CET (2016) test and some cosmetical changes

covariance-quadratic-approximation
Willi Mutschler 2023-12-13 21:07:15 +01:00
parent 0787589479
commit 547bdcc99b
No known key found for this signature in database
GPG Key ID: 91E724BF17A73F6D
10 changed files with 140 additions and 133 deletions

View File

@ -912,42 +912,37 @@ mod_and_m_tests = [
'estimation/method_of_moments/AFVRR/AFVRR_data.mat',
'estimation/method_of_moments/AFVRR/AFVRR_steady_helper.m' ] },
{ 'test' : [ 'estimation/method_of_moments/CET/cet_imh.mod' ],
'extra' : [ 'estimation/method_of_moments/CET/RBC_MoM_common.inc',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_data.mat',
'extra' : [ 'estimation/method_of_moments/CET/cet_data.mat',
'estimation/method_of_moments/CET/cet_irf_matching_file.m',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_model.inc',
'estimation/method_of_moments/CET/cet_original_mode.mat',
'estimation/method_of_moments/CET/cet_steady_helper.m' ] },
{ 'test' : [ 'estimation/method_of_moments/CET/cet_mle.mod' ],
'extra' : [ 'estimation/method_of_moments/CET/RBC_MoM_common.inc',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_data.mat',
'extra' : [ 'estimation/method_of_moments/CET/cet_data.mat',
'estimation/method_of_moments/CET/cet_irf_matching_file.m',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_model.inc',
'estimation/method_of_moments/CET/cet_original_mode.mat',
'estimation/method_of_moments/CET/cet_steady_helper.m' ] },
{ 'test' : [ 'estimation/method_of_moments/CET/cet_rwmh.mod' ],
'extra' : [ 'estimation/method_of_moments/CET/RBC_MoM_common.inc',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_data.mat',
'extra' : [ 'estimation/method_of_moments/CET/cet_data.mat',
'estimation/method_of_moments/CET/cet_irf_matching_file.m',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_model.inc',
'estimation/method_of_moments/CET/cet_original_mode.mat',
'estimation/method_of_moments/CET/cet_steady_helper.m' ] },
{ 'test' : [ 'estimation/method_of_moments/CET/cet_slice.mod' ],
'extra' : [ 'estimation/method_of_moments/CET/RBC_MoM_common.inc',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_data.mat',
'extra' : [ 'estimation/method_of_moments/CET/cet_data.mat',
'estimation/method_of_moments/CET/cet_irf_matching_file.m',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_model.inc',
'estimation/method_of_moments/CET/cet_original_mode.mat',
'estimation/method_of_moments/CET/cet_steady_helper.m' ] },
{ 'test' : [ 'estimation/method_of_moments/CET/cet_tarb.mod' ],
'extra' : [ 'estimation/method_of_moments/CET/RBC_MoM_common.inc',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_data.mat',
'extra' : [ 'estimation/method_of_moments/CET/cet_data.mat',
'estimation/method_of_moments/CET/cet_irf_matching_file.m',
'estimation/method_of_moments/CET/cet_matched_irfs_no_interface_workaround.m',
'estimation/method_of_moments/CET/cet_model.inc',
'estimation/method_of_moments/CET/cet_original_mode.mat',
'estimation/method_of_moments/CET/cet_steady_helper.m' ] },

View File

@ -1,7 +1,9 @@
% -------------------------------------------------------------------------
% Functionality testing of Bayesian IRF matching with
% - independent Metropolis-Hastings
% - >1 MCMC chains
% =========================================================================
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -18,7 +20,7 @@
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
@#include "cet_model.inc"
options_.prior_interval= 0.95;

View File

@ -1,7 +1,24 @@
function [modelIrf, check] = cet_irf_matching_file(modelIrf, M_, options_mom_, ys_)
% Based on replication codes for Christiano, Eichenbaum, Trabandt (2016, Econometrica) - Unemployment and the Business Cycle
% This showcases how to manipulate model IRFs in a irf_matching_file
% =========================================================================
function [modelIrf, error_indicator] = cet_irf_matching_file(modelIrf, M_, options_mom_, ys_)
% [modelIrf, error_indicator] = cet_irf_matching_file(modelIrf, M_, options_mom_, ys_)
% -------------------------------------------------------------------------
% This file manipulates model IRFs to be consistent with empirical IRFS
% -------------------------------------------------------------------------
% INPUTS
% - modelIrf: [options_mom_.irf by M_.endo_nbr by M_.exo_nbr]
% array of IRFs for all model variables and all shocks
% - M_: [structure] Dynare model structure
% - options_mom_: [structure] Dynare options structure
% - ys_: [double] steady state values of all endogenous variables
% -------------------------------------------------------------------------
% OUTPUTS
% - modelIrf: [options_mom_.irf by M_.endo_nbr by M_.exo_nbr]
% modified array of IRFs for all model variables and all shocks
% - error_indicator: [boolean] indicator of success (0) or failure (1)
% -------------------------------------------------------------------------
% This function is called by
% - mom.run
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -18,22 +35,11 @@ function [modelIrf, check] = cet_irf_matching_file(modelIrf, M_, options_mom_, y
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
% - column 1: gdp corresponds to GDPAGG + cumsum(muF)
% - column 6: real wage corresponds to wAGG + cumsum(muF)
% - column 7: consumption corresponds to cAGG + cumsum(muF)
% - column 7: investment corresponds to iAGG + cumsum(muF) + cumsum(mupsiF)
% - column 8: rel. price investment corresponds to cumsum(pinvestAGG)
% - column 11: vacancies corresponds to vTotAGG*u
% - column 12: labor force
% - column 13: separation rate
% - column 14: job finding rate corresponds to fAGG*f
% initialize indicator
check = 0;
modelIrf = 100.*modelIrf;
% initialize error indicator
error_indicator = 0;
% get indices of variables
idmuF = ismember(M_.endo_names,'muF');
idmupsiF = ismember(M_.endo_names,'mupsiF');
idGDPAGG = ismember(M_.endo_names,'GDPAGG');
@ -49,6 +55,7 @@ idpunempAGG = ismember(M_.endo_names,'unempAGG');
idvTotAGG = ismember(M_.endo_names,'vTotAGG');
idfAGG = ismember(M_.endo_names,'fAGG');
modelIrf = 100.*modelIrf; % convert to percent deviations
for jexo=1:M_.exo_nbr
if jexo==1
mulev_vec = 0;
@ -56,18 +63,17 @@ for jexo=1:M_.exo_nbr
else
mulev_vec = cumsum(modelIrf(:,idmuF,jexo));
mupsilev_vec = cumsum(modelIrf(:,idmupsiF,jexo));
end
modelIrf(:,idGDPAGG,jexo) = modelIrf(:,idGDPAGG,jexo) + mulev_vec;
modelIrf(:,idpiAGG,jexo) = modelIrf(:,idpiAGG,jexo);
modelIrf(:,idRAGG,jexo) = modelIrf(:,idRAGG,jexo);
modelIrf(:,idukAGG,jexo) = modelIrf(:,idukAGG,jexo);
modelIrf(:,idlAGG,jexo) = modelIrf(:,idlAGG,jexo);
modelIrf(:,idwAGG,jexo) = modelIrf(:,idwAGG,jexo) + mulev_vec;
modelIrf(:,idcAGG,jexo) = modelIrf(:,idcAGG,jexo) + mulev_vec;
modelIrf(:,idiAGG,jexo) = modelIrf(:,idiAGG,jexo) + mulev_vec + mupsilev_vec;
modelIrf(:,idpinvestAGG,jexo) = cumsum(modelIrf(:,idpinvestAGG,jexo));
modelIrf(:,idpunempAGG,jexo) = modelIrf(:,idpunempAGG,jexo)*M_.params(ismember(M_.param_names,'u'));
modelIrf(:,idvTotAGG,jexo) = modelIrf(:,idvTotAGG,jexo);
modelIrf(:,idfAGG,jexo) = modelIrf(:,idfAGG,jexo)*M_.params(ismember(M_.param_names,'f'));
end
end
modelIrf(:,idGDPAGG,jexo) = modelIrf(:,idGDPAGG,jexo) + mulev_vec; % gdp = GDPAGG + cumsum(muF)
modelIrf(:,idpiAGG,jexo) = modelIrf(:,idpiAGG,jexo); % inflation = piAGG
modelIrf(:,idRAGG,jexo) = modelIrf(:,idRAGG,jexo); % Nominal interest rate = RAGG
modelIrf(:,idukAGG,jexo) = modelIrf(:,idukAGG,jexo); % capital utilization = ukAGG
modelIrf(:,idlAGG,jexo) = modelIrf(:,idlAGG,jexo); % labor = lAGG
modelIrf(:,idwAGG,jexo) = modelIrf(:,idwAGG,jexo) + mulev_vec; % real wage = wAGG + cumsum(muF)
modelIrf(:,idcAGG,jexo) = modelIrf(:,idcAGG,jexo) + mulev_vec; % consumption = cAGG + cumsum(muF)
modelIrf(:,idiAGG,jexo) = modelIrf(:,idiAGG,jexo) + mulev_vec + mupsilev_vec; % investment = iAGG + cumsum(muF) + cumsum(mupsiF)
modelIrf(:,idpinvestAGG,jexo) = cumsum(modelIrf(:,idpinvestAGG,jexo)); % rel. price investment = cumsum(pinvestAGG)
modelIrf(:,idpunempAGG,jexo) = modelIrf(:,idpunempAGG,jexo)*M_.params(ismember(M_.param_names,'u')); % vacancies = vTotAGG*u
modelIrf(:,idvTotAGG,jexo) = modelIrf(:,idvTotAGG,jexo); % aggregated total vacancies = vTotAGG
modelIrf(:,idfAGG,jexo) = modelIrf(:,idfAGG,jexo)*M_.params(ismember(M_.param_names,'f')); % job finding rate = fAGG*f
end

View File

@ -1,7 +1,10 @@
function [matched_irfs, matched_irfs_weights] = cet_matched_irfs_no_interface_workaround(endo_names,exo_names)
% [matched_irfs, matched_irfs_weights] = cet_matched_irfs_no_interface_workaround(endo_names,exo_names)
% -------------------------------------------------------------------------
% Based on replication codes for Christiano, Eichenbaum, Trabandt (2016, Econometrica) - Unemployment and the Business Cycle
% This currently replaces the interface for the IRF Matching capabilities of the method_of_moments toolbox.
% =========================================================================
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -18,13 +21,12 @@ function [matched_irfs, matched_irfs_weights] = cet_matched_irfs_no_interface_wo
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
%% settings
irf_horizon = 15; % horizon of impulse responses to match
do_monetary_shock_only = 0; % if = 0 all shocks used in estimation
irf_horizon = 15; % horizon of impulse responses to match
do_monetary_shock_only = 0; % if = 0 all shocks are used in estimation
%% load VAR impulse responses from Christiano, Trabandt and Walentin (2010)- Handbook of Monetary Economics Chapter( see main text for reference).
%% load VAR impulse responses from Christiano, Trabandt and Walentin (2010)- Handbook of Monetary Economics Chapter
% IRFFF: impulse responses with respect to monetary policy shock
% IRFFz: impulse responses with respect to neutral tech shock
% IRFFu: impulse responses with respect to invest tech shock
@ -48,7 +50,7 @@ load('cet_data','IRFz','IRFzSE','IRFFF','IRFFFSE','IRFu','IRFuSE');
%% map empirical irf data to a model variable
% note that any further required transformations or manipulations to model variables (such as cumsum, adding muF and mupsiF)
% as well as selection of which periods to match occurs in an extra function cet_irf_matching.m
% as well as selection of which periods to match occurs in an extra function cet_irf_matching_file.m
% if no such function is given then the mapping is exact and the whole horizon will be considered
% irfs with respect to monetary shock
@ -81,4 +83,4 @@ for jexo = 1:length(SHOCKNAMES)
end
end
end
end

View File

@ -1,5 +1,7 @@
% -------------------------------------------------------------------------
% Functionality testing of Frequentist IRF matching
% =========================================================================
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -16,7 +18,7 @@
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
@#define ML = 1
@#include "cet_model.inc"

View File

@ -1,6 +1,6 @@
/*
* Model codes kindly provided by Mathias Trabandt, modified to work with
* Dynare 5.0 and newer.
* Parameters here are set such that the AOB Model is active.
*
* Please note that the following copyright notice only applies to this Dynare
* implementation of the model.
@ -23,70 +23,66 @@
* see <https://www.gnu.org/licenses/>.
*/
//////////////////////////////////////////////////////////////////////////
//Medium-sized DSGE model of Christiano, Eichenbaum and Trabandt //
//''Unemployment and Business Cycles'', Econometrica, forthcoming //
// //
//Based on parameters: AltOffer(AOB)/Nash bargaining, search/hiring cost//
//EHL labor market as nested cases. Checkout params.m //
// //
//Parameters here are set such that the AOB Model is active. That model //
//is estimated here and the code reproduces the results. //
//////////////////////////////////////////////////////////////////////////
/*
* Wanted: monetary policy shock is not in period t information set of agents
* (just as in VAR identified with Choleski decomp.)
* All other shocks are in period t information set.
* Solution: create two parallel economies which are structurally identical.
* One which is subject to the monetary shock only.
* This shock is not in period t info set.
* The other economy has the other shocks with the standard info set.
* Naming convention: variables ending with 'F' are in the economy with full info set
* variables ending with 'R' are in the restricted info set economy
* variables ending with 'AGG' are aggregated variables from both economies
* Note that in the 'R' economy, all exogenous variables are set to their steady states, except the monetary shock
* Likewise, in the 'F' economy, the monetary shock is set to zero while all other shocks are active
* Both steady states (i.e. 'R' and 'F' economy) are identical
* All variables are in logs
*/
//Wanted: monetary policy shock is not in period t information set of agents
//(just as in VAR identified with Choleski decomp.)
//All other shocks are in period t information set.
//Solution: create two parallel economies which are structually identical. One which is
//subject to the monetary shock only. This shock is not in period t info set.
//The other economy has the other shocks with the standard info set.
//variables ending with 'F' are in the economy with full info set
//variables ending with 'R' are in the restricted info set economy
//variables ending with 'AGG' are aggregated variables from both economies
//Note that in the 'R' economy, all exogenous variables are set to their steady states, except the monetary shock
//likewise, in the 'F' economy, the monetary shock is set to zero while all other shocks are active
//Note that both steady states (i.e. 'R' and 'F' economy) are identical
//All Variables in logs.
// Endogenous variables (R economy)
var wpR wpF wR wF psiR cR RR piR iR pkprimeR FR KR ukR
var
wpR wpF wR wF psiR cR RR piR iR pkprimeR FR KR ukR
kbarR lR xR varthetR phaloR yR JR UR GDPR fR vR
unempR VR AAR vTotR QR piwR whaloR FwR KwR
varthetpR;
varthetpR
;
// Endogenous variables (F economy)
var psiF cF RF piF iF pkprimeF FF KF ukF
var
psiF cF RF piF iF pkprimeF FF KF ukF
kbarF lF xF varthetF phaloF yF JF UF GDPF fF
vF unempF VF AAF vTotF QF piwF whaloF FwF KwF
muzF mupsiF muF nGF nPHIF nGAMF nDF nKAPF
varthetpF;
varthetpF
;
// Endogenous variables (AGG economy)
var GDPAGG piAGG RAGG ukAGG lAGG wAGG cAGG
iAGG unempAGG vTotAGG fAGG pinvestAGG;
var
GDPAGG piAGG RAGG ukAGG lAGG wAGG cAGG
iAGG unempAGG vTotAGG fAGG pinvestAGG
;
//Shocks
varexo epsR_eps muz_eps mupsi_eps;
// Shocks
varexo
epsR_eps muz_eps mupsi_eps
;
parameters ydiffdataPercent,idiffdataPercent,alfa,rho,u,Q,sigm,
parameters
ydiffdataPercent,idiffdataPercent,alfa,rho,u,Q,sigm,
betta,lambda,deltak,tau,nuf,etag,kappa,b,xi,D,delta,gamma,Spp
sigmab sigmaa phi rhoR rpi ry sig_epsR sigmam kappaf DSHARE deltapercent
recSHAREpercent iota doNash eta doEHL xiw lambdaw AEHL
f rhomupsi rhomuz sig_mupsi sig_muz thetaG thetaPHI thetaKAP thetaD
dolagZBAR profy varkappaw pibreve thetaw varkappaf M sigmaL
tau_SS epsilon_SS upsilon_SS zetac_SS g_SS pibar thetaGAM kappaw
unemp_SS vTot_SS alp1 alp2 alp3 alp4 bet1 bet2 bet3 s searchSHAREpercent;
unemp_SS vTot_SS alp1 alp2 alp3 alp4 bet1 bet2 bet3 s searchSHAREpercent
;
model;
///////////////////////////////////////////////////////////////////////////////////////
//R economy, monetary policy shock, current realization not in info set////////////////
///////////////////////////////////////////////////////////////////////////////////////
// auxiliary equations for R economy such that current realization fo monetary policy shock is not in information set
//information set in line with Choleski decomposition in VAR
//set exogenous variables to steady states (except monetary shock, of course)
#epsilonR=epsilon_SS;
@ -128,7 +124,7 @@ model;
#AAR_tp1=EXPECTATION(-1)(AAR(+1));
#RRinfo=EXPECTATION(-1)(RR);
%abbreviations
// abbreviations
#aofukprimeR=sigmab*sigmaa*(exp(ukR))+sigmab*(1-sigmaa);
#aofukprimeR_tp1=sigmab*sigmaa*(exp(ukR_tp1))+sigmab*(1-sigmaa);
#aofukR=0.5*sigmab*sigmaa*(exp(ukR))^2+sigmab*(1-sigmaa)*exp(ukR)+sigmab*((sigmaa/2)-1);
@ -263,7 +259,7 @@ doEHL*(1-(1-xiw)*(AEHL*exp(KwR)/(exp(FwR)*exp(wR)))^( 1/( 1-lambdaw*(1+sigmaL) )
#zetacF_tp1=zetac_SS;
#gF=g_SS;
%abbreviations
//abbreviations
#aofukprimeF=sigmab*sigmaa*(exp(ukF))+sigmab*(1-sigmaa);
#aofukprimeF_tp1=sigmab*sigmaa*(exp(ukF(+1)))+sigmab*(1-sigmaa);
#aofukF=0.5*sigmab*sigmaa*(exp(ukF))^2+sigmab*(1-sigmaa)*exp(ukF)+sigmab*((sigmaa/2)-1);
@ -445,36 +441,33 @@ end;
/////////////////////////////////
%read parameters from params.m
%model switches
% model switches
doNash=0; %if =0, alt offer barg. ; if =1, Nash bargaining; note: requires doEHL=0 below
doEHL=0; %if=0, alt offer barg or Nash barg; if=1, EHL labor market
@#define do_given_bets=0 // 1: given values for beta's in sharing rule
bet1 = 0.0907; %AOB sharing rule coefficients
%AOB sharing rule coefficients
bet1 = 0.0907;
bet2 = 28.9219;
bet3 = 0.4562;
%Labor market parameters
u=0.055; %unemp. rate
rho=0.9; %job survival rate
u=0.055; %unemp. rate
rho=0.9; %job survival rate
sigm=0.5570; %matching function share of unemp.
recSHAREpercent=0.5; %hiring cost para; hiring cost relative to output, in percent
searchSHAREpercent=0.05; %search cost para; hiring cost relative to output, in percent
searchSHAREpercent=0.05; %search cost para; hiring cost relative to output, in percent
DSHARE=0.6682; %unempl. benefits as share of w (replacement ratio)
Q=0.7; %vacancy filling rate
DSHARE=0.6682; %unempl. benefits as share of w (replacement ratio)
Q=0.7; %vacancy filling rate
deltapercent=0.3022; %prob. of barg. session determination
M=60; %Maximum bargaining rounds per quarter, needs to be an even number!!!!
deltapercent=0.3022; %prob. of barg. session determination
M=60; %maximum bargaining rounds per quarter, needs to be an even number!!!!
if M<2, error('M must be at least equal to 2!');end
if mod(M,2)==1, error('M must be an even number so that the worker makes the last offer!');end
%prices
xi=0.5841; %Calvo prices
xi=0.5841; %Calvo prices
pibar=1.00625; %inflation rate, gross, quarterly
kappaf=0; %price indexation to past inflation
varkappaf=1; %price indexation parameter; if kappaf=0 and varkappaf=1 and pibreve=1 -> no indexation at all.
@ -495,8 +488,8 @@ idiffdataPercent=2.9;
ydiffdataPercent=1.7;
%Preferences
betta=0.996783170280770; %discount factor households; implies 3% real rate
b=0.8320; %habit formation in consumption
betta=0.996783170280770; %discount factor households; implies 3% real rate
b=0.8320; %habit formation in consumption
%Monetary Policy by Taylor rule
rhoR = 0.8555; %Interest rate smoothing
@ -551,8 +544,6 @@ rhog = 0; %gov. spending
rhotaud = 0; %price markup
rhosigmam = 0; %matching function shock
iota=1; %This parameter does not apprear in the model anymore. Just ignore it.
@ -670,6 +661,7 @@ fAGG=log(f); pinvestAGG=-log(mupsi);
info = cet_steady_helper(1,Kw,J,V,U); % THIS CHECKS WHETHER STEADY-STATES ARE NONZERO
end;
resid;
steady;
check;

View File

@ -1,9 +1,11 @@
% -------------------------------------------------------------------------
% Functionality testing of Bayesian IRF matching with
% - Random-Walk Metropolis-Hastings
% - loading mode files
% - whether results are stored and can be accessed in different directories
% - reuse previous MCMC to define covariance of proposal
% =========================================================================
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -20,7 +22,7 @@
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
@#include "cet_model.inc"
options_.prior_interval= 0.95;

View File

@ -1,9 +1,11 @@
% -------------------------------------------------------------------------
% Functionality testing of Bayesian IRF matching with
% - slice
% - rotated slice with use_mh_covariance_matrix
% - rotated slice with slice_initialize_with_mode
% - reuse previous MCMC
% =========================================================================
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -20,7 +22,7 @@
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
@#include "cet_model.inc"
options_.prior_interval= 0.95;

View File

@ -1,9 +1,12 @@
function [info,nG,nKAP,nD,nGAM,nPHI] = cet_steady_helper(justCheck,Kw,J,V,U, dolagZBAR,mu,thetaG,thetaKAP,thetaD,thetaGAM,thetaPHI)
function [info,nG,nKAP,nD,nGAM,nPHI] = cet_steady_helper(justCheck,Kw,J,V,U,dolagZBAR,mu,thetaG,thetaKAP,thetaD,thetaGAM,thetaPHI)
% [info,nG,nKAP,nD,nGAM,nPHI] = cet_steady_helper(justCheck,Kw,J,V,U,dolagZBAR,mu,thetaG,thetaKAP,thetaD,thetaGAM,thetaPHI)
% -------------------------------------------------------------------------
% Based on cet_steadystate.m of the replication codes for
% Christiano, Eichenbaum, Trabandt (2016, Econometrica) - Unemployment and the Business Cycle;
% slightly modified such that most code is now in a steady_state_model block
% Christiano, Eichenbaum, Trabandt (2016, Econometrica);
% slightly modified such that most of the code is in a steady_state_model block
% and only the two if statements are computed in this helper function.
% =========================================================================
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -20,7 +23,6 @@ function [info,nG,nKAP,nD,nGAM,nPHI] = cet_steady_helper(justCheck,Kw,J,V,U, do
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
info = 0;
if justCheck

View File

@ -1,7 +1,9 @@
% -------------------------------------------------------------------------
% Functionality testing of Bayesian IRF matching with
% - Tailored-Randomized-Block Metropolis-Hastings
% - reuse previous MCMC mode for optimization
% =========================================================================
% -------------------------------------------------------------------------
% Copyright © 2023 Dynare Team
%
% This file is part of Dynare.
@ -18,7 +20,7 @@
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% =========================================================================
@#include "cet_model.inc"
options_.prior_interval= 0.95;