Page 1 of 1

loglinear command in estimation

PostPosted: Mon Dec 30, 2013 9:34 am
by Daniel Bendel
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

Re: loglinear command in estimation

PostPosted: Fri Jan 03, 2014 11:19 am
by Daniel Bendel
Has anyone a hint?

Re: loglinear command in estimation

PostPosted: Fri Jan 03, 2014 12:24 pm
by jpfeifer
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
Code: Select all
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 https://sites.google.com/site/pfeiferecon/dynare

Re: loglinear command in estimation

PostPosted: Fri Jan 03, 2014 12:49 pm
by Daniel Bendel
Many many thanks again for your help!!! :)

I will directly look at the document.

Re: loglinear command in estimation

PostPosted: Fri Jan 03, 2014 3:13 pm
by Daniel Bendel
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???

Re: loglinear command in estimation

PostPosted: Fri Jan 03, 2014 6:25 pm
by jpfeifer
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.

Re: loglinear command in estimation

PostPosted: Sat Jan 04, 2014 1:22 pm
by Daniel Bendel
Great, thank you!