Learn R Programming

MuMIn (version 1.47.5)

bootWeights: Bootstrap model weights

Description

Computes model weights using bootstrap.

Usage

bootWeights(object, ..., R, rank = c("AICc", "AIC", "BIC"))

Value

A numeric vector of model weights.

Arguments

object, ...

two or more fitted glm objects, or a list of such, or an "averaging" object.

R

the number of replicates.

rank

a character string, specifying the information criterion to use for model ranking. Defaults to AICc.

Author

Kamil Bartoń, Carsten Dormann

Details

The models are fitted repeatedly to a resampled data set and ranked using AIC-type criterion. The model weights represent the proportion of replicates when a model has the lowest IC value.

References

Dormann, C. et al. 2018 Model averaging in ecology: a review of Bayesian, information-theoretic, and tactical approaches for predictive inference. Ecological Monographs 88, 485–504.

See Also

Weights, model.avg

Other model weights: BGWeights(), cos2Weights(), jackknifeWeights(), stackingWeights()

Examples

Run this code
# To speed up the bootstrap, use 'x = TRUE' so that model matrix is included
#     in the returned object
fm <- glm(Prop ~ mortality + dose, family = binomial, data = Beetle, 
   na.action = na.fail, x = TRUE)

fml <- lapply(dredge(fm, eval = FALSE), eval)
am <- model.avg(fml)

Weights(am) <- bootWeights(am, data = Beetle, R = 25)

summary(am)

Run the code above in your browser using DataLab