Learn R Programming

brms (version 1.4.0)

compare_ic: Compare Information Criteria of Different Models

Description

Compare information criteria of different models fitted with WAIC or LOO.

Usage

compare_ic(..., x = NULL)

Arguments

...
At least two objects returned by WAIC or LOO.
x
A list of at least two objects returned by WAIC or LOO. This argument can be used as an alternative to specifying the models in ....

Value

An object of class iclist.

Details

For more details see compare.

See Also

WAIC, LOO, compare

Examples

Run this code
## Not run: 
# # model with population-level effects only
# fit1 <- brm(rating ~ treat + period + carry,
#             data = inhaler, family = "gaussian")
# w1 <- WAIC(fit1)
# 
# # model with an additional varying intercept for subjects
# fit2 <- brm(rating ~ treat + period + carry + (1|subject),
#             data = inhaler, family = "gaussian")
# w2 <- WAIC(fit2)
# 
# # compare both models
# compare_ic(w1, w2)
# ## End(Not run)

Run the code above in your browser using DataLab