Description Usage Arguments Value References Examples
Computes Akaike or Schwarz weights (e.g., Wagenmakers & Farrell, 2004) given a vector of information criterion values.
1 | akaike_weights(ic_values, modelNames = NULL)
|
ic_values |
a vector of AIC, BIC, or other information criterion values. |
modelNames |
an optional vector of labels for each model. |
A vector of the relative probabilities for each model.
Wagenmakers, E. J., & Farrell, S. (2004). AIC model selection using Akaike weights. Psychonomic bulletin & review, 11, 192-196.
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 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.