Page 1 of 1

Input model to dynare

PostPosted: Tue Dec 08, 2009 12:42 am
by Tartaglia
Hi everyone,

I am trying to insert my model into dynare, however for some reason I get an error code (example.mod:16.68: syntax error, unexpected ';') I have been perusing the code but can't spot the error. Any suggestions?

Thanks,
Tartaglia

var x i pi y n r;

varexo u m a;

parameters beta sigma phi rho theta kappa;

beta = 0.78;
sigma = 1.98;
phi = 1.04;
rho = 0.08;
theta = 0.69;
kappa = (1-beta)*(1-theta*beta)*(phi+sigma)/theta;

model;
x=x(+1)-(1/sigma)*(i-pi(+1)-(rho+sigma*(1+phi/(sigma+phi))*(1-rho)*a;
x=y-(1+phi)/(phi+sigma)*a;
n=y-a;
n=beta*n(+1)+kappa*x+u;
i=phi*i(-1)+phi*pi+phi*x+m;
u=rho*u(-1)+epsilon_u;
m=rho*m(-1)+epsilon_m;
a=rho*a(-1)+epsilon_a;
r=i-pi;
end;

initval;
x = 0;
i = 0;
pi = 2;
/*y = 0*/
n = 0;
r = 0;
end;

steady;

check;


shocks;
var epsilon_u = sigma^2;
end;

stoch simul(periods=2100);

Re: Input model to dynare

PostPosted: Tue Dec 08, 2009 3:23 am
by pakocica
Hi Tartaglia,

you have unbalanced brackets in the line:

x=x(+1)-(1/sigma)*(i-pi(+1)-(rho+sigma*(1+phi/(sigma+phi))*(1-rho)*a;

Since the right bracket is missing, Dynare does not allow you to end up the line by the symbol ';'.

Best,
Pavel

Re: Input model to dynare

PostPosted: Tue Dec 08, 2009 10:21 am
by Tartaglia
Oh yeah, that was it...., thank you so much!!