Properties of the transition function and oo_.dr.Gy

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.

Properties of the transition function and oo_.dr.Gy

Postby piya_uci » Wed Oct 05, 2016 7:54 am

I am working towards interpreting the stability properties of the transition function and wanted to confirm what is the output that is stored as oo_.dr.Gy? Also, is there a way to recover, the transition function from the output of the model obtained using the stoch_simul option? It would be great if you could please help me out with this.
piya_uci
 
Posts: 7
Joined: Fri Jun 10, 2016 12:55 am

Re: Properties of the transition function and oo_.dr.Gy

Postby jpfeifer » Wed Oct 05, 2016 8:39 am

What do you mean with transition function? Are you looking for the quadratic matrix mapping states today into states tomorrow?
------------
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: Properties of the transition function and oo_.dr.Gy

Postby piya_uci » Wed Oct 05, 2016 3:16 pm

Hi Johannes,

Yes. The solution that dynare provides on using the stoch_simul option as policy and transition functions is the nxm dimensional matrix (where m is the number of endogenous variables and n is the number of state variables in the model). I wanted to recover the nxn dimensional matrix that gives me the mapping of states today into states tomorrow.

Thank you for your help.
piya_uci
 
Posts: 7
Joined: Fri Jun 10, 2016 12:55 am

Re: Properties of the transition function and oo_.dr.Gy

Postby jpfeifer » Wed Oct 05, 2016 4:20 pm

Please have a look at https://github.com/JohannesPfeifer/DSGE_mod/tree/master/FV_et_al_2007 and the included ABCD_test.m.
Essentially, you need
Code: Select all
%get state indices
ipred = M_.nstatic+(1:M_.nspred)';
%get state transition matrices
[A,B] = kalman_transition_matrix(oo_.dr,ipred,1:M_.nspred,M_.exo_nbr);
------------
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: Properties of the transition function and oo_.dr.Gy

Postby piya_uci » Wed Oct 05, 2016 6:51 pm

Hi Johannes,

Thank you for sharing this. I am trying to work through the code you had shared. The code requires me to specify the following:

%get observable position in decision rules
obs_var=oo_.dr.inv_order_var(options_.varobs_id);

Unfortunately, I am not able to recover, varobs_id from the output files that are generated from running dynare. It would be great if you could please help me out with this.

Many thanks for your help.
piya_uci
 
Posts: 7
Joined: Fri Jun 10, 2016 12:55 am

Re: Properties of the transition function and oo_.dr.Gy

Postby jpfeifer » Wed Oct 05, 2016 7:13 pm

You only need the first part. You don't have observables. The part I pasted into the post is what you need. It will give you the state transition equation. What you are looking at is the observation equation mapping states into observables. For that to work, you need to have a
Code: Select all
varobs

statement in your model.
------------
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: Properties of the transition function and oo_.dr.Gy

Postby piya_uci » Wed Oct 05, 2016 7:36 pm

Hi Johannes,

Thank you for pointing this out. It turns out that the eigenvalues of the matrix A from:

[A,B] = kalman_transition_matrix(oo_.dr,ipred,1:M_.nspred,M_.exo_nbr);

is same as the output stored in oo_.dr.Gy.

This was very helpful.
piya_uci
 
Posts: 7
Joined: Fri Jun 10, 2016 12:55 am

Re: Properties of the transition function and oo_.dr.Gy

Postby jpfeifer » Wed Oct 05, 2016 8:58 pm

Indeed. I just saw that in
Code: Select all
dyn_first_order_solver.m
the last lines are
Code: Select all
%predetermined (endogenous state) variables, square transition matrix
dr.Gy = hx;
------------
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 6 guests