Estimating nonzero covariances for exogenous shocks

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Estimating nonzero covariances for exogenous shocks

Postby sdmorris » Wed Jan 29, 2014 8:36 pm

...Produces an error message. I had this problem, figured out how to get around it, and thought others might find useful. Attached.
Attachments
note.pdf
(135.56 KiB) Downloaded 167 times
sdmorris
 
Posts: 2
Joined: Wed Jan 29, 2014 8:34 pm

Re: Estimating nonzero covariances for exogenous shocks

Postby jpfeifer » Thu Jan 30, 2014 7:24 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Estimating nonzero covariances for exogenous shocks

Postby sdmorris » Thu Jan 30, 2014 6:40 pm

jpfeifer, thanks; I couldn't find this much easier solution anywhere online previously.
sdmorris
 
Posts: 2
Joined: Wed Jan 29, 2014 8:34 pm


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 1 guest