Returns the convergence diagnostics of a model fitted with bmm(), per
parameter or as the sentence that report_methods() uses.
Usage
report_convergence(fit, format = c("table", "text"))Arguments
- fit
A
bmmfitobject returned bybmm(). It must contain posterior draws, so mock fits and fits made withchains = 0orempty = TRUEare refused.- format
"table"for one row per parameter,"text"for the sentence.
Value
An object of class bmm_report_convergence: a data.frame with
columns parameter, rhat, ess_bulk, ess_tail and in_summary for
format = "table", a character string for format = "text". Subsetting
the table with [ returns a plain data.frame.
Details
The table holds the rank-normalized R-hat and the bulk and tail
effective sample sizes (ESS) of every estimated parameter, computed with
posterior::summarise_draws(). Constants, lp__, lprior and the draws
from the prior (prior_*) are left out. The column in_summary marks
the parameters that summary() shows; brms warns when one of them
has an R-hat above 1.05. The algorithm, the number of divergent
transitions after warmup and the number of transitions that reached the
maximum tree depth are attributes of the table, printed below it.
The sentence gives the largest R-hat, the smallest bulk and tail ESS and
the number of divergent transitions, without verdicts. For algorithms
other than "sampling" the table is empty and the text says that there
are no diagnostics.
