Page 1 of 1

IRF does not show all my endogenous variables

PostPosted: Mon Nov 25, 2013 6:28 pm
by VivianaAlfonso
Hello. I am new use of dynare and I have a simple model where I need to produce IRF. I use the command stoch_simul to produce them but it does not show the response for all my endogenous variables ( I have less than 12). Does anybody knows why is this happening? Does it mean that the variable does not respond to the shock?

Thank you for your answers.

Here my code:

var k, i, y, z, c, mu, l, k_l;
varexo e_z, e_c;

parameters alpha, delta, rho_z, rho_c, theta, sigma_z, sigma_c, r,w;

r = 0.04;
rho_z = 0.9;
sigma_z = 0.05;
theta = 0.9;
alpha = 0.35;
delta= 1;
rho_c=0.9;
sigma_c=0.15;
w = 0.36;

model;
k(+1)=k*(1-delta)+i ;
i = c+(theta*k(+1))-(w*l) ;
log(z) = rho_z*log(z(-1)) - e_z ;
log(c) = rho_c*log(c(-1)) - e_c ;
w*(1+mu)=(1-alpha)*z*((k/l)^alpha);
(1-delta)*(1+mu(+1))+alpha*z(+1)*((k(+1)/l(+1))^(alpha-1))+mu(+1)*theta=(1+mu)*(1+r);
y=z*(k^alpha)*(l^(1-alpha));
k_l=k/l;
end;


initval;
mu =0.1;
l=1/(w+((w*(1+mu)/(1-alpha))^(1/alpha))*(delta-theta));
k=((w*(1+mu)/(1-alpha))^(1/alpha))*l;
i=delta*k;
z=1;
y=(k^alpha)*(l^(1-alpha));
c=1;
k_l=k/l;
end;
steady;
check;

shocks;
var e_c; stderr sigma_c;
end;
stoch_simul(order=1,nocorr,nomoments,irf=40);

Re: IRF does not show all my endogenous variables

PostPosted: Tue Nov 26, 2013 2:05 am
by costa
I didnĀ“t run your code but I think you forgot to put the other shock (technology shock) in the "shocks" part of the code. You have two shocks, but apparently only e_c is in the shocks part.


shocks;
var e_c; stderr sigma_c;
end;

Re: IRF does not show all my endogenous variables

PostPosted: Tue Nov 26, 2013 2:16 am
by costa
I think the timing of you capital accumulation equation is wrong as well.

Re: IRF does not show all my endogenous variables

PostPosted: Tue Nov 26, 2013 3:55 pm
by VivianaAlfonso
Thank you for your reply. Indeed, I corrected the capital accumulation equation and now it works. Since I am new user, I am not very aware of the timing requirements of the program to indicate which is the predetermined variable.
Best,