Estimation error: "Index exceeds matrix dimensions."

dear all,

Thank you for help in advance! I really appreciate it. When I use the estimation command, dynare gives the error: “Index exceeds matrix dimensions.” I did found lots of posts for similar issues, but still could not found the problem of my codes.

My model is a quite simple one: a linear model with only four endogenous variables. can any one help take a look and let me know where goes wrong? I’ve attached the codes and the data. Thanks a lot!
Data3.m (5.92 KB)
bs.mod (1.09 KB)

Seems to be a bug. We will look into it and keep you updated. Apart from that, your model is not linear (although you claim so with the linear statement) and only features contemporaneous variables, no leads or lags.

thank you for your reply. yes, this model only features contemporaneous variables. but i don’t understand why it is not linear. from what i can see, it is linear in the four endogenous variables (ibr rr bm m1) and the four exogenous variables (e_m e_l e_r e_s). looking forward to your reply. thanks a lot!

Dynare is not meant for estimating static models. But, we should have a clearer error message.

Thank you for your comments. for clarification, do you imply that the estimation algorithm used by dynare is not able to estimate static models? or, there’s just a stopping rule that makes dynare stop when it identifies the model is static? if the latter is true, is it possible let dynare just ignore that stopping rule and move on?

It is not possible. Dynare computes decision rules where control variables are functions of predetermined states. But static models have no predetermined states, so Dynare crashes. We will take care of this issue in the future, but for now you cannot estimate static models. See github.com/DynareTeam/dynare/issues/526