Why do we log linearize a model by hand?

Hello,
Some of you may find that it is such a silly question, but I cannot understand why sometimes people log linearize a model before putting it into Dynare. What is the purpose behind that given that the software does perfectly the job? Thanks.

Historically, the computer did not do it for you. So some of it is path dependence.
Nowadays, people loglinearize their model for two reasons:

  1. To gain intuition into the working of the model. With linear equations that is often easier
  2. There are cases where the nonlinear equations do not have a closed form expression you could enter into the computer (the New Keynesian Phillips Curve with Calvo pricing and markup shocks being the prime example)
1 Like

I got it, thank you !

For estimated models, is it not also because the non-linear model would need to be log-linearised around (potentially) 1000s of sets of parameter values, and that would slow down the estimation considerably? Or is that less of a concern these days?
Reuben

@punnoosejacob No, that is not a problem. Software packages like Dynare compute the required derivatives analytically once at the beginning of the preprocessing step and then only evaluate them for the parameter values during estimation. You do not need to linearize again for every draw.

The same would happen in a linear model. In that case the researcher computed the linearized equations at the beginning and for each parameter draw the required objects are evaluated.

@punnoosejacob and @jpfeifer, Even if we compute the derivatives only once (since Dynare 4.x, before the derivatives were numerical, ie slower and less accurate), with a nonlinear model the cost of evaluating the Jacobian matrix at the the steady state is greater, since we need first to compute the steady state for each vector of parameter. This cost can be very important if you do not provide a closed form expression for the steady state and use nonlinear solver. I doubt that it would make a significant difference on small models… And on larger models, I think that the time spent in getting the (log-)linearised version of the model right is larger than the potential benefit in terms of speed. So I never linearise models, unless I need to check something (for instance to compare with a paper where the authors use the linearised version of the model). Also, the nonlinear formulation force us to take seriously the long term restrictions of the model (ie it is easy to violate these restrictions, either by mistake or intentionally, when working with the approximated version of the model).

Best,
Stéphane.

1 Like

@stepan-a I don’t consider this to be a matter of linearity vs. nonlinearity. Unless you have a purely multiplicative model where all steady state values drop in the linearized version, you will need to compute the steady state of the original level variables for both the linearized and the nonlinear version of the model.