# Loglinearized model

**URL:** <https://forum.dynare.org/t/loglinearized-model/1796>\
**Category:** Stochastic simulations\
**Created:** [12 January 2011 18:41 UTC](https://forum.dynare.org/t/loglinearized-model/1796 "2011-01-12T18:41:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jill1009](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/57b2e6/32.png) [@jill1009](https://forum.dynare.org/u/jill1009)\
**Post date:** [12 January 2011 18:41 UTC](https://forum.dynare.org/t/loglinearized-model/1796/1 "2011-01-12T18:41:19Z")

</div>

I tried one model which is not linearized, and dynare could find the steady state. But once I loglinearized the model, and keep everything else unchanged, steady state could not be found. Why that happened? Do I need to change the initial value for the loglinearized model? How to change it?  
Thanks,  
[ex5.mod](https://forum.dynare.org/uploads/default/original/1X/01e14d78cfdf6658d56051fabf0b29e36f571761.mod) (586 Bytes)  
[ex4.mod](https://forum.dynare.org/uploads/default/original/1X/d0b7bc10d603b54f9c597668609a2b30649d7181.mod) (558 Bytes)

---

<div class="post-metadata">

**Author:** ![jill1009](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/57b2e6/32.png) [@jill1009](https://forum.dynare.org/u/jill1009)\
**Post date:** [12 January 2011 18:45 UTC](https://forum.dynare.org/t/loglinearized-model/1796/2 "2011-01-12T18:45:47Z")

</div>

one more thing: if steady state value is needed in the loglinerized model, can i just use STEADY\_STATE(var name) to get the steady state value?  
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:** [13 January 2011 08:35 UTC](https://forum.dynare.org/t/loglinearized-model/1796/3 "2011-01-13T08:35:06Z")

</div>

Your problem is that in a loglinearized model, the steady state of the endogenous variables is 0. Hence, you do not need to provide starting values (or set them explicitely to 0). However, you have equations like

`STEADY_STATE(c)*c+STEADY_STATE(i)*i=STEADY_STATE(y)*y;
`  
where c is in logdeviations and has steady state 0, but STEADY\_STATE© refers to the steady state of the nonlinear model, i.e. the steady state of c in not loglinearized form. Because Dynare does not know the nonlinear model when you supply it with the loglinearized version, the steady\_state operator does not help you as it uses 0 as the steady state values of c,y and i which is incorrect.

---

<div class="post-metadata">

**Author:** ![jill1009](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/57b2e6/32.png) [@jill1009](https://forum.dynare.org/u/jill1009)\
**Post date:** [13 January 2011 16:28 UTC](https://forum.dynare.org/t/loglinearized-model/1796/4 "2011-01-13T16:28:16Z")

</div>

Hi jpfeifer,  
Thank you very much for you reply! Then, is there any method to deal with loglinearized model with steady state values of nonlinearized model as coefficients?

---

<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:** [13 January 2011 16:53 UTC](https://forum.dynare.org/t/loglinearized-model/1796/5 "2011-01-13T16:53:09Z")

</div>

In case of your simple model, do it by hand, i.e. for example define a paramter y\_ss and assign the steady state values from the non-linear model. By the way, if the non-linear model runs and finds the steady state, why use the log-linearized one?

---

<div class="post-metadata">

**Author:** ![jill1009](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/57b2e6/32.png) [@jill1009](https://forum.dynare.org/u/jill1009)\
**Post date:** [13 January 2011 17:03 UTC](https://forum.dynare.org/t/loglinearized-model/1796/6 "2011-01-13T17:03:13Z")

</div>

Hi jpfeifer,  
Thanks for your reply. Yes, for this simple case, use nonlinear model is enough. However, the model I use in my paper is much more complicated than this one, so I’m thinking of using the loglinearized version.

---

<div class="post-metadata">

**Author:** ![Roy123](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/46a35a/32.png) [@Roy123](https://forum.dynare.org/u/Roy123)\
**Post date:** [31 May 2011 21:33 UTC](https://forum.dynare.org/t/loglinearized-model/1796/7 "2011-05-31T21:33:04Z")

</div>

I join jill1009’s question. In my paper I have the log-linearized version of the model and want to solve the model using these equations. What steps are needed in order to find out the steady state values (which I will use as initial valies) of the endogenous variables. Can anyone post an example with a DSGE model being solved using its log-linearized version and with an initial value and stready state block ? For Dynare to solve my steady state values must I specify an initial guess in the initial value block for each endogenous variable ?

---

<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:** [1 June 2011 06:47 UTC](https://forum.dynare.org/t/loglinearized-model/1796/8 "2011-06-01T06:47:08Z")

</div>

If your model is loglinear, all variables typically have a steady state of 0. Dynare always uses 0 as the initial value if not told otherwise. Hence, if you use

`model(linear);
[loglinear model equations]
end;
steady;
check;
`  
it should work. You don’t even need an initval-block in this case.

The tricky part discussed in this post is if you do not know the coefficients in front of the loglinearized variables, e.g. you have loglinearized budget-constraint

```auto
c_ss*c +i_ss*i=y_ss*y;
```

where the c\_ss, i\_ss and y\_ss are the steady state values of the original model. Finding the steady state for c,i and y in the loglinearized equation is easy. They are simply 0. But the problem now is with the parameters. If you know them, everything is fine.

---

<div class="post-metadata">

**Author:** ![Roy123](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/46a35a/32.png) [@Roy123](https://forum.dynare.org/u/Roy123)\
**Post date:** [1 June 2011 11:46 UTC](https://forum.dynare.org/t/loglinearized-model/1796/9 "2011-06-01T11:46:25Z")

</div>

Thank you ! Indeed my problem is to find these steady state parameters from the non log linearized model. E.g. say i have an equation which looks like this:

mc(hat)=iL(ss)\*iL(hat)+W(hat)-A(hat)

where x(hat) denotes the percentage deviations of x from its steady state and x(ss) denotes the steady state value (parameter) of x. I have also an equation for iL(ss) which is,

iL(ss)=(1/beta)-1+constant/(W/P)(ss)\*0.03 (this is derived from the non-loglinearized model so it’s not zero of course).

and W/P (ss) is the real wage in steady state, which is defined by another equation with another missing steady state variable…

I’ve got more steady state equations in the model and solving for the parameters by hand is complicated. Therefore, my questions are, what is the optimal way to find these steady state parameters and implement them in the log-linearized equations in the model block (as my log linearized equations depend on some of these steady state parameters ) ? do I still need to specify initial values for the endogenous variables ? should I use “fsolve” in Matlab or can Dynare do this for me ?

Thanks in advance
