Skip to contents

Whether a model fit has converged, from the Rhat and bulk effective sample rate of its parameters.

Usage

# S3 method for class 'kb_fit'
converged(x, ..., rhat = 1.05, esr = 0.1)

Arguments

x

A kb_fit object.

...

Unused.

rhat

A number giving the maximum acceptable Rhat.

esr

A number giving the minimum acceptable effective sample rate (effective sample size divided by the number of draws).

Value

A flag: TRUE if all Rhat are below rhat and all bulk effective sample rates above esr.

Details

esr is the effective sample rate: the bulk effective sample size divided by the number of draws. Convergence is assessed on the bulk effective sample size only, not the tail. The defaults are rhat = 1.05 and esr = 0.1.

Examples

converged(fit_weight_sim_nereo)
#> [1] TRUE