arm.glm: Adaptive Regression by Mixing

View source: R/arm.glm.R

arm.glmR Documentation

Adaptive Regression by Mixing


Combine all-subsets GLMs using the ARM algorithm. Calculate ARM weights for a set of models.


arm.glm(object, R = 250, = c("aic", "loglik"), trace = FALSE)

armWeights(object, ..., data, = c("aic", "loglik"), R = 1000)



for arm.glm, a fitted “global” glm object. For armWeights, a fitted glm object, or a list of such, or an "averaging" object.


more fitted model objects.


number of permutations.

indicates whether model weights should be calculated with AIC or log-likelihood.


if TRUE, information is printed during the running of arm.glm.


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 R 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 description.

armWeights returns a numeric vector of model weights.


Number of parameters is limited to floor(nobs(object) / 2) - 1. All-subsets respect marginality constraints.


Kamil Bartoń


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.

See Also

model.avg, par.avg

Weights for assigning new model weights to an "averaging" object.

Other implementation of ARM algorithm: arms in (archived) package MMIX.

Other kinds of model weights: BGWeights, bootWeights, cos2Weights, jackknifeWeights, stackingWeights.


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)

MuMIn documentation built on March 18, 2022, 5:28 p.m.