Syntax Error: unexpected NAME, expecting $end

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.

Syntax Error: unexpected NAME, expecting $end

Postby dobster936 » Wed Nov 18, 2015 1:26 am

I've written a basic mod file that runs on Dynare but not Dynare++ and I can't for the life of my figure out well.

After my model, when I type "shocks;" it says it is expecting an end. Even when I add an end I get "unexpected END, expecting $end".

Here is my mod file:
Code: Select all
var k c r z;
 
varexo e;

parameters beta eta rho phi z_bar delta sigmasq;

beta = 1/1.01;
eta = 1;
rho = 0.36;
phi = 0.95;
z_bar = 1;
delta = 0.25;
sigmasq = 0.712^2;

model;
c = log(((exp(c(+1) * eta))/ (beta * exp(r)))^(1 / eta));
k = log(exp(z) * exp(k(-1))^rho + (1 - delta) * exp(k(-1)) - exp(c));
z = (1 - phi) * log(z_bar) + phi * z(-1) + e;
r = log(exp(z) * phi * exp(k * (rho - 1)) + 1 - delta);
end;

initval;
k = log((((1 / beta) - 1 + delta) / (exp(z) * rho))^(1 / (rho -1 )));
r = log(1 / beta);
c = log(exp(z) * exp(rho * k) + (1 - delta) * exp(k));
z = 0;
end;

shocks;

var e = sigmasq;

end;

steady;


Here is the exact error: "Caught Dynare exception: Parse error at example0.mod, line 29, column 1: syntax error, unexpected NAME, expecting $end"
dobster936
 
Posts: 4
Joined: Tue Oct 06, 2015 4:08 pm

Re: Syntax Error: unexpected NAME, expecting $end

Postby jpfeifer » Wed Nov 18, 2015 9:59 am

The way to specify the shocks block in Dynare++ is different from Dynare. There is no shocks block, only a vcov-statement. See e.g. the Dynare++ tutorial. You should have
Code: Select all
vcov=[0.712^2]

instead of the shocks block
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests