esr.mcmcrs: Effective Sampling Rate

Description Usage Arguments Details Value References See Also Examples

View source: R/esr.R

Description

Calculates the effective sampling rate (esr).

Usage

1
2
## S3 method for class 'mcmcrs'
esr(x, by = "all", as_df = FALSE, na_rm = FALSE, ...)

Arguments

x

An object.

by

A string indicating whether to determine by "term", "parameter" or "all".

as_df

A flag indicating whether to return the results as a data frame versus a named list.

na_rm

A flag specifying whether to ignore missing values.

...

Other arguments passed to methods.

Details

By default

\frac{1}{1 + 2 ∑_{k = 1}^∞ρ_k(θ)}

from Brooks et al. (2011) where the infinite sum is truncated at lag k when ρ_{k+1}(θ) < 0.

Value

A number between 0 and 1 indicating the esr value.

References

Brooks, S., Gelman, A., Jones, G.L., and Meng, X.-L. (Editors). 2011. Handbook for Markov Chain Monte Carlo. Taylor & Francis, Boca Raton.

See Also

Other convergence: converged_pars(), converged_terms(), converged(), esr_pars(), esr_terms(), rhat_pars(), rhat_terms(), rhat()

Examples

1

mcmcr documentation built on Sept. 7, 2021, 1:07 a.m.