You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently mcse behaves inconsistently for constant arrays depending on the estimator and method:
julia>using MCMCDiagnosticTools, Statistics
julia> x =ones(100);
julia>mcse(x; kind=mean)
NaN
julia>mcse(x; kind=std)
NaN
julia>mcse(x; kind=median) # hangs because ESS is NaN, which prevents `betainvcdf` from terminating^CERROR: InterruptException:...
julia>mcse(x; kind=x ->mean(x)) # using sbm0.0
julia>mcse(x; kind=x ->std(x)) # using sbm0.0
julia>mcse(x; kind=x ->median(x)) # using sbm0.0
We could either:
return 0.0 for constant arrays
return NaN for constant arrays
I feel that returning NaN makes more sense. Constant arrays are most likely to occur either when a sampled parameter has some fixed entries (e.g. the diagonal of a correlation matrix) or when all transitions that perturbed the parameter were rejected; this often indicates failed sampling. Since MCSE is primarily useful as a convergence diagnostic, I think returning NaN makes the most sense here.
The text was updated successfully, but these errors were encountered:
Currently
mcse
behaves inconsistently for constant arrays depending on the estimator and method:We could either:
I feel that returning
NaN
makes more sense. Constant arrays are most likely to occur either when a sampled parameter has some fixed entries (e.g. the diagonal of a correlation matrix) or when all transitions that perturbed the parameter were rejected; this often indicates failed sampling. Since MCSE is primarily useful as a convergence diagnostic, I think returningNaN
makes the most sense here.The text was updated successfully, but these errors were encountered: