Estimating nonzero covariances for exogenous shocks

…Produces an error message. I had this problem, figured out how to get around it, and thought others might find useful. Attached.
note.pdf (136 KB)

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

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.

jpfeifer, thanks; I couldn’t find this much easier solution anywhere online previously.