# Smets-Wouters in Dynare 4

**URL:** <https://forum.dynare.org/t/smets-wouters-in-dynare-4/881>\
**Category:** Dynare v4 (legacy)\
**Created:** [10 December 2008 03:16 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881 "2008-12-10T03:16:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbigben](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/eb8c5e/32.png) [@bigbigben](https://forum.dynare.org/u/bigbigben)\
**Post date:** [10 December 2008 03:16 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/1 "2008-12-10T03:16:52Z")

</div>

I try to run the code along with Smets-Wouters (2007 AER). They do have a dynare code for their model, however, dynare v4 won’t run it since the error in the following line:

model(linear);

#usmodel\_stst;

:  
:  
:  
end;

I understand the symbol # allows some computation between “model” and “end”, but it can’t evaluate the function like usmodel\_stst.m used in SW (2007). I think it works for version 3, so why remove this nice feature?

---

<div class="post-metadata">

**Author:** ![p.gelain](https://forum.dynare.org/letter_avatar_proxy/v4/letter/p/439d5e/32.png) [@p.gelain](https://forum.dynare.org/u/p.gelain)\
**Post date:** [11 December 2008 14:16 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/2 "2008-12-11T14:16:20Z")

</div>

Hi bigbigben

I have the same problems with the # sign, and I am trying to figure out how to solve them. Anyway, I think that if you want to include a file (as in your case) you should use the following syntax

@#include ''usmodel\_stst.m"

Put everything in one line. I do not know if you have to put or not the ; sign at the end of the line (although I think you do not have to do it).

Paolo

---

<div class="post-metadata">

**Author:** ![dal](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@dal](https://forum.dynare.org/u/dal)\
**Post date:** [3 March 2009 16:28 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/3 "2009-03-03T16:28:54Z")

</div>

I have exactly the same problem.  
It seems that, the previous version of dynare allowed to use an auxiliary m-file to define the steady state of the model in a separate (eg. usmodel\_stst.m). I suppose inserting the “#” symbol is a way to say that some of the parameters envolved in the equations defining the steady state has to be estimated. Does anyone know how to proceed in dynare 4?

---

<div class="post-metadata">

**Author:** ![billsnow](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@billsnow](https://forum.dynare.org/u/billsnow)\
**Post date:** [16 March 2009 04:05 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/4 "2009-03-16T04:05:48Z")

</div>

Hi,

Would you mind telling me where to download their Dynare codes? Thanks.

Bill

---

<div class="post-metadata">

**Author:** ![bogmunds](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@bogmunds](https://forum.dynare.org/u/bogmunds)\
**Post date:** [18 March 2009 23:28 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/5 "2009-03-18T23:28:15Z")

</div>

I’ve been looking for the code as well - could someone post it?

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [19 March 2009 08:47 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/6 "2009-03-19T08:47:27Z")

</div>

Hi, you can obtain the code and data used by Smets and Wouters [here](http://www.e-aer.org/data/june07/20041254_data.zip).

Best, Stéphane.

---

<div class="post-metadata">

**Author:** ![bogmunds](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@bogmunds](https://forum.dynare.org/u/bogmunds)\
**Post date:** [19 March 2009 19:19 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/7 "2009-03-19T19:19:31Z")

</div>

Thanks!

---

<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:** [24 July 2017 13:28 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/8 "2017-07-24T13:28:59Z")

</div>

Closed on 24 July 2017 13:28 UTC



---

<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:** [24 July 2017 13:29 UTC](https://forum.dynare.org/t/smets-wouters-in-dynare-4/881/9 "2017-07-24T13:29:46Z")

</div>

Archived on 24 July 2017 13:29 UTC


