| extract_draws.brmsfit {brms} | R Documentation |
This method helps in preparing brms models for certin post-processing
tasks most notably various forms of predictions. Unless you are a package
developer, you will rarely need to call extract_draws directly.
## S3 method for class 'brmsfit' extract_draws(x, newdata = NULL, re_formula = NULL, allow_new_levels = FALSE, sample_new_levels = "uncertainty", incl_autocor = TRUE, resp = NULL, nsamples = NULL, subset = NULL, nug = NULL, smooths_only = FALSE, offset = TRUE, new_objects = list(), ...) extract_draws(x, ...)
x |
An R object typically of class |
newdata |
An optional data.frame for which to evaluate predictions. If
|
re_formula |
formula containing group-level effects to be considered in
the prediction. If |
allow_new_levels |
A flag indicating if new levels of group-level
effects are allowed (defaults to |
sample_new_levels |
Indicates how to sample new levels for grouping
factors specified in |
incl_autocor |
A flag indicating if ARMA autocorrelation parameters
should be included in the predictions. Defaults to |
resp |
Optional names of response variables. If specified, predictions are performed only for the specified response variables. |
nsamples |
Positive integer indicating how many posterior samples should
be used. If |
subset |
A numeric vector specifying the posterior samples to be used.
If |
nug |
Small positive number for Gaussian process terms only. For
numerical reasons, the covariance matrix of a Gaussian process might not be
positive definite. Adding a very small number to the matrix's diagonal
often solves this problem. If |
smooths_only |
Logical; If |
offset |
Logical; Indicates if offsets should be included in the
predictions. Defaults to |
new_objects |
A named |
... |
Further arguments passed to |
An object of class 'brmsdraws' or 'mvbrmsdraws',
depending on whether a univariate or multivariate model is passed.