Loglinear command in estimation

Hey all,

I have just recognized the options ‘loglinear’ in the estimation command. Now, I’m wondering if I do the right things:

  1. I have calculated the cyclical component of a real world time series (GDP): YData = log(YData) - hpfilter(log(YData),1600);
  2. I set Y as observable in my maximum liklihood estimation.
  3. In my model I write for example the equations like this: Y = A*K^(alpha)*L^(1-alpha).
  4. Then since YData has zero mean, I substract from Y in the model its steady state: YData = Y - Yss.

Do I have to use the ‘loglinear’ option in the estimation? If yes, do I then have to rewrite the model equations like this: exp(Y) = exp(A)*exp(K)^(alpha)*exp(L)^(1-alpha) ?

Then an other general question: is it better to estimate with growth rates rather than with the underlying time series, say: dY = Y - Y(-1) ?

Thanks for your answers!!!

Daniel

Has anyone a hint?

The log-linear option is for people entering their model for linearization and wanting Dynare to linearize it for them. When specifying it, Dynare will take your data to correspond with the actually specified model variables, i.e. it assumes that if

model; Y = A*K^(alpha)*L^(1-alpha); end; varobs Y;
that Y in the datafile is not logged. Rather, Dynare will take the logs for you when the option is specified.

Your questions relate to the general specification of observation equations. For most answers, see “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”, available here sites.google.com/site/pfeiferecon/dynare

Many many thanks again for your help!!! :slight_smile:

I will directly look at the document.

So far I have read your paper, I just have a single question left:

Data:

  1. I log my data.
  2. I substract the trend from the log data.
  3. I get a stationary time series with mean zero.

Model:
If I write a dynare code in non-linear expression. Then dynare solves it with linearization. Okay so far.
Now all variables in the model are not in logs and have a non zero mean (= steady state). So my observation equation has to be:

y_obs = log(y) - log(y_ss) (y_ss is the steady state of y).

This seems to me faster than writing every variable in the model with an exp(), like you do in Listing 6 on page 35.

Am I right???

Yes, you are. The reason why I put everything in exp() is that people are usually not just interested in estimation, but also in model IRFs for which you typically need Y to be logged in order to get the elasticities interpretation.

Great, thank you!