Page 1 of 1

Geweke_interval use

PostPosted: Sat Mar 22, 2014 1:50 pm
by tophukg
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.

Re: Geweke_interval use

PostPosted: Sun Mar 23, 2014 3:36 pm
by jpfeifer
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).

Re: Geweke_interval use

PostPosted: Mon Mar 24, 2014 1:31 am
by tophukg
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 ?

Re: Geweke_interval use

PostPosted: Mon Mar 24, 2014 12:54 pm
by jpfeifer
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.

Re: Geweke_interval use

PostPosted: Mon Mar 24, 2014 4:52 pm
by tophukg
Many thanks.