by andwes » Thu Sep 29, 2011 7:57 am
Thanks for the answer!
When trying to find the mistake in stationarizing, I am trying to find out to which economic variable (or lagrange multiplier) the unit root corresponds to. When running the file I find that it is the 21'st eigenvalue in oo_.dr.eigval that is problematic. That corresponds either to a economic variable (that might not be stationarized properly) or a Lagrange multiplier (in front of some constraint where the problem might lie). However, it is not fully clear to me how to find that variable using the M_ and the oo_ structures (I haven't been able to locate a full description what is in these).
I have tried to do this using the oo_.dr.order_var that I guess gives the reordering of the variables used by dynare where I guess that the original ordering first counts the variables as they are stated and then the multipliers of the constraints in the order the equations appear in the mode file as follows in the file :
1 - chi_1
2 - chi_2
(these are the first var declared as follows
@#for i in 1:(J-1)
var chi_@{i};
@#endfor)
and so on until the last endogeneous variable is declared (var a;)
42 - a
Then the exogeneous variable is declared (varexo ea;)
43 - ea
and then all the constraints
44 - lagrange multiplier corresponding to the first model equation : tot_ecost =....
45 - lagrange multiplier corresponding to the second model equation :
1=
@#for i in 1:J
+omega_@{i}*(p_@{i}^(1-epsilon)) endfor
;
46 - lagrange multiplier corresponding ....
and so on in the order the equation appear in the model file (Am I correct in assuming that this is the original ordering?).
One way to find the problematic variable or constraint is then to use oo_.dr.order_var. However, this contains all variables in the model, while oo_.dr.eigval correspond to the state variables(?). To find out which variable that causes the problem I need to find out how oo_.dr.eigval appear in oo_.dr.order_var. This is not clear to me, though. Are these stacked first or last in oo_.dr.order_var or in some other way?
Alternatively, is there some other way to find out which economic variable or constraint that corresponds to the 21'st eigenvalue?
Best
Andreas Westermark
Last edited by
andwes on Thu Sep 29, 2011 8:09 am, edited 1 time in total.