# Conflict between log-linearization and bayesian estimation

Hello people, I am new to dynare. My doubt is that I have log-linearised my model manually using Uhlig method. The log linearized equations usually contains steady state variables of endogenous variables.
Those steady state values of course depend on deep parameters.

During the iteration of estimation, the estimated parameter will be updated and the steady state values should also be updated accordingly. In some models, all steady state values could be express as some function of deep parameters explicitly. So I could replace those steady state by relationship with parameters and estimating those parameters.

It seems to me it is not possible to do that. I try to solve the steady state by hand. But unfortunately it is highly nonlinear, and I could not explicitly express this variable as function of estimated parameters.

My question is that, if it is not possible to express steady state values as explicit function of parameters, how could I do bayesian estimation, in particular make dynare keeping the dependence of steady state values on estimated parameters during iteration. Thanks for your help!!

If you do not provide a closed form expression for the steady state or a routine for computing the steady state, Dynare will do its best to compute the steady state with a nonlinear solver (by looking for the zero of the static equations, ie the model’s equations where y_t = \bar y \forall t and \mathbb V [\varepsilon_t] = 0).

Note that very often, the dimension of the nonlinear problem, for which no closed form is available, can be reduced to a very small number of equations. The most efficient approach is then to write a steadystate file where a Newton-like solver is used to solve the concentrated problem and where the steady state levels for the other variables is computed afterwards).

Best,
Stéphane

From what you describe, you should work with the nonlinear model, not a linearized one. In that case, you have all the options that @stepan-a described.

Thanx Stepan for the promt reply.

@jpfeifer: Hey if that is the case, then how big and complex DSGE models are solved through log-linearization?

I was observing the DSGE model of the Fed (publicly available on their website). And what I inferred is that they have estimated (bayesian) even some of the steady states variables appearing in the log-linearized equations, which could not be explicitly exressed in terms of deep paramters.

I am not sure I understand the question. Even if you enter the model nonlinearly, the computer will still do the linearization for you. There are only a few cases where manual loglinearization provides advantages (if a closed form analytical expression does not exist or when the equations are purely multiplicative so that steady state drop out)

I am not 100% sure, but my guess is that the FED does not have a preprocessor (as Dynare) able to parse the non linear FOCs and build the (log)linear approximation of the model to be solved algebraically. So they have to do the log linearisation by hand and fill the matrices defining the problem to be solved (with something like gensys, by Chris Sims). There is no advantage here… Except if you really want to see the log linearized equations (because it may help for the interpretation). Sometimes I find this exercise insightful on a couple of equations (for instance the Phillips curve for comparison with the literature). But I would not advise to do that on the whole model, because it is very easy to make mistakes in the derivation, it is time consuming, and the code is difficult to maintain or develop.

Best,
Stéphane.

1 Like

Okay, So I think now I have 2 options:

1. Estimate the paramters and solve the model in non-linear form. As in this, I dont have to calculate steady state manually, and dynare will do this for me. And whatever values of paramters and steady state I get, use it to calibrate the log-linearized version of my model. I want log-linearized model because its result has a good interpretation.

2. I can try to make my model as multplicative as possible. Suppose, instead of total consumption C = C1 + C2, I will take C = C1*C2. These kinds of multplicative aggregation, will cancel out Css, C1ss and C2ss. The same thing can be followed in most of the equations. And I can estimate and solve my log - linear model.

What should be my ideal choice?

I only understand (but actually I am not so sure I understand) the second approach in small models if you are looking for a closed form solution of the dynamic model. If this is not the case, I would choose the first approach.

Note however that even If you decide to follow this strategy, it would be wise to provide the analytical steady state to Dynare (using the steady_state_model block or writing a steady state file). Otherwise Dynare will use a Newton like algorithm to solve for the steady state. Resorting on such a general algorithm will slowdown the estimation of the parameters. Also you cannot be sure that the non linear solver will always succeed. For some parameters (during the optimisation search or the MCMC) the solver may systematically fail, resulting in potentially biased estimates.

Best,
Stéphane.

Okay, Thank You…