MCMC Diagnostics on estimated DSGE model

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.

MCMC Diagnostics on estimated DSGE model

Postby hanz » Tue Sep 30, 2014 8:09 am

Hi,
I encountered unexpected results from MCMC diagnostic - the diagnostics change historically when mh_drop is changed.

What I did & the results:
1) I estimated a model on 2M replications and got kolasa8_mdiag (multivariate) diagnostics file (mh_drop=0.80)
2) I loaded samples (load_mh_file), added 40,000 more samples and did the diagnostics again (this time with mh_drop=0.9) and got kolasa8_mdiag_new file.

As you can see, the diagnostics changed even for the samples that stayed the same (most notably, for samples from 0-1M).

Are the diagnostics computed correctly? If so, what is the interpretation? The horizontal axis suggests that the results of the diagnostics are for the total number of replications, so how it can be affected by the portiond of draws I drop?

(The diagnostics are computed only for 100 points - I checked that this is not a problem by calculating the results for 1000 points. And yes, the same problem holds for multivariate and univariate diagnostics.)

The diagnostics EPS are zipped because The extension eps is not allowed.

edit: If you want to look into the files, I believe I know where the problematic part is, but I don't understand the programming....
File: McMCDiagnostics.m
lines (dynare 4.4.3): 350, 356, 357,...
Code: Select all
    linea = ceil(options_.mh_drop*iter);
    temp  = tmp(find((tmp(:,3)>=linea) & (tmp(:,3)<=iter)),1:2);
    MDIAG(ligne,1) = temp(CSUP,1)-temp(CINF,1);
Attachments
diags.zip
(9.48 KiB) Downloaded 93 times
hanz
 
Posts: 4
Joined: Tue Sep 30, 2014 7:36 am

Re: MCMC Diagnostics on estimated DSGE model

Postby hanz » Tue Oct 07, 2014 5:55 am

It's been a week with no reply. Johannes Pfeifer, you seem to reply to most of the post in this forum, do you have any advice for me?
hanz
 
Posts: 4
Joined: Tue Sep 30, 2014 7:36 am

Re: MCMC Diagnostics on estimated DSGE model

Postby jpfeifer » Tue Oct 07, 2014 8:13 am

I am working on it, but I am busy and, as you may have noticed yourself, this is not the most intuitive part of the code. It seems to be related to the fact that the graphs are generated by averaging over different window lengths when you add draws. This affects the whole line.
------------
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: MCMC Diagnostics on estimated DSGE model

Postby jpfeifer » Thu Oct 09, 2014 9:21 am

Ok, here is the answer. As documented in Brooks/Gelman(1998), the graphs are derived from dividing the sample into batches and, within each window that includes draws up to the current batch by dropping half of the draws (a type of thinning, see pages 438/39). That is where the mh_drop comes in. When you now add draws, what happens is the the window size changes over which the statistic is computed and the that within each window, different draws are now dropped. This leads to the change in all draws reported.
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 13 guests