New User - Help!

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.

New User - Help!

Postby tom.pacey » Mon Jul 20, 2009 4:22 pm

Hi All

I am a new Dynare user and am not sure how to interpret the error messages. I have attempted to code up a fairly standard model (using the example in guide.pdf as a template) but cannot get it to work. Can anyone point me to a source for understanding the various error messages? Or, better yet, help me to understand the errors in my code?

Here is the code...

var y, c, k, n, l, i, z;
varexo e;

parameters alpha, beta, delta, rho, psi, phi;

alpha = .45;
beta = .1;
delta = .25;
rho = .1;
psi = .45;
phi = .1;

model;
((1-psi)/psi)*c/l = (1-alpha)*z*(k/n)^alpha;
c^(psi*(1-phi)-1) * l^((1-psi)*(1-phi)) = beta * c(+1)(psi(+1)*(1-phi(+1))-1) * l(+1)^((1-psi(+1))*(1-phi(+1))) * ( alpha*z(+1)*(n(+1)/k(+1))^(1-alpha) + 1 - delta );
log(z) = (1-rho)*log(z) + rho*log(z(-1)) + e;
1 = n + l;
k(+1) = i + (1-delta)*k;
y = c + i;
y = z*k^alpha*n^(1-alpha);
end;

initval;
y = 1;
c = .76;
l = .1;
k = 9;
n = .9;
i = .24;
z = 0;
end;

shocks;
var e = .000081;
end;

steady;

stoch_simul;

And the errors are...

??? Error using ==> feval
Error: File: standardmodel_fff.m Line: 8 Column: 59
()-indexing must appear last in an index expression.

Error in ==> dynare_solve at 41
fvec = feval(func,x,varargin{:});

Error in ==> steady_ at 23
[ys_,check] = dynare_solve([fname_ '_fff'],x);

Error in ==> steady at 7
steady_;

Error in ==> standardmodel at 99
steady(0);

Error in ==> dynare at 26
evalin('base',fname) ;

Thanks!

Tom
tom.pacey
 
Posts: 5
Joined: Mon Jul 20, 2009 3:08 pm

Re: New User - Help!

Postby rolf » Thu Jul 30, 2009 9:00 am

Tom
In your model you have log(z).
In the initval block you have
z = 0;
The log of 0 is probably causing some trouble.
rolf
 
Posts: 3
Joined: Thu Jul 30, 2009 8:56 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 16 guests