Geweke_interval use

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.

Geweke_interval use

Postby tophukg » Sat Mar 22, 2014 1:50 pm

Dear All,
I'm trying to estimate DSGE. I want to calculate the convergence diagnostics (Geweke 1992,1999) between the first draws (10,000) and the last draws (50,000), dropping out the middle draws.( 0 to 1000 vs 50000 to 100000)
In estimation command ,i set estimation(mh_replic=110000,mh_nblocks = 1,geweke_interval = [0 0.5]);
But i receive : "Invalid option for geweke_interval. Using the default of [0.2 0.5]".
Can you show me how to set "geweke_interval"?
And where is convergence diagnostics value ? As i see , we just receive p-value of convergence diagnostics test. How to choose the best p-value ?.
Best regard.
tophukg
 
Posts: 9
Joined: Tue Mar 05, 2013 4:20 pm

Re: Geweke_interval use

Postby jpfeifer » Sun Mar 23, 2014 3:36 pm

You are using it the wrong way. If you don't specify mh_drop, Dynare will use 0.5 and thus drop your first 55,000 draws as a burnin. That leaves 55,000 draws. The default of geweke_interval=[0.2 0.5] implies that the first 20% of those 55,000 draws (11,000 in total) are compared to the last 50% (27,500). You cannot use 0 as the first argument as this implies no draws to compare.

The statistic is only for testing, not for optimizing over it. So there is no way to choose the settings optimally yet (which would also entail a massive multiple comparison problem, necessitating a Bonferroni-type correction).
------------
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: Geweke_interval use

Postby tophukg » Mon Mar 24, 2014 1:31 am

Thank you for the response!
But, when i set:
estimation(mh_replic = 110000, mh_nblocks = 1,mh_drop= 0.1,geweke_interval =[0.1 0.5]); and then i set geweke_interval =[0.2 0.3],[0.2 0.8].
But I still only receive this message
"Invalid option for geweke_interval. Using the default of [0.2 0.5].
Geweke (1992) Convergence Tests, based on means of draws 11000 to 13200 vs 16500 to 110000."


As your response and i understand, with the default of [0.2 0.5] and mh_drop= 0.1 , we will have 90% of 110000 draws( 99000 draws), and Convergence Tests, based on means of draws 11000 to 30800 ( 19800 draws = 20% of 99000 ) vs 60500 to 110000 ( 49500 = 50% of 99000), it is difference from the message above ????

And I want to calculate the Convergence Tests , base on means of the first 10% ( 9900 draws) and the last 50% ( 49500 draws).
Can you help me ?
tophukg
 
Posts: 9
Joined: Tue Mar 05, 2013 4:20 pm

Re: Geweke_interval use

Postby jpfeifer » Mon Mar 24, 2014 12:54 pm

There is a bug. You need to replace the line 84-85 of McMCDiagnostics.m by
Code: Select all
if any(options_.convergence.geweke.geweke_interval<0) || any(options_.convergence.geweke.geweke_interval>1) || length(any(options_.convergence.geweke.geweke_interval<0))~=2 ...
|| (options_.convergence.geweke.geweke_interval(2)-options_.convergence.geweke.geweke_interval(1)<0)

by
Code: Select all
if any(options_.convergence.geweke.geweke_interval<0) || any(options_.convergence.geweke.geweke_interval>1) || length(options_.convergence.geweke.geweke_interval)~=2 ...
|| (options_.convergence.geweke.geweke_interval(2)-options_.convergence.geweke.geweke_interval(1)<0)

That is, the check
Code: Select all
length(any(options_.convergence.geweke.geweke_interval<0))~=2

should be
Code: Select all
length(options_.convergence.geweke.geweke_interval)~=2


This should also be fixed in Wednesday's unstable version. A fixed version of the file for Dynare 4.4.2 is attached.
Attachments
McMCDiagnostics.m
(17.1 KiB) Downloaded 44 times
------------
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: Geweke_interval use

Postby tophukg » Mon Mar 24, 2014 4:52 pm

Many thanks.
tophukg
 
Posts: 9
Joined: Tue Mar 05, 2013 4:20 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 3 guests