log-linearization

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.

log-linearization

Postby John123 » Mon Feb 21, 2011 5:00 pm

Hi all,

i want to log-linearize a model by Dynare. I calculated the steady state values by hand and wrote the model in terms of exp(log(variable)). Running the file generates always an error.
It would be great if you could help me. thank you
Attachments
model.mod
(2 KiB) Downloaded 202 times
John123
 
Posts: 9
Joined: Fri Dec 03, 2010 10:39 am

Re: log-linearization

Postby jpfeifer » Mon Feb 21, 2011 6:07 pm

When you put
Code: Select all
resid(1);

after your initval-command, Dynare shows you the residuals:
Residuals of the static equations:
Equation number 1 : 0
Equation number 2 : -3.3333
Equation number 3 : 3.4997
Equation number 4 : -0.01
Equation number 5 : -0.21583
Equation number 6 : -1
Equation number 7 : 1
Equation number 8 : -0.442
Equation number 9 : -2
Equation number 10 : -1.2867
Equation number 11 : 0.1
Equation number 12 : 0.5

Hence, your steady state is incorrect. The reason may be your try to get a loglinearization. Do not put variables as exp(log(x)). Rather, you have to use exp(x) because if in your original model you used x_orig and now you use exp(x), it means that you performed a variable substitution: x=log(x_orig).
But when you use exp(log(x)), exp and log cancel and you are back to x=x_orig. Note also that if a variable is already in logs in the original model (for example if you have shocks that are defined as percentage deviations from steady state), you do not replace them by their logs through putting exp() as you would then get log(log(x)).
------------
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: log-linearization

Postby John123 » Tue Feb 22, 2011 7:48 am

Thank you for your hints! I changed the model, as you told me. I also tried writing the error terms not in exp()-form.But i still get an error message, that the steady state values are wrong. i can't understand that, because i calculated them by hand and the model is very easy. Do you have any idea, where there problem might be?
John123
 
Posts: 9
Joined: Fri Dec 03, 2010 10:39 am

Re: log-linearization

Postby jpfeifer » Tue Feb 22, 2011 7:57 am

Could you post the new mod-file? And did you consider that the steady state value of a variable transformed to be in logs has to be the log of the steady state value of the original variable? Moreover, by using the resid(1) command you can look at the residuals of the equations in order to get the steady state one by one. Try starting with the equations for the exogenous processes and work from there to the more complicated ones.
------------
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: No registered users and 7 guests