could someone please tell me what is stored in matrix iy_
(especially in the second row)?
I run into the following error when checking the BK conditions:
??? Subscript indices must either be real positive integers or logicals.
Error in ==> dr1 at 139
b = jacobia_(:,k0);
It seems to be related to the fact that the second row of iy_ contains a zero (since I have ykmin_=1).
I’d appreciate your help!
matrix iy_ notes at which lag does a variable appear in the model.
When there is only one lag and one lead, the matrix has 3 rows.
The first rows describe which variables appear with a lag, the second row which variable appear in the model at the current period, the third one, which variable appears with a lead.
The columns represent the variables in alphabetical order (in version 3).
In your case, one variable doesn’t appear at the current period. Dynare version 3 requires that all variables appear at the current period. For most models, it is a reasonable consistency requirement.
But not for all, Dynare version 4 dropped that requirement.
Thank you very much, this is very useful!
I had the same problem, i.e. a model where two variables did not appear in the current period (b/c of time-to-plan). To work around the restriction in Dynare 3 I introduced dummy variables and set them equal to the current period value of the variables that didn’t previously appear in the current period.
This is rather ugly though. Is there a better way to work around this restriction?
Although Michel make the meaning clear, but I have trouble to find the correspondence between iy_ (or M_.lead_lag_incidence in Dynare V4). For example, there are only 10 variables (9 endogenous and one exogenous), but some number like 11, 12,13,14 showing up in iy_. I don’t know what they are for. Do you guys have any idea on it?
I am working with the version 4.0.2, and apparently it still has the same issue - each variable must appear in the “current” period at least once in the code.
Hi, This has been corrected yesterday in branches/4.0 (under our subversion server). The correction will be in dynare version 4.0.4 (to be released in a couple of weeks). Beware that in most cases the absence of a variable in the current period is the consequence of a model misconception or an coding error in the mod file.