# Replication Issue with Schmitt-Groh´e and Uribe (2015)

**URL:** <https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636>\
**Category:** Steady state\
**Created:** [28 November 2023 13:11 UTC](https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636 "2023-11-28T13:11:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marukyoko](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/8c91f0/32.png) [@marukyoko](https://forum.dynare.org/u/marukyoko)\
**Post date:** [28 November 2023 13:11 UTC](https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636/1 "2023-11-28T13:11:37Z")

</div>

Dear all,

I am trying to replicate the results of the theoretical model in the paper by Schmitt-Groh´e and Uribe (2015). Here is a link to the paper: [https://www.columbia.edu/~mu2166/tot/paper.pdf](https://www.columbia.edu/~mu2166/tot/paper.pdf)

For the stead state values, I have tried both the authors’ process of setting up the steady state values and declared them in equations one after another, and I tried manually computing those steady state value, but none worked. Both returned the message “The steady state has NaNs or Inf”. I just started using Dynare and will really appreciate if you could help me on this replication.

Here is a link to the replication code the authors provided: [https://www.columbia.edu/~mu2166/tot/index.htm](https://www.columbia.edu/~mu2166/tot/index.htm)

My code (Rep (S&U).mod) and the code I used for reference (mxns.m and mxns\_ss.m) are attached.  
[Rep (S&U).mod](https://forum.dynare.org/uploads/short-url/gaXq73Zp73Pn9LNgAy4H8uD1JD6.mod) (11.8 KB)  
[mxns.m](https://forum.dynare.org/uploads/short-url/vzJAfI1srYTRNJVmTVtXnSeoE9t.m) (8.3 KB)  
[mxns\_ss.m](https://forum.dynare.org/uploads/short-url/44JSuNwRJsJ2FHd9Og2Igi0LC6t.m) (4.2 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:** [4 December 2023 14:18 UTC](https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636/2 "2023-12-04T14:18:07Z")

</div>

That is strange. The original codes provide the analytical steady state. You should be able to port them straight into Dynare.

---

<div class="post-metadata">

**Author:** ![marukyoko](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/8c91f0/32.png) [@marukyoko](https://forum.dynare.org/u/marukyoko)\
**Post date:** [4 December 2023 14:52 UTC](https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636/3 "2023-12-04T14:52:47Z")

</div>

I updated the model since then. I used the steady state provided in the original codes, and the only way I could make the model running was by changing the (t+1) time into (t-1) time.  
The impulse responses I got were mostly different from the original ones (figure 3 in the paper). I wonder whether it is because of changing the timing of the variables, but besides that, nothing else could make the model running.  
I have attached the updated code below.  
[wun.mod](https://forum.dynare.org/uploads/short-url/nILw5itBPGnCYCDcgekQYc7SM9F.mod) (15.4 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:** [4 December 2023 14:56 UTC](https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636/4 "2023-12-04T14:56:20Z")

</div>

Please be more precise. For which equations do you change the timing. You should be able to identify the exogenous processes and the state variables in the original codes. Only for them the timing must be adjusted.

---

<div class="post-metadata">

**Author:** ![marukyoko](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/8c91f0/32.png) [@marukyoko](https://forum.dynare.org/u/marukyoko)\
**Post date:** [4 December 2023 19:29 UTC](https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636/5 "2023-12-04T19:29:23Z")

</div>

They are the Euler equations from line 188-198 of the updated codes.  
More precisely, it was the la(-1) of those equations.

---

<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:** [5 December 2023 09:18 UTC](https://forum.dynare.org/t/replication-issue-with-schmitt-groh-e-and-uribe-2015/24636/6 "2023-12-05T09:18:37Z")

</div>

No, that is clearly wrong. Rather, you have

```auto
states_in_logs = [km kx kn tfp_m tfp_x tfp_n tot];
statevar = [d states_in_logs s];

```

Those need to be declared as

```auto
predetermined_variables km kx kn d;

```

I think you already shifted the exogenous processes by one period.
