Re: RegardingERROR: GHH.mod:59.1: syntax error, unexpected N
Posted: Thu Aug 22, 2013 10:02 am
I tried to replicate the program above and i trink it's completely the same:
var c k h l z;
varexo e;
parameters beta alpha gamma theta omega rho sigma;
beta = .96;
alpha = .29;
gamma= 2;
theta = .6;
omega= 1.42;
rho=.51;
sigma = .045;
model;
exp(l)=((1-alpha)*(exp(k(-1)*exp(h)))^alpha*exp(l)^(-alpha))^(1/theta);
exp(h)=(alpha*(exp(k(-1))*exp(h))^(alpha-1)*exp(l)^(1-alpha)*(exp(z)))^(1/(omega-1));
((exp(c)-(exp(l)^(1+theta))/(1+theta))^(-gamma))/(exp(z))=beta*(exp(c(+1))-(exp(l(+1))^(1+theta))/(1+theta))^(-gamma)*(alpha*(exp(k)*exp(h(+1)))^(alpha-1)*exp(l(+1))^(1-alpha)*exp(h(+1))+(1-(1/omega)*exp(h(+1))^omega)/(exp(z(+1))));
(exp(k(-1))*exp(h))^alpha*exp(l)^(1-alpha)=exp(c)+exp(k)/(exp(z))-(exp(k(-1))*(1-(1/omega)*exp(h)^omega))/(exp(z));
end;
initval;
k=log(0.567966);
l=log(0.3610);
h=log(0.251526);
c=log(0.2196);
z=0;
e=0;
end;
steady;
check;
shocks;
var e = sigma^2;
end;
stoch_simul(periods=2100,order=1);
but i get the following error message:
Error: File: Abschlusspaper.m Line: 22 Column: 58
The expression to the left of the equals sign is not a valid target for an assignment.
(that's the line with the third equation)
Can you tell me what the problem is?
Thank you in advance!
var c k h l z;
varexo e;
parameters beta alpha gamma theta omega rho sigma;
beta = .96;
alpha = .29;
gamma= 2;
theta = .6;
omega= 1.42;
rho=.51;
sigma = .045;
model;
exp(l)=((1-alpha)*(exp(k(-1)*exp(h)))^alpha*exp(l)^(-alpha))^(1/theta);
exp(h)=(alpha*(exp(k(-1))*exp(h))^(alpha-1)*exp(l)^(1-alpha)*(exp(z)))^(1/(omega-1));
((exp(c)-(exp(l)^(1+theta))/(1+theta))^(-gamma))/(exp(z))=beta*(exp(c(+1))-(exp(l(+1))^(1+theta))/(1+theta))^(-gamma)*(alpha*(exp(k)*exp(h(+1)))^(alpha-1)*exp(l(+1))^(1-alpha)*exp(h(+1))+(1-(1/omega)*exp(h(+1))^omega)/(exp(z(+1))));
(exp(k(-1))*exp(h))^alpha*exp(l)^(1-alpha)=exp(c)+exp(k)/(exp(z))-(exp(k(-1))*(1-(1/omega)*exp(h)^omega))/(exp(z));
end;
initval;
k=log(0.567966);
l=log(0.3610);
h=log(0.251526);
c=log(0.2196);
z=0;
e=0;
end;
steady;
check;
shocks;
var e = sigma^2;
end;
stoch_simul(periods=2100,order=1);
but i get the following error message:
Error: File: Abschlusspaper.m Line: 22 Column: 58
The expression to the left of the equals sign is not a valid target for an assignment.
(that's the line with the third equation)
Can you tell me what the problem is?
Thank you in advance!