ess: Effective Sample Size Calculator

View source: R/ess.R

essR Documentation

Effective Sample Size Calculator

Description

Computes the effective sample size of MCMC chains, using the algorithm in Section 2.3 of the paper by Madeline Thompson. The algorithm is taken from earlier work on ‘Initial Sequence Estimators’ by multiple authors.

Usage

ess(x, method = c("coda", "ise"))

Arguments

x

Matrix object with each sample (possibly multivariate) as a row. Effective sample size calculation is done independently for each column of x.

method

Method of calculating effective size. Current options are "coda" which calls effectiveSize function in coda package, and "ise" which uses the 'Initial Sequence Estimators' method described in Section 2.3 of Thompson (2010).

Value

Vector with effective sample sizes for the time series in each column of x.

Author(s)

Alireza S. Mahani, Asad Hasan, Marshall Jiang, Mansour T.A. Sharabiani

References

Thompson, Madeleine (2010) A Comparison of Methods for Computing Autocorrelation Time https://arxiv.org/pdf/1011.0175v1.pdf


sns documentation built on Nov. 2, 2022, 5:15 p.m.