# IRF does not show all my endogenous variables

**URL:** <https://forum.dynare.org/t/irf-does-not-show-all-my-endogenous-variables/3526>\
**Category:** Dynare help (legacy posts)\
**Created:** [25 November 2013 18:28 UTC](https://forum.dynare.org/t/irf-does-not-show-all-my-endogenous-variables/3526 "2013-11-25T18:28:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VivianaAlfonso](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/7993a0/32.png) [@VivianaAlfonso](https://forum.dynare.org/u/VivianaAlfonso)\
**Post date:** [25 November 2013 18:28 UTC](https://forum.dynare.org/t/irf-does-not-show-all-my-endogenous-variables/3526/1 "2013-11-25T18:28:47Z")

</div>

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© = 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);

---

<div class="post-metadata">

**Author:** ![costa](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@costa](https://forum.dynare.org/u/costa)\
**Post date:** [26 November 2013 02:05 UTC](https://forum.dynare.org/t/irf-does-not-show-all-my-endogenous-variables/3526/2 "2013-11-26T02:05:45Z")

</div>

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;

---

<div class="post-metadata">

**Author:** ![costa](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@costa](https://forum.dynare.org/u/costa)\
**Post date:** [26 November 2013 02:16 UTC](https://forum.dynare.org/t/irf-does-not-show-all-my-endogenous-variables/3526/3 "2013-11-26T02:16:17Z")

</div>

I think the timing of you capital accumulation equation is wrong as well.

---

<div class="post-metadata">

**Author:** ![VivianaAlfonso](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/7993a0/32.png) [@VivianaAlfonso](https://forum.dynare.org/u/VivianaAlfonso)\
**Post date:** [26 November 2013 15:55 UTC](https://forum.dynare.org/t/irf-does-not-show-all-my-endogenous-variables/3526/4 "2013-11-26T15:55:00Z")

</div>

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,
