File: getWeights.Rd

package info (click to toggle)
r-cran-caic4 1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 356 kB
  • sloc: makefile: 2
file content (64 lines) | stat: -rw-r--r-- 2,011 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getWeights.R
\name{getWeights}
\alias{getWeights}
\title{Optimize weights for model averaging.}
\usage{
getWeights(models)
}
\arguments{
\item{models}{An list object containing all considered candidate models fitted by
\code{\link[lme4]{lmer}} of the lme4-package or of class
\code{\link[nlme]{lme}}.}
}
\value{
An object containing a vector of optimized weights, 
value of the minimized target function and the duration of the optimization 
process.
}
\description{
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.
}
\section{WARNINGS }{
 
No weight-determination is currently possible for models called via \code{gamm4}.
}

\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 <- getWeights(models = models)
foo


}
\references{
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.
}
\seealso{
\code{\link[lme4]{lme4-package}}, \code{\link[lme4]{lmer}},
\code{\link[lme4]{getME}}
}
\author{
Benjamin Saefken & Rene-Marcel Kruse
}