getME {lme4} | R Documentation |
Extract (or “get”) “components” – in a generalized
sense – from a fitted mixed effects model, i.e. (in this version
of the package) from an R object of class "mer"
.
The goal is to provide “everything a user may want” from a
fitted "mer"
object as far as it is not available by
methods, such as fixef
, ranef
,
vcov
, etc.
getME(object, name)
object |
a fitted mixed-effects model of class
|
name |
a character string specifying the name of the
“component”. Note this may not be the name of
|
Unspecified, as very much depending on the name
.
getCall()
(in R >= 2.14.0; otherwise in MatrixModels).
More standard methods for *mer()
objects, such as
ranef
,
fixef
,
vcov
, etc.
## shows many methds you should consider *before* getME(): showMethods(class = "mer") (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) Z <- getME(fm1, "Z") stopifnot(is(Z, "CsparseMatrix"), c(180,36) == dim(Z), all.equal(fixef(fm1), getME(fm1, "beta"), check.attr=FALSE, tol = 0)) ## All that can be accessed [potentially ..]: (nmME <- eval(formals(getME)$name))