how to input the log-linearized model

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.

how to input the log-linearized model

Postby firefoxxp » Fri Jan 11, 2013 1:24 pm

Hi, I log-linearize a model and use the command model (linear), but I find both the command "model(linear)" and the command "model" get the same eigenvalues, the rest of the mod file is exactly the same
I wonder why the result is the same when I change "model(linear)" into "model". I believe I must input the log-linearized model in a wrong way , so how to input the log-linearized model . Thanks in advance.
firefoxxp
 
Posts: 17
Joined: Fri Jan 11, 2013 1:02 pm

Re: how to input the log-linearized model

Postby SébastienVillemot » Tue Jan 15, 2013 11:18 am

Dynare always does a linearization.

So if you want to do a log-linearization, you should write your model after applying a variable transformation: replace X by exp(X) (so that the new X is the log of the original X).
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: how to input the log-linearized model

Postby firefoxxp » Tue Jan 15, 2013 3:07 pm

Thank you for your reply, but I am still a little confused, maybe I can get it from a specific example.
Assume an original equation is 1/c=beta*(1/c(+1)), the log-linearized form is -c_hat=-c_hat(+1),where c_hat=logc-logcc as cc is the steady state, I take the log linearization because the steady state of c_hat is zero.
I define c_hat as a endogenous variable, use the command model(linear), and input the equation "-c_hat=-c_hat(+1)",and at last use the stoch_simul. Could you please tell me wheather the above is correct.
If I input exp(cc) in which cc represent logc, then the steady state of cc is not zero, and I find it difficult to find the initial value of steady state.
Thanks in advance.
firefoxxp
 
Posts: 17
Joined: Fri Jan 11, 2013 1:02 pm

Re: how to input the log-linearized model

Postby SébastienVillemot » Tue Jan 15, 2013 3:50 pm

firefoxxp wrote:Thank you for your reply, but I am still a little confused, maybe I can get it from a specific example.
Assume an original equation is 1/c=beta*(1/c(+1)), the log-linearized form is -c_hat=-c_hat(+1),where c_hat=logc-logcc as cc is the steady state, I take the log linearization because the steady state of c_hat is zero.
I define c_hat as a endogenous variable, use the command model(linear), and input the equation "-c_hat=-c_hat(+1)",and at last use the stoch_simul. Could you please tell me wheather the above is correct.


Yes this is correct. The only drawback is that you are doing the log-linearization yourself instead of letting Dynare doing it by itself. On small models it is ok, but on big models you will probably prefer to have Dynare doing the log-linearization.

firefoxxp wrote:If I input exp(cc) in which cc represent logc, then the steady state of cc is not zero, and I find it difficult to find the initial value of steady state.

I don't understand your point. The steady state of cc is simply the log of the steady state of c. Nothing complicated to deal with.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: how to input the log-linearized model

Postby firefoxxp » Wed Jan 16, 2013 12:21 am

Thank you for your explanation.
As in the example, I define c_hat as a endogenous variable, use the command model(linear), and input the equation "-c_hat=-c_hat(+1)",and at last use the stoch_simul.
But I find the command "model(linear)" and the command "model" get the same eigenvalues(the rest of the mod is the same), in my opinion, I use the command "model" and input the original model should get the same eigenvalues when I use the command "model(linear)" and input the log-linearized model, does it mean that dynare can automatically recognize the linear model and deal with it like a linear model?
firefoxxp
 
Posts: 17
Joined: Fri Jan 11, 2013 1:02 pm

Re: how to input the log-linearized model

Postby jpfeifer » Wed Jan 16, 2013 7:09 am

Sorry, but I also do not get your point. The option "linear" tells Dynare your model is already linear and thus speads up some computations. However, when your model is already linear, not putting linear does of course not influence the results. A linear approximation of a linear equation is simply the equation itself. Hence, Dynare's linearization is redundant in that case, but delivers of course the same results as putting "linear".
------------
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


Return to Dynare help

Who is online

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