powered by
Add information criteria to fitted model objects
add_ic(x, ...)# S3 method for brmsfit add_ic(x, ic = "loo", ...)
# S3 method for brmsfit add_ic(x, ic = "loo", ...)
An R object typically of class brmsfit.
brmsfit
Further arguments passed to LOO or WAIC.
LOO
WAIC
Names of the information criteria to compute. Currently supported are "loo" and "waic".
"loo"
"waic"
An object of the same class as x, but with information criteria added for later usage.
x
# NOT RUN { fit <- brm(count ~ Trt, epilepsy, poisson()) # add both LOO and WAIC at once fit <- add_ic(fit, ic = c("loo", "waic")) print(fit$loo) print(fit$waic) # } # NOT RUN { # }
Run the code above in your browser using DataLab