Auxiliary variables and DR order

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.

Auxiliary variables and DR order

Postby danielsolomon79 » Thu Sep 15, 2011 1:17 pm

Hi.

Does anyone know how auxiliary variables such as k(-2) or I(-1) are put inside the DR order? For example do the original state variables still come first after the static variables (followed by the auxiliary variables)? I couldn't find a clear explanation of this in the reference manual or wiki.

I want to be able to do my own arbitrary simulations using the dynare decision rules and recover the simulated time series of the original endogenous variables . I've successfuly coded and tested this with the example mod files without auxiliary variables for the first order approximation. One could of course just define the model in the model block using manual auxiliary variable definitions, but it would be nice to be able to do this with a mod file where you let dynare take care of auxiliary variables (especially for long leads or lags).

Also, suppose I have lags in an exogeneous shock (a moving average). How would this affect the DR order of the variables in dynare's solution?
Thanks a lot for any insight.

DS.
danielsolomon79
 
Posts: 11
Joined: Fri Aug 19, 2011 2:05 pm

Re: Auxiliary variables and DR order

Postby SébastienVillemot » Thu Sep 22, 2011 4:28 pm

danielsolomon79 wrote:Does anyone know how auxiliary variables such as k(-2) or I(-1) are put inside the DR order? For example do the original state variables still come first after the static variables (followed by the auxiliary variables)? I couldn't find a clear explanation of this in the reference manual or wiki.


The k(-2) will be replaced by an auxiliary variable, which will itself appear with one lag. So that auxiliary variable will be in the "backward" variables. Within the backward variables, this aux var will come after the variables which have been manually declared. If you want to find the exact index, you need first to figure out the ID of the aux var in the declaration order (by looking at the contents of M_.aux_vars, see http://www.dynare.org/DynareWiki/AuxiliaryVariables) and then you can find its place in the DR order by looking at oo_.dr.order_var (see the ref manual, section about stoch_simul).

The case of I(-1) is a bit different: no aux var will be created in this case, so you can directly look at oo_.dr.order_var.

Also, suppose I have lags in an exogeneous shock (a moving average). How would this affect the DR order of the variables in dynare's solution?

An endogenous aux var will be created, and it will follow the same rules than the aux var created in the endogenous case described above.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Auxiliary variables and DR order

Postby danielsolomon79 » Fri Sep 23, 2011 6:44 am

ok, thanks!
D.
danielsolomon79
 
Posts: 11
Joined: Fri Aug 19, 2011 2:05 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 13 guests