Usage
"pp_check"(object, type, nsamples, group = NULL, time = NULL, x = NULL, re_formula = NULL, subset = NULL, ntrys = 5, ...)
Arguments
object
An object of class brmsfit
.
type
Type of the ppc plot as given by a character string.
Currently, the following plots (as names) are implemented:
dens
dens_overlay
, hist
, resid
,
resid_binned
, scatter
, scatter_avg
,
scatter_avg_grouped
, stat
, stat_2d
,
stat_grouped
, ts
, ts_grouped
, and
violin_grouped
.
nsamples
Positive integer indicating how many
posterior samples should be used.
If NULL
all samples are used. If not specified,
the number of posterior samples is chosen automatically.
Ignored if subset
is not NULL
.
group
Optional name of a grouping factor in the model
by which to stratify the ppc plot. This argument is required for
ppc *_grouped
types and ignored otherwise.
time
Optional name of a time variable in the model by
which to order time-series plots. Only used for
ppc ts*
types and ignored otherwise.
x
Optional name of a variable in the model.
Only used for ppc vs_x*
types and ignored otherwise.
re_formula
formula containing random effects
to be considered in the prediction.
If NULL
(default), include all random effects;
if NA
, include no random effects.
subset
A numeric vector specifying
the posterior samples to be used.
If NULL
(the default), all samples are used.
ntrys
Parameter used in rejection sampling
for truncated discrete models only
(defaults to 5
). For more details see
predict.brmsfit
. ...
Further arguments passed to the ppc functions
of the bayesplot package.