| compare_ic {brms} | R Documentation |
Compare information criteria of different models fitted
with WAIC or loo.
compare_ic(..., x = NULL, ic = c("loo", "waic", "kfold"))
... |
At least two objects returned by
|
x |
A |
ic |
The name of the information criterion to be extracted
from |
For more details see compare.
An object of class iclist.
## Not run:
# model with population-level effects only
fit1 <- brm(rating ~ treat + period + carry,
data = inhaler, family = "gaussian")
waic1 <- WAIC(fit1)
# model with an additional varying intercept for subjects
fit2 <- brm(rating ~ treat + period + carry + (1|subject),
data = inhaler, family = "gaussian")
waic2 <- WAIC(fit2)
# compare both models
compare_ic(waic1, waic2)
## End(Not run)