Learn R Programming

stableGR (version 1.2)

A Stable Gelman-Rubin Diagnostic for Markov Chain Monte Carlo

Description

Practitioners of Bayesian statistics often use Markov chain Monte Carlo (MCMC) samplers to sample from a posterior distribution. This package determines whether the MCMC sample is large enough to yield reliable estimates of the target distribution. In particular, this calculates a Gelman-Rubin convergence diagnostic using stable and consistent estimators of Monte Carlo variance. Additionally, this uses the connection between an MCMC sample's effective sample size and the Gelman-Rubin diagnostic to produce a threshold for terminating MCMC simulation. Finally, this informs the user whether enough samples have been collected and (if necessary) estimates the number of samples needed for a desired level of accuracy. The theory underlying these methods can be found in "Revisiting the Gelman-Rubin Diagnostic" by Vats and Knudson (2018) .

Copy Link

Version

Install

install.packages('stableGR')

Monthly Downloads

220

Version

1.2

License

GPL-3

Maintainer

Christina Knudson

Last Published

October 7th, 2022

Functions in stableGR (1.2)

n.eff

Effective sample size
titanic.complete

Titanic passenger data
mvn.gibbs

Two block Gibbs sampler for a multivariate normal distribution
stable.GR

Gelman-Rubin diagnostic using stable variance estimators
asym.var

Asymptotic covariance matrix estimation for Markov chain Monte Carlo
stableGR-package

tools:::Rd_package_title("stableGR")
target.psrf

Calculates a Gelman Rubin diagnostic threshold using effective sample size thresholds.