Calculates an R-hat (potential scale reduction factor) value.

# S3 method for mcmcarray
rhat(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.

Value

A number >= 1 indicating the rhat value.

Details

By default the uncorrected, unfolded, univariate, split R-hat value.

References

Gelman, A., and Rubin, D.B. 1992. Inference from Iterative Simulation Using Multiple Sequences. Statistical Science 7(4): 457–472.

See also