loglinear command in estimation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

loglinear command in estimation

Postby Daniel Bendel » Mon Dec 30, 2013 9:34 am

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
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: loglinear command in estimation

Postby Daniel Bendel » Fri Jan 03, 2014 11:19 am

Has anyone a hint?
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: loglinear command in estimation

Postby jpfeifer » Fri Jan 03, 2014 12:24 pm

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
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: loglinear command in estimation

Postby Daniel Bendel » Fri Jan 03, 2014 12:49 pm

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

I will directly look at the document.
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: loglinear command in estimation

Postby Daniel Bendel » Fri Jan 03, 2014 3:13 pm

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???
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: loglinear command in estimation

Postby jpfeifer » Fri Jan 03, 2014 6:25 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: loglinear command in estimation

Postby Daniel Bendel » Sat Jan 04, 2014 1:22 pm

Great, thank you!
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests