AUX Variables Help

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.

AUX Variables Help

Postby maxzhao » Wed Nov 27, 2013 7:35 pm

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.
maxzhao
 
Posts: 17
Joined: Sun Sep 29, 2013 10:52 pm

Re: AUX Variables Help

Postby StephaneAdjemian » Wed Nov 27, 2013 11:19 pm

Hi,

maxzhao wrote: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.


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):

Code: Select all
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 ;-)

maxzhao wrote: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?


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

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


and to print the corresponding variable names:

Code: Select all
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.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.


Return to Dynare help

Who is online

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