Hello, I am trying to write dynare codes for basic rbc model with temporary and permanent shocks. I wrote this code below but I have still not figured out what I need to do for temporary and permanent shocks. How I can add them into the model? Can anyone explain that to me, please? Best.
var y c x l k w r A;
varexo z;
parameters alpha beta delta psi rho sigma;
alpha = 0.36;
beta = 0.99;
delta = 0.019;
psi = 1.75;
rho = 0.95;
sigma = 0.007;
model;
1/c = beta * (1/c(+1) * (1+r(+1)-delta));
psi * c = w * (1-l);
w = A * (1-alpha) * k^alpha * l^(-alpha);
r = A * alpha * k^(alpha-1) * l^(1-alpha);
c + k(+1) = A * k^alpha * l^(1-alpha) + (1-delta)k;
log(A) = rho log(A(-1)) + z;
y = A * k ^ alpha * l ^ ( 1-alpha );
i = y - c;
steady_state_model;
r = 1 / beta - 1 + delta;
k_y = alpha / r;
x_y = delta * k_y;
c_y = 1 - i_y;
l = (1-alpha) / (psi * c_y + 1 - alpha);
k_l = k_y ^ (1/(1-alpha));
k = k_l * l;
A = 1;
y = A * k^alpha * l^(1-alpha);
w = (1-alpha) * y / l;
i = i_y * y;
c = c_y * y;
end;
shocks;
var z;
stderr sigma;
end;
stoch_simul (order = 2, irf = 40);