Compute posterior predictions of smooth s
and t2
terms of
models fitted with brms.
# S3 method for brmsfit
posterior_smooths(
object,
smooth,
newdata = NULL,
resp = NULL,
dpar = NULL,
nlpar = NULL,
ndraws = NULL,
draw_ids = NULL,
...
)
posterior_smooths(object, ...)
An object of class brmsfit
.
Name of a single smooth term for which predictions should be computed.
An optional data.frame
for which to evaluate
predictions. If NULL
(default), the original data of the model is
used. Only those variables appearing in the chosen smooth
term are
required.
Optional names of response variables. If specified, predictions are performed only for the specified response variables.
Optional name of a predicted distributional parameter. If specified, expected predictions of this parameters are returned.
Optional name of a predicted non-linear parameter. If specified, expected predictions of this parameters are returned.
Positive integer indicating how many posterior draws should
be used. If NULL
(the default) all draws are used. Ignored if
draw_ids
is not NULL
.
An integer vector specifying the posterior draws to be used.
If NULL
(the default), all draws are used.
Currently ignored.
An S x N matrix, where S is the number of posterior draws and N is the number of observations.