Syntax Error: unexpected NAME, expecting $end
Posted: 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:
Here is the exact error: "Caught Dynare exception: Parse error at example0.mod, line 29, column 1: syntax error, unexpected NAME, expecting $end"
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"