I am new learner of dynare. I recently make a small adjustment of RBC_Monop_JFV.mod by adding an economic sector nx(illustrating net export) in the model economy. however the dynare can not run the new mod. Could somebody help me to find where is the wrong point?
------------------------the original RBC_Monop_JFV.mod is:---------------------------------------------------
// Adapted from Jesus Fernandez-Villaverde, Basic RBC Model with Monopolistic Competion Philadelphia, March 3, 2005
var y c k i l w r z;
varexo e;
parameters beta psi delta alpha rho gamma sigma epsilon;
alpha = 0.33;
beta = 0.99;
delta = 0.023;
psi = 1.75;
rho = 0.95;
sigma = (0.007/(1-alpha));
epsilon = 10;
model;
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l) = w;
c+i = y;
y = (k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;
r = y*((epsilon-1)/epsilon)*alpha/k(-1);
i = k-(1-delta)*k(-1);
z = rho*z(-1)+e;
end;
initval;
k = 9;
c = 0.76;
l = 0.3;
w = 2.07;
r = 0.03;
y=0.922;
z = 0;
e = 0;
end;
steady;
check;
shocks;
var e = sigma^2;
end;
stoch_simul(periods=2100);
------------------------the adjustend RBC_Monop_JFV.mod is:---------------------------------------------------
var y c k i nx l y_l w r z;
varexo e1 e2;
parameters beta psi delta alpha rho1 rho2 gamma sigma epsilon;
alpha = 0.33;
beta = 0.99;
delta = 0.023;
psi = 1.75;
rho1 = 0.95;
rho2 = 0.95;
sigma = (0.007/(1-alpha));
epsilon = 10;
model;
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l) = w;
c+i+nx = y;
y = (k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;
r = y*((epsilon-1)/epsilon)*alpha/k(-1);
i = k-(1-delta)*k(-1);
y_l = y/l;
z = rho1*z(-1)+e1;
nx = rho2*nx(-1)+e2;
end;
initval;
k = 9;
c = 0.76;
l = 0.3;
w = 2.07;
r = 0.03;
z = 0;
e1 = 0;
nx = 0;
e2 = 0;
end;
steady;
check;
shocks;
var e1 = sigma^2;
var e2 = sigma^2;
end;
stoch_simul(periods=2100);