# Estimation error: "Index exceeds matrix dimensions."

**URL:** <https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490>\
**Category:** Dynare help (legacy posts)\
**Created:** [6 November 2013 04:11 UTC](https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490 "2013-11-06T04:11:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anitazhang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@anitazhang](https://forum.dynare.org/u/anitazhang)\
**Post date:** [6 November 2013 04:11 UTC](https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490/1 "2013-11-06T04:11:01Z")

</div>

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](https://forum.dynare.org/uploads/default/original/2X/8/8e1c6c267d326ed68cfbf54b181db16ed7a036d2.m) (5.92 KB)  
[bs.mod](https://forum.dynare.org/uploads/default/original/2X/8/8c3b4787c2a24335ffce126cbf9aa113497acc09.mod) (1.09 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [6 November 2013 20:25 UTC](https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490/2 "2013-11-06T20:25:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anitazhang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@anitazhang](https://forum.dynare.org/u/anitazhang)\
**Post date:** [7 November 2013 02:00 UTC](https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490/3 "2013-11-07T02:00:47Z")

</div>

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!

> [@jpfeifer](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [7 November 2013 08:12 UTC](https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490/4 "2013-11-07T08:12:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anitazhang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@anitazhang](https://forum.dynare.org/u/anitazhang)\
**Post date:** [7 November 2013 18:13 UTC](https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490/5 "2013-11-07T18:13:53Z")

</div>

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?

> [@MichelJuillard](#):
>
> Dynare is not meant for estimating static models. But, we should have a clearer error message.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [8 November 2013 06:23 UTC](https://forum.dynare.org/t/estimation-error-index-exceeds-matrix-dimensions/3490/6 "2013-11-08T06:23:06Z")

</div>

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](https://github.com/DynareTeam/dynare/issues/526)
