Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mcmcse-package

Monte Carlo Standard Errors for MCMC


Description

Provides tools for computing Monte Carlo standard errors (MCSE) in Markov chain Monte Carlo (MCMC) settings. MCSE computation for expectation and quantile estimators is supported. The package also provides functions for computing effective sample size and for plotting Monte Carlo estimates versus sample size.

Details

Package: mcmcse
Type: Package
Version: 1.4-1
Date: 2020-01-29
License: GPL (>= 2)

Author(s)

James M. Flegal <jflegal@ucr.edu>,\ John Hughes <j.hughes@ucdenver.edu> \ Dootika Vats <dootika@iitk.ac.in> and\ Ning Dai <daixx224@umn.edu>

Maintainer: Dootika Vats <dootika@iitk.ac.in>

References

Dai, N and Jones, G.L. (2017+) Multivariate initial sequence estimators in Markov chain Monte Carlo, Journal of Multivariate Analysis.

Flegal, J. M. (2012) Applicability of subsampling bootstrap methods in Markov chain Monte Carlo. In Wozniakowski, H. and Plaskota, L., editors, Monte Carlo and Quasi-Monte Carlo Methods 2010, pages 363–372. Springer-Verlag.

Flegal, J. M. and Jones, G. L. (2010) Batch means and spectral variance estimators in Markov chain Monte Carlo. The Annals of Statistics, 38, 1034–1070.

Flegal, J. M. and Jones, G. L. (2011) Implementing Markov chain Monte Carlo: Estimating with confidence. In Brooks, S., Gelman, A., Jones, G. L., and Meng, X., editors, Handbook of Markov Chain Monte Carlo, pages 175–197. Chapman & Hall/CRC Press.

Flegal, J. M., Jones, G. L., and Neath, R. (2012) Markov chain Monte Carlo estimation of quantiles. University of California, Riverside, Technical Report.

Gong, L., and Flegal, J. M. A practical sequential stopping rule for high-dimensional Markov chain Monte Carlo. Journal of Computational and Graphical Statistics, 25, 684–-700.

Jones, G. L., Haran, M., Caffo, B. S. and Neath, R. (2006) Fixed-width output analysis for Markov chain Monte Carlo. Journal of the American Statistical Association, 101, 1537–1547.

Liu, Y., Vats, D., and Flegal, J. M. Batch size selection for variance estimators in MCMC, arXiv preprint arXiv:1804.05975 (2019).

Vats, D., Flegal, J. M., and, Jones, G. L Multivariate Output Analysis for Markov chain Monte Carlo, Biometrika, 106, 321–-337.

Vats, D., Flegal, J. M., and, Jones, G. L. (2018) Strong Consistency of multivariate spectral variance estimators for Markov chain Monte Carlo, Bernoulli, 24, 1860–-1909.

Examples

library(mAr)
p <- 3
n <- 1e3
omega <- 5*diag(1,p)

## Making correlation matrix var(1) model
set.seed(100)
foo <- matrix(rnorm(p^2), nrow = p)
foo <- foo %*% t(foo)
phi <- foo / (max(eigen(foo)$values) + 1)
  
out <- as.matrix(mAr.sim(rep(0,p), phi, omega, N = n))

mcse(out[,1], method = "bartlett")

mcse.bm <- mcse.multi(x = out)
mcse.tuk <- mcse.multi(x = out, method = "tukey")

mcmcse

Monte Carlo Standard Errors for MCMC

v1.4-1
GPL (>= 2)
Authors
James M. Flegal <jflegal@ucr.edu>, John Hughes <j.hughes@ucdenver.edu>, Dootika Vats <dootika@iitk.ac.in>, and Ning Dai <daixx224@umn.edu>
Initial release
2020-01-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.