loo_model_weights.brmsfit {brms} | R Documentation |
Model averaging via stacking or pseudo-BMA weighting.
Description
Compute model weights for brmsfit
objects via stacking
or pseudo-BMA weighting. For more details, see
loo::loo_model_weights
.
Usage
## S3 method for class 'brmsfit'
loo_model_weights(x, ..., model_names = NULL)
Arguments
x |
A |
... |
More |
model_names |
If |
Value
A named vector of model weights.
Examples
## Not run:
# model with population-level effects only
fit1 <- brm(rating ~ treat + period + carry,
data = inhaler, family = "gaussian")
# model with an additional varying intercept for subjects
fit2 <- brm(rating ~ treat + period + carry + (1|subject),
data = inhaler, family = "gaussian")
loo_model_weights(fit1, fit2)
## End(Not run)
[Package brms version 2.21.0 Index]