# Henriksson (2005) - Problem with linearize model

**URL:** <https://forum.dynare.org/t/henriksson-2005-problem-with-linearize-model/5732>\
**Category:** Dynare help (legacy posts)\
**Created:** [22 August 2016 15:59 UTC](https://forum.dynare.org/t/henriksson-2005-problem-with-linearize-model/5732 "2016-08-22T15:59:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpinom](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@fpinom](https://forum.dynare.org/u/fpinom)\
**Post date:** [22 August 2016 15:59 UTC](https://forum.dynare.org/t/henriksson-2005-problem-with-linearize-model/5732/1 "2016-08-22T15:59:20Z")

</div>

Hi, I’am trying to replicate these paper of Henriksson (2005) [papers.ssrn.com/sol3/papers.cfm?abstract\_id=782644](http://papers.ssrn.com/sol3/papers.cfm?abstract_id=782644), but I have a doubt about the linearized model that applied the author. In specific, that says: “To solve the model, we linearize it around steady state, where \tilde{x}\_t = x\_t - \bar{x}” defines a deviation from steady state". So in my usual nomenclature is it in logs, but in my replication I have trouble of definition of variables. In appendix, there are equation in equilbrium and linearized model. My problem is that: I’am confuse with nomenclature for close the model and obtain the results. For example I started with the principal equations, I that equilibrium is necessary, so I put these in model? :

```auto

%----------------------------------------------------------------
% Linearized model
%----------------------------------------------------------------

model(linear); 

//First order condition (2.28), (2,29) and (2.30): 
c(+1) = c - psi*barc*(lambda*c + mu* m + varphi*l);
m = chi*(R/(R-1))*c;
omega*(l/barl) = (w/barw) - (p_t/barp_t) - (c/barc);

//Linearized budget constraint of household, government and central bank:
(b_h/barp_t) + (b_f/barp_t) + (b_m/barp_t) - (d/barp_t) = (1+r) * ((b_h(-1)/barp_t) + (b_f(-1)/barp_t) + (b_m(-1)/barp_t) - (d(-1)/barp_t)) + y_t - c_t - g_t + barp_n*(y_t - c_t - g_t) + p_n*(bary_t - barc_t - barg_t);

//Non-traded goods market eq. and relationship with net foreign assets:
(f/barp_t) = (b_h/barp_t) + (b_f/barp_t) + (b_m/barp_t) - (d/barp_t);
(f/barp_t) = (1+r)*(f(-1)/barp_t) + y_t - c_t - g_t;

// In whole consumption terms:
(f/barp) = R*(f(-1)/barp) + y_t - c_t - g_t - (R-1)*(barf/barp)*(p/barp);

// Applying the parameters we obtain:
(f/barp) = (1+r)*(f(-1)/barp) + (gamma*barl*((bara_t/bara_n)^(gamma-1))* a_t) - c - r*(1-gamma)*(fbar/pbar)*(a_t/bara_t);

// Forward by one period, and with assumption of parameters we obtain: 
(f(+1)/barp) - (1 - psi*barc)*(f/barp) = (1+r)*((f/barp) - (1 - psi*barc*(f(-1)/barp))) + gamma*barl*((bara_t/bara_n)^(gamma-1))*(a_t(+1) - (1 - psi*barc)*a_t) - (c(+1) - (1 - psi*barc)*c) - r*(1-gamma)*(barf/barp)*(1/bara_n)*(a_t(+1) - (1 - psi*barc)*a_t);

//Taking into consideration the FOC, the process for A_t and government expenditure exogenous:

((f/barp) - (1 - psi*barc)*(f(-1)/barp)) - ((f(+1)/barp) - (1 - psi*barc)*(f/barp)) = (1/(1+r))*(gamma*barl*((bara_t/bara_n)^(gamma-1)) - r*(1 - gamma)*(barf/barp)*(1/bara_t))*(1 - rho - psi*barc)*a_t;
```

Any help is welcome. Thank you. Fernando.

---

<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:** [25 August 2016 09:11 UTC](https://forum.dynare.org/t/henriksson-2005-problem-with-linearize-model/5732/2 "2016-08-25T09:11:19Z")

</div>

In this case, you need to distinguish the level variables that are used for the steady state (the x\_t) and the variables in log deviations (the tilde x\_t). Your linearized model will be written in terms of the latter. The former will only be used to fix coefficients. Take a look at Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” [sites.google.com/site/pfeiferecon/Pfeifer\_2013\_Observation\_Equations.pdf](https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf) for examples of this.

---

<div class="post-metadata">

**Author:** ![fpinom](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@fpinom](https://forum.dynare.org/u/fpinom)\
**Post date:** [26 August 2016 00:08 UTC](https://forum.dynare.org/t/henriksson-2005-problem-with-linearize-model/5732/3 "2016-08-26T00:08:28Z")

</div>

Thank you. I will review the document.
