akaike_weights: Compute Akaike/Schwarz weights

Description Usage Arguments Value References Examples

Description

Computes Akaike or Schwarz weights (e.g., Wagenmakers & Farrell, 2004) given a vector of information criterion values.

Usage

1
akaike_weights(ic_values, modelNames = NULL)

Arguments

ic_values

a vector of AIC, BIC, or other information criterion values.

modelNames

an optional vector of labels for each model.

Value

A vector of the relative probabilities for each model.

References

Wagenmakers, E. J., & Farrell, S. (2004). AIC model selection using Akaike weights. Psychonomic bulletin & review, 11, 192-196.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data( ToothGrowth ) # Load in data
# Fit 2 regression models
m1 = lm( len ~ dose, data = ToothGrowth )
m2 = lm( len ~ dose + supp, data = ToothGrowth )
# Create vector of AIC values
ic = c( AIC(m1), AIC(m2) )
akaike_weights( ic )
# Include meaningful labels
modelNames = c( 'Dose', 'Dose+Supp' )
akaike_weights( ic, modelNames )

rettopnivek/mle documentation built on May 5, 2019, 5:54 p.m.