| add_ic {brms} | R Documentation |
Add information criteria and fit indices to fitted model objects
add_ic(x, ...) ## S3 method for class 'brmsfit' add_ic(x, ic = "loo", model_name = NULL, overwrite = FALSE, file = NULL, force_save = FALSE, ...) add_ic(x, ...) <- value add_loo(x, ...) add_waic(x, ...)
x |
An R object typically of class |
... |
Further arguments passed to the underlying functions computing the information criteria or fit indices. |
ic, value |
Names of the information criteria / fit indices
to compute. Currently supported are |
model_name |
Optional name of the model. If |
overwrite |
Logical; Indicates if already stored fit
indices should be overwritten. Defaults to |
file |
Either |
force_save |
Logical; only relevant if |
The methods add_loo and add add_waic
are just convenient wrappers around add_ic.
An object of the same class as x, but
with information criteria added for later usage.
## 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)
## End(Not run)