# Loglinearization

Hi!
I have two questions on log-linearization:

1. How can the following equation be log-linearized?

A_t+1=lambda_t* phi*[Z_t-A_t]+phi*A_t

2. If I let Dynare do the job, where can I see the log-linearized result?

With kind regards

Hi, regarding the second question, Dynare performs the log-linearisation or linearisation of the original model numerically (even if the the derivates are computed symbolically, at some point we need to evaluate them at the steady state). So there is no way to have a look at the approximated model (though a look at the Jacobian matrix, in the generated *_dynamic.m file, may provide bits of informations on this). Regarding the first question, I do not see the problem (I suppose you are aware of all the references about log linearisation). Maybe it would help if you use the \LaTeX syntax to describe the equation (just put the mathematical expressions betwwen single $, for inline expressions, or double$ for plain equations), and elaborate on your problem.

Best,

Thank you for your answer. The equation is: A_{t+1}=\lambda_t \Phi [Z_t-A_t]+\Phi A_t
The variables A_t, \lambda_t and Z_t have a steady state. When I log-linearize the equation (ie. Taylor expansion + taking logs), I find \hat{a}_{t+1}=\hat{\lambda_t}+\hat{z_t}. Thus, the constant parameter \Phi disappears. However, when I first multiply out A_{t+1}=\lambda_t \Phi [Z_t-A_t]+\Phi A_t=\lambda_t \Phi Z_t-\lambda_t\Phi A_t+\Phi A_t, I get a different solution, as \hat{\lambda} cancels out after log-linearization. So, I donâ€™t know which solution is the correct one.

With kind regards
P

Hi, the answer very much depends on the respective steady state values, because they will determine whether terms drop at first order.

I cannot provide an analytical solution for the steady state, as I have introduced endogenous cycles. Nevertheless, the equation has to be log-linearized around V*, Z* and /lambda*. It is similar to the problem of log-linearization of a single production function where K* and N* are simply given without further specification of the concrete steady state.

The question is not whether you know the exact values, but rather whether there is some restriction that some steady state is 0 so that terms drop when linearizing. Also, I donâ€™t see how you end up with your first linearization.

Ok, here is my loglinearization attempt, please correct me if this is flawed.
The log of A_{t+1}=\lambda_t* \phi*[Z_t-A_t]+\phi*A_t
is lnA_{t+1}=ln \lambda_t+ln \phi + ln Z_t - ln A_t +ln \phi + ln A_t.
A Taylor expansion yields ln A^* + 1/A^*(A_t-A^*)= ln \lambda^* + 1/\lambda^*(\lambda_t-\lambda^*)+ln Z^*+1/Z^*(Z_t-Z^*)- ln A^* - 1/A^* (A_t-A^*)+ ln A^* + 1/A^* (A_t-A^*) and this gives \hat {a}_{t+1}=\hat {\lambda}_{t}+\hat {z_t}

You cannot simply take the log of the individual variables. You would need to express A_{t+1}=e^{\ln A_{t+1}} and then do the Taylor expansion. Alternatively, at first order you can simply linearize and then expand. I did this quickly, so please check carefully:

\begin{align} 1\left( {{A_{t + 1}} - A} \right) =& \phi \left( {Z - A} \right)\left( {{\lambda _t} - \lambda } \right) + \lambda \phi \left( {{Z_t} - Z} \right) - \lambda \phi \left( {{A_t} - A} \right) + \phi \left( {{A_t} - A} \right) \hfill \\ A\frac{{\left( {{A_{t + 1}} - A} \right)}}{A} =& \phi \left( {Z - A} \right)\lambda \frac{{\left( {{\lambda _t} - \lambda } \right)}}{\lambda } + \lambda \phi Z\frac{{\left( {{Z_t} - Z} \right)}}{Z} - \lambda \phi A\frac{{\left( {{A_t} - A} \right)}}{A} + \phi A\frac{{\left( {{A_t} - A} \right)}}{A} \hfill \\ A{{\hat A}_{t + 1}} =& \phi \left( {Z - A} \right)\lambda {{\hat \lambda }_t} + \lambda \phi Z{{\hat Z}_t} - \lambda \phi A{{\hat A}_t} + \phi A{{\hat A}_t} \hfill \\ \end{align}
1 Like

Thank you! Now, one final question: Do I have to use the steady_state operator to enter this linearized equation in dynare?
As there is a difference of zero between log-linearized variables and their steady state, I expect the hat-variables to have steady-state value of zero.

Yes, the hatted variables are log deviations from steady state and have a steady state of 0. But the non-hatted steady states are the steady state levels (non-logged). So you need to compute them and enter them as parameters. Alternatively: Mix of equations in levels and log linearized form

Is it possible to transform the effects of log-linearized variables into level effects? For instance, when I have technology with balanced growth A_{t}/A_{t-1}=1+g, is it possible to use log-linearized technology a_t in order to draw a conclusion about A_t ?

Of course. If you know the steady state of the level and the percentage deviation from this steady state, you can easily back out the level.

Thanks! Just to get the interpretation right: If I know that A_t has a steady-state growth rate of 2% and my log-linearized variable after a shock in t=1 is a_t=-0.5, does this mean that compared to the balanced growth path growth is temporarily reduced to 1.5%? Or do I still have to transform the value of the log-linearized variable a_t, e.g. put the value into the exponential function?

That depends on your variable definition. What is a_t? If it is a percentage deviation from the growth trend, you can additively decompose the growth in A_t into the trend growth of 2% and the percentage deviation from this trend as you outline.

A_t is the level of total factor productivity. This level grows at rate g. So if I use the log-linearized level of TFP as denoted by a_t, I should get a level effect and the growth rate of TFP is temporarily lower, but as a_t returns to the steady state, A_t should again grow at the steady-state growth rate.
That would be my interpretation.

Yes, that should be correct.