How to stop dynare from applying exp(x)=1+x by default?

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 stop dynare from applying exp(x)=1+x by default?

Postby jd1090 » Wed Mar 25, 2015 11:39 am

Hi all,

I've been working on a small open economy model with asymmetric adjustment costs of labour and I am trying to get the IRFs, which should display some degree of asymmetry given different positive/negative values of parameter zeta in the model (see code attached).

I have log-linearised the model by hand except there is one term that remains non-linear (i.e. if x=ln(X), then the non-linear term is exp(x-x(-1)))= X/X(-1)). This is the key feature of the model as it underlies the asymmetric nature of labour adjustment costs. The code "works", but the results for positive/negative zeta's are exactly identical, which can only be the case if the approximation exp(x)=1+x is applied by default. This however imposes an approximation error, which is non-negligible in my model. My question is, how can I avoid this approximation, because my key research interest is in analysing the non-linearity of the term exp(x-x(-1)).

I've tried to replace command exp with simply the Eulers constant. I've tried introducing a separate variable X=exp(x). I've also tried to use model(linear), but some of the variables have non-zero steady state - none of these change the results.

I thought that perhaps there are other algorithms for solving "non-linear" models instead (see Gomez (2014) attached, only it would be nice if someone could suggest some specific commands for those algorithms)? Perhaps there is a way how to disable Taylor-Series approximations by writing something instead of "order" in the stoch_simul command, given that all the other variables are log-linearised?

Thanks a lot for the comments in advance!

Justas
Last edited by jd1090 on Wed Mar 25, 2015 4:38 pm, edited 1 time in total.
Justas Dainauskas
Department of Economics and Related Studies
University of York
Heslington
York
YO10 5DD
United Kingdom
jd1090
 
Posts: 62
Joined: Wed Mar 25, 2015 11:12 am

Re: How to stop dynare from applying exp(x)=1+x by default?

Postby jpfeifer » Wed Mar 25, 2015 12:49 pm

You are using order=1. Of course, at first order the approximation of e^x is 1+x. As the attached paper says, you must go to higher order. For example, set order=3 and you will see differences.
------------
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: How to stop dynare from applying exp(x)=1+x by default?

Postby jd1090 » Wed Mar 25, 2015 1:45 pm

Thanks for a quick reply! However, even setting order to 2 or 3 didn't change the results, which is quite odd. I do use command "model;" instead of "model(linear);". Any further suggestions would be greatly appreciated!
Justas Dainauskas
Department of Economics and Related Studies
University of York
Heslington
York
YO10 5DD
United Kingdom
jd1090
 
Posts: 62
Joined: Wed Mar 25, 2015 11:12 am

Re: How to stop dynare from applying exp(x)=1+x by default?

Postby jd1090 » Wed Mar 25, 2015 4:26 pm

Let me try and specify the problem more clearly. The exponential function that remains non-linear is in the variable macl_n (marginal adjustment costs of labour):

macl_n=psi*zeta*(exp(zeta*(n-n(-1)))-1);

The 2nd order approximation of the above should be sufficient to generate asymmetric results given that zeta can be positive or negative (note this is what dynare is supposed to compute):

macl_n~=psi*zeta*(exp(0)-1)+psi*zeta^2*exp(0)*(n-n(-1))+psi*zeta^3*exp(0)*(n-n(-1))
~=psi*zeta^2*(n-n(-1))+psi*zeta^3*(n-n(-1))

This should clearly give asymmetric results as suggested by jpfeifer. However, even when order=2 or order=3 is chosen, the IRFs of the model remain completely identical. Since macl_n is the only variable where exponential function appears, it can only be the case that first order approximation is used by default irrespective of what order is specified in stoch_simul:

macl_n~=psi*zeta^2*(n-n(-1))

Where it is clear that the sign of zeta is irrelevant. So the question is, how to stop dynare from doing any log-linearization to begin with OR how to obtain a second order approximation given that the "order" function doesn't change the resulting IRFs?
Justas Dainauskas
Department of Economics and Related Studies
University of York
Heslington
York
YO10 5DD
United Kingdom
jd1090
 
Posts: 62
Joined: Wed Mar 25, 2015 11:12 am

Re: How to stop dynare from applying exp(x)=1+x by default?

Postby jd1090 » Wed Mar 25, 2015 4:37 pm

Nevermind the question, if macl_n is replaced with its second order approximation explicitly in the model declaration, the asymmetry becomes clear in the IRFs. Thanks for the help jpfeifer!
Justas Dainauskas
Department of Economics and Related Studies
University of York
Heslington
York
YO10 5DD
United Kingdom
jd1090
 
Posts: 62
Joined: Wed Mar 25, 2015 11:12 am


Return to Dynare help

Who is online

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