Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predictMA

Prediction of model averaged linear mixed models


Description

Function to perform prediction for model averaged linear mixed models based on the weight selection criterion as proposed by Zhang et al.(2014)

Usage

predictMA(object, new.data)

Arguments

object

A object created by the model averaging function.

new.data

Object that contains the data on which the prediction is to be based on.

Value

An object that containing predictions that are calculated on the basis of dataset and the underlying averaged model.

Author(s)

Benjamin Saefken & Rene-Marcel Kruse

References

Greven, S. and Kneib T. (2010) On the behaviour of marginal and conditional AIC in linear mixed models. Biometrika 97(4), 773-789.

See Also

Examples

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 <- modelAvg(models = models)
predictMA(foo, new.data = Orthodont)

cAIC4

Conditional Akaike Information Criterion for 'lme4' and 'nlme'

v0.9
GPL (>= 2)
Authors
Benjamin Saefken, David Ruegamer, Philipp Baumann and Rene-Marcel Kruse, with contributions from Sonja Greven and Thomas Kneib
Initial release
2019-12-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.