AUX Variables Help

Hi,
I am trying to use the output of Dynare to do some other calculation and have couple of questions:

  1. How to match the AUX Variables with the original variables, I know M_.aux_vars contains “endo_index” and “orig_index” for some AUX Variables. But the value of “orig_index” is empty for some variables.

2.How to indentify the state variables (i.e. pred variables)? I know oo_.dr_npred contains the number of state varibles. But what exactly are those varibles? Name/endo_index?

Thanks.

Hi,

I have the impression that there is no obvious programmatic way for obtaining this information. An auxiliary variable can be a complex non linear combination of endogenous variables so that it is not possible to describe it by only using indices. You can use the write_latex_dynamic_model to print the equations of the model in a tex file that you can compile with (pdf)latex. For instance, if you try with fs2000 you will get the following last equation (tex):

AUX\_ENDO\_LEAD\_65_{t}=\frac{P_{t}\, bet\, \left(n_{t}^{1-alp}\, alp\, exp\left(\left(-alp\right)\, \left(gam+log\left(e_{t}\right)\right)\right)\, k_{t-1}^{alp-1}+\left(1-del\right)\, exp\left(\left(-\left(gam+log\left(e_{t}\right)\right)\right)\right)\right)}{m_{t}\, c_{t+1}\, P_{t+1}}

which is easeier to read if you compile the document :wink:

To get the indices of the state variable you can use the following command:

idstate = find(M_.lead_lag_incidence(1,:));

and to print the corresponding variable names:

M_.endo_names(idstate,:)

You would get the same names by looking at the variables listed in the first column of the table “POLICY AND TRANSITION FUNCTIONS” produced by the stoch_simul command.

Best,
Stéphane.