Hi, Guys:
I want to use something spit out by Dynare, but something confuses me. I am using Verson 4 now.

I try to use the ghu and ghx matrices to compute the finite horizon variance decomposition, but the order of variables is weird.
The order I input in the mod file is the following
c_t lam_t h_t k_t z_t y_t gam_t a_t x_t r_t w_t rk_tThe Alphabetic order of the variables in my mind should be:
a_t c_t gam_t h_t lam_t k_t r_t rk_t w_t x_t y_t z_t
Interestingly, the order in ghx is the following:
lam_t h_t r_t w_t rk_t k_t gam_t a_t x_t c_t z_t y_t
It is neither an alphabetic order nor the way I order them, so why the variables are stacked in such a way ?
 Following Christiano (2002), the cannonical rational dynamic system can be wrtten as the following:
alpha0E(Z(t+1)I(t))+alpha1Z(t)+alpha2Z(t1)+beta0E(epi(t+1)I(t))+beta0*epi(t)=0.
Is there some way to back out the alpha matrices and the beta matrices ?
Thanks for your response. I attched my code here. It is the simplest RBC model with two technology shocks on the growth rates.
rbcsimplest.mod (1.37 KB)