| pp_check.bmmfit | R Documentation |
For models where brms provides pp_check support, this method delegates to
brms::pp_check(). For models with multinomial families (e.g., the m3
model), brms's pp_check is unavailable; this method dispatches to a
model-specific visualisation instead.
## S3 method for class 'bmmfit'
pp_check(
object,
type = NULL,
ndraws = NULL,
group = NULL,
resp_var = NULL,
...
)
object |
A |
type |
Character. Type of pp_check. When |
ndraws |
Integer. Number of posterior draws. Defaults to |
group |
Character. Optional grouping variable for faceting. For
non-multinomial models, passed to |
resp_var |
Character. For models that declare several observables,
the name of the observable to check, or |
... |
Additional arguments. Without |
For multinomial models, the plot mirrors the bayesplot ppc_bars style:
observed proportions are shown as bars and posterior predictive medians with
credible intervals are shown as point-ranges, using the bayesplot default
colour scheme and theme.
Some models describe several observables jointly (e.g. ddm(): response
times and responses; ezdm(): mean RT, RT variance and accuracy), but
brms only ever checks the primary response. For these models the resp_var
argument selects which observable to check; pp_check_vars() lists the
available checks. All selected observables are drawn from one joint
posterior predictive simulation, so resp_var = "all" panels are mutually
consistent.
Some observables are undefined for some cells — an ezdm() boundary has no
mean response time when fewer than two responses reach it. Observations
whose observed value is undefined are dropped from the check; undefined
values in the simulated replicates are absorbed by dropping those
posterior draws instead, so the number of observations checked does not
depend on ndraws. Dropped draws are not missing at random — they are
draws whose parameters made a boundary sparse — so the retained predictive
is mildly conditioned; both reductions are reported with a warning. With
resp_var = "all" one reduction is shared by every panel, so the panels
are computed on the same observations and draws.
For multinomial models, for a 4-parameter ezdm() fit with
placeholders in mean_rt_upper, or when resp_var is specified, a
ggplot2 object (a bayesplot_grid for resp_var = "all"). For other
models, the result of brms::pp_check().
brms::pp_check(), pp_check_vars()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.