i keep getting an error message...

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.

i keep getting an error message...

Postby hwangii » Sun Feb 21, 2010 9:06 pm

hi all,
after writing codes for a stochastic neoclassical growth model, i ran it, but i keep getting this error message:

??? Error: Unexpected MATLAB operator.
Error in ==> dynare at 132
evalin('base',fname) ;

but evalin is a command that is built in matlab. so why is it unexpected?
thanks,
sam hwang
hwangii
 
Posts: 3
Joined: Sun Feb 21, 2010 9:03 pm

Re: i keep getting an error message...

Postby AssiaEzzeroug » Mon Feb 22, 2010 7:11 am

Hi,

you may have made a syntax error. Could you post you mod-file please?

Best
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: i keep getting an error message...

Postby jpfeifer » Mon Feb 22, 2010 7:22 am

Maybe evalin itself is not the problem. All it does is call a command with the name contained in the string fname. Maybe the string contains something Matlab does not understand (probably an empty space). What is the name of your .mod-file? Dynare builds a Matlab .m-file with the same name as the .mod file and then calls it as a function in this line. If the name of the .mod-file contains empty spaces or characters like ";" "," "." or braces, there might be problems. You should be able to see the name of the .m-file created in your directory. Does it look like a regular function name? If this is not the case, just rename the .mod-file.
------------
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: i keep getting an error message...

Postby hwangii » Mon Feb 22, 2010 1:20 pm

here is my .mod file:


periods 1000;
var w n t_n c k y x g d b R r lamda;
varexo e1 e2 e3 e4 e5;

parameters ros rod theta cdy xdy rhog beta_t bdy t_c t_k delta delta_t psi t_nbar z_bar eta beta kappa;

ros=0.7;
rod=0.38;
theta=0.62;
cdy=0.59;
xdy=0.27;
rhog=0.9;
beta_t=0.9;
bdy=2.52;
t_c=0.05;
t_k=0.36;
delta=0.02;
delta_t=0.025;
psi=0.05;
t_nbar=0.28;
z_bar=1.005;
eta=2;
beta=0.8;
kappa=0.6;

model;
w=(ros)*n+(1/(1-t_nbar))*t_n+c+e1;
w=(rod)*(k-n);
y=theta*n+(1-theta)*k+e2;
y=cdy*c+xdy*x+g;
g=rhog*g(-1)+e3;
d=g+(1/beta_t)*b(-1)+(bdy/beta_t)*(R-e2)-t_c*cdy*c-t_k*(1-theta-(delta/delta_t)*xdy)*k-t_k*(1-theta)*r;
psi*d-e4=theta*t_n+theta*t_nbar*(w+n);
(1-psi)*d+e4=b;
k=(1-delta_t)*k(-1)+delta_t*x(-1)-e2;
r=-(theta/(1-theta))*w;
R=(1-(1-(1-t_k)*delta)*beta*(z_bar^(-eta)))*r;
lamda=-eta*c-(1-eta)*kappa*n;
0=lamda(+1)-lamda+R(+1)+e5;
end;

initval;
w=0;
n=0;
t_n=0;
c=0;
k=0;
y=0;
x=0;
g=0;
d=0;
b=0;
R=0;
r=0;
lamda=0;
end;

shocks;
var e1;
stderr 1;
var e2;
stderr 1;
var e3;
stderr 1;
var e4;
stderr 1;
var e5;
stderr 1;
end;

steady;
stoch_simul(dr_algo=0, periods=1000, irf=40);
rplot w n t_n c k y x g d b R r lamda;

and i did not download this from the web--i created with in the m-file editor and save it as .mod file...i don't know a standard way to create .mod file so that's what i did. and the name of this .mod file is pset2.mod.
hwangii
 
Posts: 3
Joined: Sun Feb 21, 2010 9:03 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests