Page 1 of 1

Help for an error meesage in Dynare

PostPosted: Wed Feb 28, 2007 4:06 pm
by fmacit
I am trying to solve a DSGE model and I got the following errors in my code. I didn`t understand where do these errors stem from. I really appreciate if you could help me on this.

??? In an assignment A(I) = B, the number of elements in B and
I must be the same.

Error in ==> C:\dynare_v3\examples\code_fff.m
On line 42 ==> z(2 = exp(y(35)) -(eta*(exp(y(37)+y(1))*exp(y(5))^(alfah-1)+kappag*exp( ...

Error in ==> c:\dynare_v3\matlab\dynare_solve.m
On line 41 ==> fvec = feval(func,x,varargin{:});

Error in ==> c:\dynare_v3\matlab\steady_.m
On line 23 ==> [ys_,check] = dynare_solve([fname_ '_fff'],x);

Error in ==> c:\dynare_v3\matlab\steady.m
On line 7 ==> steady_;

Error in ==> C:\dynare_v3\examples\code.m
On line 206 ==> steady(0);

Error in ==> c:\dynare_v3\matlab\dynare.m
On line 26 ==> evalin('base',fname) ;

PostPosted: Wed Feb 28, 2007 6:02 pm
by admin
Usually, you get this error when one of the parameters in the corresponding equation hasn't been assigned a value (or has been mispeled).

An easy way to debug such mistakes is to set

dbstop if error
dynare code

then a window opens with code_fff. Putting the cursor on each parameter, you can see which one is empty.

Do 'dbquit' to get out of Matlab debug mode and 'dbclear all' to cancel debugging upon errors

Best

Michel

PostPosted: Wed Feb 28, 2007 8:33 pm
by fmacit
admin wrote:Usually, you get this error when one of the parameters in the corresponding equation hasn't been assigned a value (or has been mispeled).

An easy way to debug such mistakes is to set

dbstop if error
dynare code

then a window opens with code_fff. Putting the cursor on each parameter, you can see which one is empty.

Do 'dbquit' to get out of Matlab debug mode and 'dbclear all' to cancel debugging upon errors

Best

Michel


Hi Michel,
Thank you very much for your response. I did what you wrote. The cursor was one of my equations. I checked that equations several times but I couldn`t find a mistake in that. I also checked my parameters again. Do you think may the error come from somewhere else? Thanks again for your help.

PostPosted: Thu Mar 01, 2007 10:15 am
by MichelJuillard
Could you please upload code.mod or send it directly to me?

Thanks

Michel

PostPosted: Thu Mar 01, 2007 12:37 pm
by fmacit
MichelJuillard wrote:Could you please upload code.mod or send it directly to me?

Thanks

Michel


Hi Michel,
I am uploading the file here. Many thanks for your help. The problem seems to be with equation starting with "exp(wg)".

PostPosted: Fri Mar 02, 2007 2:57 pm
by fmacit
MichelJuillard wrote:Could you please upload code.mod or send it directly to me?

Thanks

Michel


Dear Michel,
I just wanted to see whether you were able to see what the problem with that code. I still couldn`t find the error. I really appreciate if you could let me know when you have something.

PostPosted: Sat Mar 03, 2007 5:58 pm
by MichelJuillard
This one was tricky! In Dynare version 3, you can't have a parameter called 'z'.
There is no such name conflicts in version 4.
BTW, parameter 'ksi' isn't declared in your model nor has a value

Best

Michel