How to store the constant term in policy and transition func

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 store the constant term in policy and transition func

Postby ebaykal » Tue Sep 01, 2009 4:21 am

Hi all,

I want to run a loop in my mod file and for certain parameters in my model I want to be able to save the constant term in the policy and transition output of the variable of interest. I do a second order approximation to the welfare in my model and every time I run the dynare it gives me the policy and transition functions output in the command window. Since I want to save this each time I run my mod file, I am wondering where the following output is stored in dynare.

POLICY AND TRANSITION FUNCTIONS
welfare
Constant 42.708791
(correction) 0.097825
dg (-1) 0.045723
dgm (-1) 0.312067
DM (-1) 0.189854
pm (-1) -0.141491
zf (-1) -15.838252
zm (-1) -8.021038
epsf -16.671844
epsm -8.443198
DM (-1),dg (-1) -0.010713
DM (-1),dgm (-1) 0.145147
DM (-1),DM (-1) 0.040526
pm (-1),dg (-1) 1.010847
pm (-1),DM (-1) 0.546090
pm (-1),pm (-1) 10.073796
zf (-1),epsf 17.377550
zf (-1),epsm -8.389466
zm (-1),epsf -8.389466
zm (-1),epsm 4.288687

I looked into forum, I found the coefficients of policy and transition functions are stored in dr_.ghx and dr_.ghu in dynaver v3. I only need the constant term and it is neither in dr_.ghx nor dr.ghu. I am using dynare v3.

I greatly appreciate any help you may suggest.

Thanks,
Elif.
Elif ONMUS-BAYKAL
ebaykal
 
Posts: 22
Joined: Mon Feb 09, 2009 4:58 pm

Re: How to store the constant term in policy and transition func

Postby ebaykal » Wed Sep 02, 2009 1:11 pm

Hi all,

I know that oo_.dr.ghx gives the coefficients of the policy and transition functions for the model variables. But this matrix does not provide the constant given in the dynare policy and transition functions output. If the output includes this constant term it should be stored in somewhere in dynare, right?
I desperately need to find where this is stored becuase I am supposed to do a loop on some of the parameters.

Any help is greatly appreciated.

Thanks.
Elif.
Elif ONMUS-BAYKAL
ebaykal
 
Posts: 22
Joined: Mon Feb 09, 2009 4:58 pm

Re: How to store the constant term in policy and transition func

Postby SébastienVillemot » Wed Sep 02, 2009 2:14 pm

See the part "Second order approximation" on:

http://www.dynare.org/manual/re26.html

So the correction is oo_.dr.ghs2 divided by 2 (since oo_.dr.ghs2 corresponds to the square of delta). Also note that the line "Constant" in the "Policy and transition function" displayed by stoch_simul is equal to the steady state + the correction.

Best,
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 store the constant term in policy and transition func

Postby ebaykal » Wed Sep 02, 2009 2:46 pm

Thank you very much Sebastien.
This helps a lot.
Elif.
Elif ONMUS-BAYKAL
ebaykal
 
Posts: 22
Joined: Mon Feb 09, 2009 4:58 pm

Re: How to store the constant term in policy and transition

Postby RMB » Fri Feb 13, 2015 12:04 pm

This sounds great. I would like to create a serie of y, put in an index form, like base=100, and compare with the real GDP. Knowing where the coefficients of policy function is essential to do that. Someone know how the best way to do that? By Matlab or Dynare? And how would be?

Thanks!
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: How to store the constant term in policy and transition

Postby jpfeifer » Sat Feb 14, 2015 12:09 pm

You need to be more explicit. Is y a model variable? If yes, use the simult_ function to generate the data within a loop. For looping, see http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891
------------
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