Closed jacob-long closed 6 years ago
Hi Jacob,
Thanks for noting this! The new version of the pacakge (which should be on CRAN in a few days deals with this error in a cleaner way by trying the adjust the proposal variance and resimulate.
Best, Matt
GERGM 0.13.0 now gives a cleaner error message for this behavior. Let me know if you hit any more issues and thanks again for bringing this up!
If any iteration fails to accept any Metropolis proposals, the Geweke statistic can't be calculated. Well, it is calculated to be
NaN
, which results in this error:Error in if (abs(geweke_stat) > 1.7) { : missing value where TRUE/FALSE needed
It's probably right to have an error in these cases --- I'm not sure --- but it would probably be best to catch these errors either at the point that the acceptance rate is calculated at 0 or when the Geweke statistic is calculated. If you think it shouldn't error, I suppose it would be a matter of making a bit more complicated conditional, e.g.,