long leads

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.

long leads

Postby larry » Tue Aug 09, 2011 4:30 pm

I have code with long leads of some variables (40 leads!).
I'm having trouble computing the steady state for auxiliary variables created by dynare because of my long leads.
I have two questions.
The auxiliary variables appear to be of two types: leads and lags.
An example of a lag variable is: AUX_ENDO_LAG_16_12
The first number after the delimiter, _, probably refers to a variable in the var command. The second variable probably refers to lag.
Question #1: Does the number 16 in this case refer to the 16th variable in the var command? Or, is it perhaps the 17th variable? We have some evidence that it may be the latter.
An example of the other type of auxiliary variable, a lead, is AUX_ENDO_LEAD_7243
Question #2: Is there a way to map from the number 7243 into a variable in the var list?
Larry Christiano
larry
 
Posts: 7
Joined: Sun Feb 11, 2007 8:31 pm
Location: northwestern university

Re: long leads

Postby MichelJuillard » Thu Aug 11, 2011 8:51 am

Hi Larry

larry wrote:I have code with long leads of some variables (40 leads!).
The auxiliary variables appear to be of two types: leads and lags.
An example of a lag variable is: AUX_ENDO_LAG_16_12
The first number after the delimiter, _, probably refers to a variable in the var command. The second variable probably refers to lag.
Question #1: Does the number 16 in this case refer to the 16th variable in the var command? Or, is it perhaps the 17th variable? We have some evidence that it may be the latter.

This is right the numbering of variables in this case starts with 0. This is confusing, but would be probably even more confusing to change it now.... Note that
M_.aux_vars(i).endo_index contains the correct index starting at 1.
An example of the other type of auxiliary variable, a lead, is AUX_ENDO_LEAD_7243
Question #2: Is there a way to map from the number 7243 into a variable in the var list?

[/quote]
No there is no way, because these auxiliary variables stand in general for a nonlinear expression containing variables with leads, not necessarily a single variable.

You are probably trying to write a <fname>_steadystate.m model by hand. We have recently introduced a steady_state_model block where you can enter the recursive solution for the steady state. Then the <fname>_steadystate.m file is written automatically, taking care of the auxiliary variables. This produces also a more efficient version to the <fname>_steadystate.m file.

However, using a nonlinear solver to solve only a subset of the equations of the model is not yet supported. This could be the occasion to add the feature.

If you still need to write your own <fname>_steadystate.m file, we have added to the unstable version of Dynare, a function <fname>_set_auxiliary_variables.m that computes the value of the auxiliary variables given the value of the main endogenous ones.

Don't hesitate to contact me on my personal email to disccuss ways to improve Dynare in that regard.

All the best,

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

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