RegardingERROR: GHH.mod:59.1: syntax error, unexpected NAME

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Re: RegardingERROR: GHH.mod:59.1: syntax error, unexpected N

Postby Mave » 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!
Mave
 
Posts: 2
Joined: Mon Aug 19, 2013 10:39 am

Re: RegardingERROR: GHH.mod:59.1: syntax error, unexpected N

Postby jpfeifer » Thu Aug 22, 2013 10:33 am

Could it be that you run the code as a m-file and not a mod-file executed with Dynare? If you did the latter, it would tell you
Starting preprocessing of the model file ...
ERROR: There are 4 equations but 5 endogenous variables!

Error using dynare (line 131)
DYNARE: preprocessing failed
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Previous

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests