Getting back to a post from september 2011, still some issues to clarify, and now I will probably actually use the answer:
so when we have leads like x(+k),k>1 dynare creates auxiliary variables. Where are these aux_endo_lead variables placed in the DR order? Can I safely assume they're placed after the original purely foreward variables in the DR order?
Thanks a lot.
Daniel.
Some background/context from the previous post on this auxiliary var placement issue:
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.