Dear all,
I'm trying to simulate an open economy new keynesian model as in Lubik & schorfheide JME (2007) and many others.
I keep getting the following error message:
??? Error: Unexpected MATLAB expression.
Error in ==> dynare at 26
evalin('base',fname) ;
Any idea on what's going on? Below is my .mod file.
Any help is greatly appreciated.
Thanks,
Rodrigo
===============================================
periods 1000;
var y, phi, r, q, exch, A, phistar, ystar;
varexo er, eq, eystar, ephistar, ez;
parameters beta, tau, k, alpha, rhor, rhoq, rhoystar, rhophistar, rhoz, gamma1, gamma2, gamma3;
beta=0.96;
tau=0.5;
k=0.5;
alpha=0.10;
rhor=0.5;
rhoq=0.4;
rhoystar=0.9;
rhophistar=0.8;
rhoz=0.2;
gammma1=1.5;
gammma2=0.25;
gammma3=0.25;
model(linear);
y=y(+1)-(tau+alpha*(2-alpha)*(1-tau))*(r-phi(+1))-rhoz*(A-A(-1))-alpha*(tau+alpha*(2-alpha)*(1-tau))*q(+1)+alpha*(2-alpha)*((1-tau)/tau)*(ystar);
phi=beta*phi(+1)+alpha*beta*q(+1)-(alpha*q)+(k/(tau+alpha*(2-alpha)*(1-tau)))*(y+alpha*(2-alpha)*((1-tau)/tau)*ystar);
r=rhor*r(-1)+(1-rhor)*(gamma1*phi+gamma2*y+gamma3*exch)+er;
exch=phi-(1-alpha)*q-phistar;
q=rhoq*q(-1)+eq;
A=A(-1)+ez;
phistar=rhophistar*phistar(-1)+ephistar;
ystar=rhoystar*ystar(-1)+eystar;
end;
shocks;
var er; stderr 0.01;
var eq; stderr 0.01;
var ez; stderr 0.01;
var eystar; stderr 0.01;
var ephistar; stderr 0.01;
end;
stoch_simul(drop=200);