Page 1 of 1

Estimating nonzero covariances for exogenous shocks

PostPosted: Wed Jan 29, 2014 8:36 pm
by sdmorris
...Produces an error message. I had this problem, figured out how to get around it, and thought others might find useful. Attached.

Re: Estimating nonzero covariances for exogenous shocks

PostPosted: Thu Jan 30, 2014 7:24 am
by jpfeifer
What you do is completely unnecessary. You are just not using the correct syntax. The shocks-block is for calibration. You cannot put estimated parameters in the shocks-block as this block will not be used for updating the covariance matrix during estimation. What you describe should also occur for a diagonal covariance matrix when you are trying to estimate a parameter that sets the variance in the shocks-block.

The correct way is using the estimated_params-block, which is for estimation. To estimate a correlation between two shocks as in your example, you use something along the lines of
Code: Select all
estimated_params;
stderr ez, inv_gamma_pdf, 0.01, inf;
stderr eg, inv_gamma_pdf, 0.01, inf;
corr ez, eg, normal_pdf, 0, 0.1;
end;

You do not need to specify a separate parameter for the off-diagonal elements. Dynare directly estimates them as it does with variances.

Re: Estimating nonzero covariances for exogenous shocks

PostPosted: Thu Jan 30, 2014 6:40 pm
by sdmorris
jpfeifer, thanks; I couldn't find this much easier solution anywhere online previously.