Difficulty when constructing a Jacobian matrix

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.

Difficulty when constructing a Jacobian matrix

Postby nishi » Fri Jun 01, 2007 1:59 am

Dear Colleagues,

I am currently building up a model for forecasting. The model is
getting fairly large and suddenly I got the following error message.
(DYNARE was working just fine with a smaller model and once I added
one new parameter, this error message poped up.)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
??? Subscript indices must either be real positive integers or logicals.

Error in ==> dr1 at 139
b = jacobia_(:,k0);
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I can guess that there is something wrong with k0, but wasn't able
to pin down what I miscoded. Have any of you encountered a similar
error message in the past? I will greatly appreciate if you could share
your experience in overcoming this error message.

Thank you very much in advance.

Nishi
nishi
 
Posts: 8
Joined: Fri Jun 01, 2007 1:23 am
Location: Ottawa, ON

Postby KarlWalentin » Tue Jul 03, 2007 3:19 pm

I do get the same error msg as you. For me the problem occured when I made a variable pre-determined, say, due to time to plan. The lines that I suspect cause the problem (at least in my case), is of the type
--
kb(-2)=log(constant) + q + I ;
--

So, I don't have an answer to your question, just a similar unsolved problem.

Karl
KarlWalentin
 
Posts: 16
Joined: Wed Feb 21, 2007 4:22 pm

Postby nishi » Wed Jul 04, 2007 8:07 pm

Thank you very much, Karl.
Jcaro, who is also a participant to this forum, pointed me out the same
thing as you have mentioned. I returned to my code and checked for the
timing (especially capital accumulation), but wasn't able to fix the bug.

Funny thing is when I reduce the number of parameters, this problem
goes away. But adding (even an innocuous one), this error message
pops out. I am not sure how the number of the parameters can affect
the size of Jacobian matrix.

But thanks for your comment. I appreciate your kindness.

Nishi
nishi
 
Posts: 8
Joined: Fri Jun 01, 2007 1:23 am
Location: Ottawa, ON


Return to Dynare help

Who is online

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