Help for an error meesage in Dynare

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.

Help for an error meesage in Dynare

Postby fmacit » Wed Feb 28, 2007 4:06 pm

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) ;
fmacit
 
Posts: 7
Joined: Tue Feb 27, 2007 3:20 pm

Postby admin » Wed Feb 28, 2007 6:02 pm

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
admin
 

Postby fmacit » Wed Feb 28, 2007 8:33 pm

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.
fmacit
 
Posts: 7
Joined: Tue Feb 27, 2007 3:20 pm

Postby MichelJuillard » Thu Mar 01, 2007 10:15 am

Could you please upload code.mod or send it directly to me?

Thanks

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby fmacit » Thu Mar 01, 2007 12:37 pm

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)".
Attachments
code.mod
(5.3 KiB) Downloaded 104 times
fmacit
 
Posts: 7
Joined: Tue Feb 27, 2007 3:20 pm

Postby fmacit » Fri Mar 02, 2007 2:57 pm

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.
fmacit
 
Posts: 7
Joined: Tue Feb 27, 2007 3:20 pm

Postby MichelJuillard » Sat Mar 03, 2007 5:58 pm

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 10 guests