Dispatches pp_check for bayesnecfit,
bayesmanecfit and bayesnechurdlefit objects, so a
user does not have to unwrap the underlying brmsfit
themselves.
# S3 method for class 'bayesnecfit'
pp_check(object, ...)
# S3 method for class 'bayesmanecfit'
pp_check(object, ...)
# S3 method for class 'bayesnechurdlefit'
pp_check(object, ...)An object of class bayesnecfit,
bayesmanecfit or bayesnechurdlefit as returned by
bnec or bnec_hurdle.
Further arguments passed to pp_check, for
example type and ndraws.
For a bayesnecfit, a ggplot
object. For the other classes, a named list of them.
pp_check(x, type = "loo_pit_overlay") gives a LOO-PIT check,
the Bayesian counterpart of a uniform quantile residual. It needs a
loo criterion on the fit, which bnec already adds, so no
extra step is required and no extra dependency is involved.
For a bayesmanecfit the check is run on each candidate model in
turn rather than on the model-averaged posterior. The averaged posterior
predictive is a weighted mixture and brms has no object representing
it; check_fit is the function that reports on the average, and
it reports per-model rows alongside for the same reason.
For a bayesnechurdlefit there is no single posterior predictive
to check: the two components carry different response vectors, since growth
is fitted on survivors only and survival on every individual. One result is
returned per component, following the precedent dispersion
already sets.