Learn R Programming

mcmcse

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

Installation

This R package is on CRAN, and its preferred URL being https://CRAN.R-project.org/package=mcmcse.

To download this development repo, through the the devtools package:

# install.packages("devtools")
library(devtools)
devtools::install_github("dvats/mcmcse")

Citation

Please run citation("mcmcse") after loading the package for citation details.

News

Version 1.5-0 is now live! There are big speed improvements in the functions and a new mcmcse object. Special thanks to Google Summer of Code.

Copy Link

Version

Install

install.packages('mcmcse')

Monthly Downloads

13,116

Version

1.5-1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Dootika Vats

Last Published

September 21st, 2025

Functions in mcmcse (1.5-1)

minESS

Minimum effective sample size required for stable estimation as described in Vats et al. (2015)
mcse.q.mat

Apply mcse.q to each column of a matrix or data frame of MCMC samples
multiESS

Effective Sample Size of a multivariate Markov chain as described in Vats et al. (2015)
mcse.initseq

Multivariate Monte Carlo standard errors for expectations with the initial sequence method of Dai and Jones (2017)
estvssamp

Create a plot that shows how Monte Carlo estimates change with increasing sample size
BVN_Gibbs

MCMC samples from a bivariate normal distribution
is.mcmcse

Check if the class of the object is mcmcse
mcmcse-package

Monte Carlo Standard Errors for MCMC
mcse

Compute Monte Carlo standard errors for expectations
batchSize

Batch size (truncation point) selection
ess

Univariate effective sample size (ESS) as described in Gong and Flegal (2015)
confRegion

Confidence regions (ellipses) for Monte Carlo estimates
mcse.mat

Apply mcse to each column of the MCMC samples
mcse.q

Compute Monte Carlo standard errors for quantiles
mcse.multi

Multivariate Monte Carlo standard errors for expectations