ess {batchmeans} | R Documentation |
Estimate effective sample size (ESS) as described in Kass et al. (1998) and Robert and Casella (2004; p. 500).
ess(x, imse = TRUE, verbose = FALSE)
x |
a vector of values from a Markov chain. |
imse |
logical. If |
verbose |
logical. If |
ESS is the size of an iid sample with the same variance as the current sample. ESS is given by
\mbox{ESS}=T/\eta,
where
\eta=1+2\sum \mbox{all lag autocorrelations}.
The function returns the estimated effective sample size.
Kass, R. E., Carlin, B. P., Gelman, A., and Neal, R. (1998) Markov chain Monte Carlo in practice: A roundtable discussion. The American Statistician, 52, 93–100.
Robert, C. P. and Casella, G. (2004) Monte Carlo Statistical Methods. New York: Springer.
Geyer, C. J. (1992) Practical Markov chain Monte Carlo. Statistical Science, 7, 473–483.