where am i wrong

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.

where am i wrong

Postby blackeif » Thu Jul 01, 2010 11:23 am

I am new learner of dynare. I recently make a small adjustment of RBC_Monop_JFV.mod by adding an economic sector nx(illustrating net export) in the model economy. however the dynare can not run the new mod. Could somebody help me to find where is the wrong point?

------------------------the original RBC_Monop_JFV.mod is:---------------------------------------------------
// Adapted from Jesus Fernandez-Villaverde, Basic RBC Model with Monopolistic Competion Philadelphia, March 3, 2005
var y c k i l w r z;
varexo e;
parameters beta psi delta alpha rho gamma sigma epsilon;

alpha = 0.33;
beta = 0.99;
delta = 0.023;
psi = 1.75;
rho = 0.95;
sigma = (0.007/(1-alpha));
epsilon = 10;

model;
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l) = w;
c+i = y;
y = (k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;
r = y*((epsilon-1)/epsilon)*alpha/k(-1);
i = k-(1-delta)*k(-1);
z = rho*z(-1)+e;
end;

initval;
k = 9;
c = 0.76;
l = 0.3;
w = 2.07;
r = 0.03;
y=0.922;
z = 0;
e = 0;
end;

steady;

check;

shocks;
var e = sigma^2;
end;

stoch_simul(periods=2100);

------------------------the adjustend RBC_Monop_JFV.mod is:---------------------------------------------------

var y c k i nx l y_l w r z;
varexo e1 e2;
parameters beta psi delta alpha rho1 rho2 gamma sigma epsilon;
alpha = 0.33;
beta = 0.99;
delta = 0.023;
psi = 1.75;
rho1 = 0.95;
rho2 = 0.95;
sigma = (0.007/(1-alpha));
epsilon = 10;
model;
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l) = w;
c+i+nx = y;
y = (k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;
r = y*((epsilon-1)/epsilon)*alpha/k(-1);
i = k-(1-delta)*k(-1);
y_l = y/l;
z = rho1*z(-1)+e1;
nx = rho2*nx(-1)+e2;
end;
initval;
k = 9;
c = 0.76;
l = 0.3;
w = 2.07;
r = 0.03;
z = 0;
e1 = 0;
nx = 0;
e2 = 0;
end;
steady;
check;
shocks;
var e1 = sigma^2;
var e2 = sigma^2;
end;
stoch_simul(periods=2100);
original RBC_Monop_JFV.mod
(817 Bytes) Downloaded 71 times
adjusted RBC_Monop_JFV.mod
(789 Bytes) Downloaded 71 times
Last edited by blackeif on Thu Jul 01, 2010 12:01 pm, edited 1 time in total.
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm

Re: where am i wrong

Postby jpfeifer » Thu Jul 01, 2010 11:27 am

What is the problem? It runs fine on my machine.
------------
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: where am i wrong

Postby blackeif » Thu Jul 01, 2010 11:49 am

the mod is run on dynare4.04/4.12 in matlab,the machine said the adjusted mod is unreconized,but the original mod works well. can you tell me the adjusted mod runs in which environmnet? thanks
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm

Re: where am i wrong

Postby jpfeifer » Thu Jul 01, 2010 12:09 pm

Your filename is not allowed to contain empty spaces. Moreover, there were some strange characters in front of
nx = 0;
e2 = 0;
which must be deleted. The attached file should run.
Attachments
adjusted_RBC_Monop_JFV.mod
Corrected File
(789 Bytes) Downloaded 74 times
Last edited by jpfeifer on Thu Jul 01, 2010 12:16 pm, edited 1 time in total.
------------
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: where am i wrong

Postby blackeif » Thu Jul 01, 2010 12:12 pm

thank you very much for help, i will try it soon
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm

Re: where am i wrong

Postby blackeif » Fri Jul 02, 2010 3:46 am

i try it in my machine and it works, thank you!
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests