Combine all-subsets GLMs using the ARM algorithm. Calculate ARM weights for a set of models.
arm.glm(object, R = 250, weight.by = c("aic", "loglik"), trace = FALSE) armWeights(object, ..., data, weight.by = c("aic", "loglik"), R = 1000)
more fitted model objects.
number of permutations.
indicates whether model weights should be calculated with AIC or log-likelihood.
a data frame in which to look for variables for use with prediction. If omitted, the fitted linear predictors are used.
For each of all-subsets of the “global” model, parameters are estimated
using randomly sampled half of the data. Log-likelihood given the remaining half
of the data is used to calculate AIC weights. This is repeated
times and mean of the weights is used to average all-subsets parameters
estimated using complete data.
arm.glm returns an object of class
"averaging" contaning only
“full” averaged coefficients. See
model.avg for object
armWeights returns a numeric vector of model weights.
Number of parameters is limited to
floor(nobs(object) / 2) - 1.
All-subsets respect marginality constraints.
Yang Y. (2001) Adaptive Regression by Mixing. Journal of the American Statistical Association 96: 574–588.
Yang Y. (2003) Regression with multiple candidate models: selecting or mixing? Statistica Sinica 13: 783–810.
Weights for assigning new model weights to an
Other implementation of ARM algorithm:
arms in (archived) package
Other kinds of model weights:
fm <- glm(y ~ X1 + X2 + X3 + X4, data = Cement) summary(am1 <- arm.glm(fm, R = 15)) mst <- dredge(fm) am2 <- model.avg(mst, fit = TRUE) Weights(am2) <- armWeights(am2, data = Cement, R = 15) # differences are due to small R: coef(am1, full = TRUE) coef(am2, full = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.