Akaike weights represent the relative likelihood of a model. It can be used in model averaging and selection.

akaike_weights(object)

Arguments

object

a numerical vector with models goodness of fit coefficients

Value

A data frame containing the coefficients:

delta

the delta overall change in the coefficients

relative_logLik

the relative log-likelihood

akaike_weights

the Akaike weights

References

Wagenmakers E. J. & Farrell S. (2004). Psychonomic Bulletin and Review, 11(1), 192–196. doi:10.3758/BF03206482

Author

Kauê de Sousa and Jacob van Etten

Examples

 
data("airquality")

# try three model approaches
mod1 = glm(Temp ~ 1,
            data = airquality,
            family = poisson())

mod2 = glm(Temp ~ Ozone,
            data = airquality,
            family = poisson())

mod3 = glm(Temp ~ Ozone + Solar.R,
            data = airquality,
            family = poisson())

# models AICs together in a single vector
models = c(mod1 = AIC(mod1),
            mod2 = AIC(mod2),
            mod3 = AIC(mod3))

# calculate akaike weights
aw = akaike_weights(models)

# the higher the better
names(models[which.max(aw$akaike_weights)])