ictab {ESTER}R Documentation

Computes Akaike weights or pseudo-BMA weights for a set of models

Description

Returns a table with weights of a set of models, based on various information criteria. Currently, ictab supports the computation of Akaike weights from the aic or the bic computed on lm or merMod models, as well as the computation of pseudo-BMA weights, computed from the WAIC or LOOIC of brmsfit models.

Usage

ictab(mods, ic, ...)

Arguments

mods

Should be a named list of models, of class lm, merMod or brmsfit.

ic

Indicates which information criterion to use. Current supported information criteria include aic and bic for lm and merMod models, as well as WAIC and LOO for brmsfit models.

...

Additional parameters to be passed to brms::WAIC or brms::LOO functions.

Value

An object of class data.frame, which contains the value of the information criterion (either AIC, BIC, WAIC or LOOIC), the number of parameters (k for AIC and BIC or p for WAIC or LOOIC), the delta_IC (for AIC and BIC) or the elpd for models compared with WAIC or LOOIC, and the weight of each model (Akaike weights for AIC or BIC and pseudo-BMA weights for WAIC or LOOIC).

Author(s)

Ladislas Nalborczyk <ladislas.nalborczyk@gmail.com>

References

Burnham, K. P., \& Anderson, D. R. (2002). Model Selection and Multimodel Inference: A Practical Information-Theoretical Approach. 2d ed. New York: Springer-Verlag.

Burnham, K. P., \& Anderson, D. R. (2004). Multimodel inference: Understanding AIC and BIC in model selection. Sociological Methods and Research, 33(2), 261-304.

Yao, Y. P., Vehtari, A., Simpson, D., \& Gelman, A. (2017). Using stacking to average Bayesian predictive distributions.

See Also

aic, bic

Examples

library(ESTER)
data(mtcars)
mod1 <- lm(mpg ~ cyl, mtcars)
mod2 <- lm(mpg ~ cyl + vs, mtcars)
mod3 <- lm(mpg ~ cyl + vs + I(vs^2), mtcars)
mod4 <- lm(mpg ~ cyl * vs, mtcars)
mods <- list(mod1 = mod1, mod2 = mod2, mod3 = mod3, mod4 = mod4)
ictab(mods, aic)
ictab(mods, bic)

## Not run: 
library(brms)
mod1 <- brm(mpg ~ cyl, mtcars)
mod2 <- brm(mpg ~ cyl + vs, mtcars)
mods <- list(m1 = mod1, m2 = mod2)
ictab(mods, LOO, reloo = TRUE, k_threshold = 0.6, cores = 2)

## End(Not run)


[Package ESTER version 0.2.0 Index]