# Invalid Argument Error

**URL:** <https://forum.dynare.org/t/invalid-argument-error/3805>\
**Category:** Dynare help (legacy posts)\
**Created:** [2 April 2014 15:59 UTC](https://forum.dynare.org/t/invalid-argument-error/3805 "2014-04-02T15:59:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tirupam](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tirupam](https://forum.dynare.org/u/tirupam)\
**Post date:** [2 April 2014 15:59 UTC](https://forum.dynare.org/t/invalid-argument-error/3805/1 "2014-04-02T15:59:01Z")

</div>

Dear All, sorry if this is a very basic error, but I cannot figure this out.

In the attached code, when I am running using 4.3.1 or 4.4.2, I am getting the following error.

Starting Dynare (version 4.4.2).  
Starting preprocessing of the model file …  
Substitution of Expectation operator: added 2 auxiliary variables and equations.  
Found 22 equation(s).  
Evaluating expressions…done  
Computing static model derivatives:

- order 1  
Computing dynamic model derivatives:
- order 1  
ERROR: Invalid argument  
Processing outputs …  
Error using dynare (line 174)  
DYNARE: preprocessing failed

Please let me know if you can see the problem.  
Thanks and regards,  
Tirupam  
[dyn\_lev\_none.mod](https://forum.dynare.org/uploads/default/original/2X/c/c6995a57a42d9bdb6286372af3ce62c90b8f2766.mod) (2.07 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:** [3 April 2014 07:52 UTC](https://forum.dynare.org/t/invalid-argument-error/3805/2 "2014-04-03T07:52:35Z")

</div>

I cannot replicated the issue with the posted mod-file. Have you tried reinstalling Dynare?

---

<div class="post-metadata">

**Author:** ![tirupam](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tirupam](https://forum.dynare.org/u/tirupam)\
**Post date:** [3 April 2014 14:42 UTC](https://forum.dynare.org/t/invalid-argument-error/3805/3 "2014-04-03T14:42:07Z")

</div>

Thank you.  
I reinstalled Dynare multiple times, but I get the same error. I am using Matlab 2013b.  
I ran some other dynare codes using the same setup, and they are running fine.

I can try to investigate the ERROR that I am getting “INVALID ARGUMENT” if I can  
understand whether the problem is with my equations or with initial values etc.

---

<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:** [3 April 2014 15:08 UTC](https://forum.dynare.org/t/invalid-argument-error/3805/4 "2014-04-03T15:08:07Z")

</div>

Try putting the mod-file in an empty folder. As the file runs on my machine, there is nothing inherently wrong with it (except for problems with the steady state that cannot cause your error)

---

<div class="post-metadata">

**Author:** ![tirupam](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tirupam](https://forum.dynare.org/u/tirupam)\
**Post date:** [3 April 2014 15:14 UTC](https://forum.dynare.org/t/invalid-argument-error/3805/5 "2014-04-03T15:14:57Z")

</div>

Thank you very much Johannes. Putting the mod file in a separate folder ran the file okay (except other errors which I can handle now).  
Thank you again, your help really saved a lot of my time.  
Best regards,  
Tirupam

---

<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:** [3 April 2014 15:17 UTC](https://forum.dynare.org/t/invalid-argument-error/3805/6 "2014-04-03T15:17:00Z")

</div>

Ok. That means there is a conflict with a similarly named file in the original folder.

---

<div class="post-metadata">

**Author:** ![tirupam](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tirupam](https://forum.dynare.org/u/tirupam)\
**Post date:** [3 April 2014 15:23 UTC](https://forum.dynare.org/t/invalid-argument-error/3805/7 "2014-04-03T15:23:04Z")

</div>

That would be the explanation. Since running the dynare code creates other files with similar names, which may have errors, and might have been interfering.
