Regarding Priors for baseline New Keynesian DSGE Model

Hello everyone…

I am trying to estimate the baseline New Keynesian DSGE model (Reference: Jordi Gali, Chapter 3, 2015)

Replication File (Source: Prof. Pfeifer)

I am trying to specify the priors for BAYESIAN ESTIMATION:
I am using three data series: real gdp, inflation, and 3 month treasury bill yield
(quarterly data on indian economy)

varobs dy pi_obs r_obs;

estimated_params;
// PARAM NAME, INITVAL, LB, UB, PRIOR_SHAPE, PRIOR_P1, PRIOR_P2, PRIOR_P3, PRIOR_P4, JSCALE
// PRIOR_SHAPE: BETA_PDF, GAMMA_PDF, NORMAL_PDF, INV_GAMMA_PDF

stderr eps_a, 1, 0.01,3,INV_GAMMA_PDF,0.1,2;

@#if money_growth_rule==0
stderr eps_nu, 0.25, 0.01,3,INV_GAMMA_PDF,0.1,2;
@#else
stderr eps_m, 0.25, 0.01,3,INV_GAMMA_PDF,0.1,2;
@#endif

stderr eps_z, 0.5, 0.01,3,INV_GAMMA_PDF,0.1,2;

alppha, 1/4, 0.01,1,NORMAL_PDF,0.3,0.05;
betta, 0.9995, 0.01,2,GAMMA_PDF,0.25,0.1;
siggma, 1, 0.25,3,NORMAL_PDF,1.50,0.375;
varphi, 5, 0.25,10,NORMAL_PDF,2,0.75;
phi_pi, 1.5, 1.0,3,NORMAL_PDF,1.5,0.25;
phi_y, 0.125, 0.001,0.5,NORMAL_PDF,0.125,0.05;
theta, 3/4, 0.5,0.95,BETA_PDF,0.5,0.10;
rho_a, 0.9, .01,.9999,BETA_PDF,0.5,0.20;

@#if money_growth_rule==0
rho_nu, 0.5, .01,.9999,BETA_PDF,0.5,0.20;
@#else
rho_m, 0.5, .01,.9999,BETA_PDF,0.5,0.20;
@#endif
rho_z, 0.5, .01,.9999,BETA_PDF,0.5,0.20;
// epsilon

end;

I have specified these priors. I am getting results properly during usual simulation, but upon estimation, its showing B-K conditions are not satisfied (unstable equilibrium).

Any suggestions for correcting the prior parameters would be really helpful, (urgent)…

That mod-file features a unit root. Did you set the diffuse_filter option?

1 Like

Okay, I did it… thank you so much sir… , at least dynare is running now!
However, the acceptance ratio is quite high…, meaning I have to keep increasing the scale of the jumping distribution until that ratio falls down to 0.234 ??

also, on running the mod file as it is (… the usual standard calibration)…
accurate results are obtained.

However, while I was trying the estimation part, the model_diagnostics command gave this information:

%==========================================
There are 2 eigenvalue(s) larger than 1 in modulus for 2 forward-looking variable(s)
The rank condition is verified.

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 1 collinear relationships between the variables and the equations
Collinear variables:
m_nominal
p
w
Collinear equations
2 3 4 8 9 11 18 19

MODEL_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root
MODEL_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.
MODEL_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,
MODEL_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.
% ====================================

Why did matlab not create any problem during the stochastic simulation, but notified such errors during estimation?
=> do i have to do some manipulations and solve this collinearity issue by merging some equations, or something else, for that baseline NK-DSGE model?

Again, your model has a unit root. The collinearity warning is expected and can be ignored in this case.

1 Like

ohh alright… thank you sir !