Rhat: compute the Gelman & Rubin R.hat statistic.

Description Usage Arguments Value See Also

View source: R/diagnostics.R

Description

Rhat computes the Gelman & Rubin R.hat statistic. Given an array of theta values, for some parameter, produced by several chains, compute the R.hat statistic as a check for convergence. The R.hat statistic (Gelman & Rubin 1992) should be close to zero if the chains are converging. See also Gelman et al. (2004, sect 11.6)

Usage

1
Rhat(theta)

Arguments

theta

(array) of samples of one parameters. ncycles rows by nchains columns. We compare the within-chain and between-chain variances.

Value

The R.hat statistic (scalar).

See Also

chain_convergence


svdataman/tonic documentation built on Aug. 2, 2019, 3:21 p.m.