gelmanDiag: Obtain potential scale reduction factors (Rhats).

View source: R/helper-functions.R

gelmanDiagR Documentation

Obtain potential scale reduction factors (Rhats).

Description

Extract potential scale reduction factors (Rhats) from an object of class SummaryResults. See the documentation for fetchSummary for details.

Usage

gelmanDiag(object)

Arguments

object

An object of class SummaryResults.

Value

A named numeric vector.

See Also

fetchSummary

Examples

library(demdata)
deaths <- Counts(round(VADeaths2))
popn <- Counts(VAPopn)
filename <- tempfile()
estimateModel(Model(y ~ Poisson(mean ~ sex)),
              y = deaths,
              exposure = popn,
              filename = filename,
              nBurnin = 2,
              nSim = 20,
              nChain = 2,
              parallel = FALSE)
summary.deaths <- fetchSummary(filename)
gelmanDiag(summary.deaths)

StatisticsNZ/demest documentation built on Nov. 2, 2023, 7:56 p.m.