ERROR: syntax error (line 174)

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.

ERROR: syntax error (line 174)

Postby marina » Tue Dec 23, 2014 12:17 am

Hey guys,
can you help me? What's the problem with this model? It's quite urgent...

var w, p, n, c, m, i, g, r, y;

varexo eta, e;

parameters phi, beta, gamma, sigma, Y_ss, rhog, i_ss, thetam;

set_param_value('beta',beta);
set_param_value('gamma',gamma);
set_param_value('phi',phi);
set_param_value('sigma',sigma);
set_param_value('rhog',rhog);
set_param_value('Y_ss',Y_ss);
i_ss=(1/beta)-1;
thetam=sigma/(phi*(1-gamma)+sigma);

model(linear);
w-p=phi*n+sigma*c;
m-p=sigma*c-(1/1+i_ss)*i;
sigma*c=sigma*c(+1)-i+(p(+1)-p);
w-p=0;
y=(sigma/(phi*(1-gamma)+sigma))*g;
c=(((-phi)*thetam)/sigma)*g;
i=r+p(+1)-p;
r=(1-rhog)*phi*thetam*g;
g=(rhog*g(-1)+eta);
end;

initval;
p=0;
r=0;
i=0;
n=0;
y=0;
w=0;
c=0;
g=0;
m=0;
eta=0;
e=0;
end;
steady;

endval;
p=p_ss;
r=r_ss;
i=i_ss;
n=n_ss;
y=y_ss;
w=w_ss;
c=c_ss;
e=0.1;
eta=-e;
end;
steady;

check;

simul(periods=100);


And it tells me
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
ERROR: tabe5_loopMarina2.mod: line 55, cols 1-3: syntax error, unexpected END

Error using dynare (line 174)
DYNARE: preprocessing failed

Error in final_loopMarina2 (line 23)
dynare tabe5_loopMarina2.mod noclearall
Attachments
tabe5_loopMarina2.mod
(911 Bytes) Downloaded 101 times
marina
 
Posts: 3
Joined: Tue Dec 23, 2014 12:11 am

Re: ERROR: syntax error (line 174)

Postby jpfeifer » Thu Dec 25, 2014 10:11 am

It seems you uploaded the wrong file. There is a semicolon missing at the end of basically every line.
------------
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

Re: ERROR: syntax error (line 174)

Postby marina » Fri Dec 26, 2014 7:56 pm

That's true, sorry! the file is this one, but I think it's just a problem of the model, becuase the matrix used for calculation is singular
Attachments
tabe5_loopMarina3.mod
(956 Bytes) Downloaded 91 times
marina
 
Posts: 3
Joined: Tue Dec 23, 2014 12:11 am

Re: ERROR: syntax error (line 174)

Postby jpfeifer » Sun Dec 28, 2014 9:49 am

You are confusing a few things here. Your model is log-linear so the steady state for the variables is 0. The experiment where you conduct the transition to the steady state of the unlinearized model does not make sense.

But more importantly, you are trying to determine undetermined nominal variables. In many models, only inflation, relative prices, and the real variables are determined, but not the nominal prices. To solve this issue, define w-p e.g. as real_wage and m-p as real_money.
------------
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

Re: ERROR: syntax error (line 174)

Postby marina » Sun Dec 28, 2014 1:08 pm

Thanks for the comments!! I made confusion calculating the transition to the steady state of the unlinearized model, thanks for making me notice it!
And I will work on ridefying nominal variables, thanks!
marina
 
Posts: 3
Joined: Tue Dec 23, 2014 12:11 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests