bootWeights.Rd
Compute model weights using bootstrap.
bootWeights(object, ..., R, rank = c("AICc", "AIC", "BIC"))
A numeric vector of model weights.
The models are fitted repeatedly to a resampled data set and ranked using -type criterion. The model weights represent the proportion of replicates when a model has the lowest IC value.
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.
Weights, model.avg
Other model weights:
BGWeights()
,
cos2Weights()
,
jackknifeWeights()
,
stackingWeights()
# 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)
#> Fixed term is "(Intercept)"
am <- model.avg(fml)
Weights(am) <- bootWeights(am, data = Beetle, R = 25)
#> Warning: extra arguments ignored
summary(am)
#>
#> Call:
#> model.avg(object = fml)
#>
#> Component model call:
#> glm(formula = Prop ~ <4 unique rhs>, family = binomial, data = Beetle,
#> na.action = na.fail, x = TRUE)
#>
#> Component models:
#> df bootstrap weight
#> 1 2 0.6
#> 2 2 0.4
#> 12 3 0.0
#> (Null) 1 0.0
#>
#> Term codes:
#> dose mortality
#> 1 2
#>
#> Model-averaged coefficients:
#> (full average)
#> Estimate Std. Error Adjusted SE z value Pr(>|z|)
#> (Intercept) -9.8098 5.9282 5.9769 1.641 0.101
#> dose 0.1473 0.1214 0.1221 1.207 0.227
#> mortality 2.2711 2.7966 2.8049 0.810 0.418
#>
#> (conditional average)
#> Estimate Std. Error Adjusted SE z value Pr(>|z|)
#> (Intercept) -9.80980 5.92817 5.97691 1.641 0.101
#> dose 0.24554 0.02149 0.02683 9.150 <2e-16 ***
#> mortality 5.67779 0.45764 0.57134 9.938 <2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>