Page 1 of 1

shock equations for model written in their non-linear form

PostPosted: Wed Oct 23, 2013 10:28 am
by jmohimon
Dear dynare users,

I have a question regarding the shock equations for model written in their non-linear form (so that dynare does the linearization job).
I have downloaded the Adolfson et al. 2005 code written in dynare by Schmidt (already in its linearized form). I have tried to replicate the same model on my own but this time by writing the equation in their non-linear form and ask dynare to make the first order approximation. I then compared the results for both models. I think I have everything correct except that the size of some shock does not correspond. When I look at IRF of the non-linearized model, some correspond exactly to the linear one while some other correspond in shape, but not in size.
My conclusion is that I failed to write the shock equation. I take the consumption preference shock to illustrate. What the original code does is
ZETA_C=rho_zetac*ZETA_C(-1)+epsilon_zetac;

While in my code I have tried
ZETA_C = rho_zetac*ZETA_C(-1) + (1-rho_zetac)*zeta_c + epsilon_zetac;

As well as
log(ZETA_C) = rho_zetac*log(ZETA_C(-1)) + (1-rho_zetac)*log(zeta_c) + epsilon_zetac;

where zeta_c is steady sate of ZETA_C.

And we both define the shock as
var epsilon_zetac;
stderr 0.157;

But we end up with different IRF (same shape, different size). I’m doing something wrong?

With best regards,
Jolan

Re: shock equations for model written in their non-linear fo

PostPosted: Wed Oct 23, 2013 6:19 pm
by jpfeifer
Without seeing how those variables enter the actual equations, it is hard to tell. One general question: did you write down the model for linearization or log-linearization (putting everything in exp())? If not, the latter may explain the different sizes.

Re: shock equations for model written in their non-linear fo

PostPosted: Thu Oct 24, 2013 11:38 am
by jmohimon
Thank you for your answer. I did not use the exp. In particular, the FOC in the households’ problem w.r.t consumption reads

ZETA_C/(C-b*C(-1)/MU_Z) - beta*b*ZETA_C(+1)/(C(+1)*MU_Z(+1) - b*C) - PSI_Z*GAMMA_CD*(1+TAU_C) = 0;

Does it mean that my model is written for linearization? And how should i interpret my shock size in this case?
With best regards,
Jolan

Re: shock equations for model written in their non-linear fo

PostPosted: Fri Oct 25, 2013 5:24 am
by jpfeifer
Yes, your model is written for linearization. Thus, your IRFs are the absolute deviations from steady state, not the percentage deviations. E.g. if the SS of C is 2 and the IRF is 0.2 in period 1, this is a 0.2/2=0.1=10% deviation from steady state. If you put
Code: Select all
log_C=log(C)

as an additional line to your model, log_C will give you the IRF in percentage deviations.

Re: shock equations for model written in their non-linear fo

PostPosted: Wed Oct 30, 2013 8:57 am
by jmohimon
Thank you for your reply. I have updated my dynare file following your advice and now I think I have the percentage deviations from steady state. But there are still some shocks that give IRFs with different scales and I can’t find why. Here I have posted the 2 mod files (as well as the m files calling them and making the plots of the IRFs) because I could have forgot to mention something worth. With best regards,
Jolan