Command for generating model moments in MATLAB

Hello,

I am trying to generate the moments for an economic model in Dynare. I have the model solution in Matlab however I need help using the Matlab solution to generate model moments in Dynare.

In other words how can one incorporate
MATLAB command
[G,C0,M,fmat,fwt,ywt,gev,eu] = gensys(G0,G1,CC,Psi,Pi);

into the stoch_simul command
eg stoch_simul(order=1,irf=40) y_h c_h i_h b_h ;
in DYNARE

Any help would be appreciated!!

You could do it, but the programming costs are most probably prohibitive. If you already have the model solution in non-Dynare form I would recommend that you use the state-space form to generate the model moments yourself. You can basically find the formulas in Kim, Kim, Schaumburg. Sims.

Thank You.

"CALCULATING AND USING SECOND ORDER ACCURATE SOLUTIONS OF DISCRETE TIME DYNAMIC EQUILIBRIUM MODELS"
Correct?

Regards.

Yes, this one sciencedirect.com/science/article/pii/S0165188908000316

Which formulas or equation number are you referring to specifically?

Jpfeifer, I still have not solved this problem. Could you help explain what you mean by use the state form to generate the model moments? I read the paper that you suggested and I think the equations of interest are (39) -(42) but I do not know how to use them to generate the moments.

Regards,

Thassia