target_psrf: Target potential scale reduction factor (PSRF)

Description Usage Arguments References Examples

View source: R/target_psrf.R

Description

This function calculates the target PSRF for a set of MCMC chains. This is adapted from the more complex version in stableGR

Usage

1
target_psrf(m, p, alpha = 0.05, epsilon = 0.05)

Arguments

m

Number of MCMC chains, e.g. 3 chains implies m = 3

p

Number of parameters being sampled, e.g. (beta1, beta2, beta3) implies p = 3

alpha

Significance level used to compute ESS; defaults to alpha = 0.05 i.e. 5%

epsilon

Relative precision term; fixing all other elements, as precision is set smaller, sample size increases; defaults to 0.05

References

D. Vats and C. Knudson. Revisiting the Gelman-Rubin Diagnostic. https://arxiv.org/abs/1812.09384

Examples

1
2
target_psrf(m = 2, p = 2, alpha = 0.05, epsilon = 0.05)
target_psrf(m = 5, p = 2, alpha = 0.10, epsilon = 0.05)

iamaspacecoyote/MyFirstPackage documentation built on Jan. 1, 2021, 3:24 a.m.