Extract Rhat statistic that can be used to diagnose sampling behaviour of the algorithms applied by 'Stan' at the back-end of 'brms'. x should be of class bayesnecfit or bayesmanecfit.

# S3 method for bayesnecfit
rhat(x, rhat_cutoff = 1.05, ...)

# S3 method for bayesmanecfit
rhat(x, rhat_cutoff = 1.05, ...)

Arguments

x

An object of class bayesnecfit or bayesmanecfit.

rhat_cutoff

A numeric vector indicating the Rhat cut-off used to test for model convergence.

...

Unused.

Value

A list containing a vector or Rhat values returned for each parameter for a brmsfit object, for each of the fitted models.

Examples

if (FALSE) {
library(bayesnec)
rhat(manec_example)
nec4param <- pull_out(manec_example, model = "nec4param")
rhat(nec4param)
}