Description Usage Arguments Value WARNINGS Author(s) References See Also Examples
Function to determine optimal weights for model averaging based on a proposal by Zhang et al. ( 2014) to derive a weight choice criterion based on the conditional Akaike Information Criterion as proposed by Greven and Kneib (2010). The underlying optimization is a customized version of the Augmented Lagrangian Method.
1 | getWeights(models)
|
models |
An list object containing all considered candidate models fitted by
|
An object containing a vector of optimized weights, value of the minimized target function and the duration of the optimization process.
No weight-determination is currently possible for models called via gamm4
.
Benjamin Saefken & Rene-Marcel Kruse
Greven, S. and Kneib T. (2010) On the behaviour of marginal and conditional AIC in linear mixed models. Biometrika 97(4), 773-789.
Zhang, X., Zou, G., & Liang, H. (2014). Model averaging and weight choice in linear mixed-effects models. Biometrika, 101(1), 205-218.
Nocedal, J., & Wright, S. (2006). Numerical optimization. Springer Science & Business Media.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(Orthodont, package = "nlme")
models <- list(
model1 <- lmer(formula = distance ~ age + Sex + (1 | Subject) + age:Sex,
data = Orthodont),
model2 <- lmer(formula = distance ~ age + Sex + (1 | Subject),
data = Orthodont),
model3 <- lmer(formula = distance ~ age + (1 | Subject),
data = Orthodont),
model4 <- lmer(formula = distance ~ Sex + (1 | Subject),
data = Orthodont))
foo <- getWeights(models = models)
foo
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.