Description Usage Arguments Details Value See Also Examples
Extract (or “get”) “components” – in a
generalized sense – from a fitted mixedeffects model,
i.e., (in this version of the package) from an object of
class "merMod"
.
1 2 3 4 5 6 7 8 9 10 11 12  getME(object, name, ...)
## S3 method for class 'merMod'
getME(object,
name = c("X", "Z", "Zt", "Ztlist", "mmList", "y", "mu", "u", "b",
"Gp", "Tp", "L", "Lambda", "Lambdat", "Lind", "Tlist",
"A", "RX", "RZX", "sigma", "flist",
"fixef", "beta", "theta", "ST", "REML", "is_REML",
"n_rtrms", "n_rfacs", "N", "n", "p", "q",
"p_i", "l_i", "q_i", "k", "m_i", "m",
"cnms", "devcomp", "offset", "lower", "devfun", "glmer.nb.theta"),
...)

object 
a fitted mixedeffects model of class

name 
a character vector specifying the name(s) of
the “component”. If

... 
currently unused in lme4, potentially further arguments in methods. 
The goal is to provide “everything a user may
want” from a fitted "merMod"
object as far
as it is not available by methods, such as
fixef
, ranef
,
vcov
, etc.
Unspecified, as very much depending on the name
.
getCall()
. More standard methods for "merMod"
objects, such as ranef
, fixef
,
vcov
, etc.: see methods(class="merMod")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  ## shows many methods you should consider *before* using getME():
methods(class = "merMod")
(fm1 < lmer(Reaction ~ Days + (DaysSubject), sleepstudy))
Z < getME(fm1, "Z")
stopifnot(is(Z, "CsparseMatrix"),
c(180,36) == dim(Z),
all.equal(fixef(fm1), b1 < getME(fm1, "beta"),
check.attributes=FALSE, tolerance = 0))
## A way to get *all* getME()s :
## internal consistency check ensuring that all work:
parts < getME(fm1, "ALL")
str(parts, max=2)
stopifnot(identical(Z, parts $ Z),
identical(b1, parts $ beta))

Loading required package: Matrix
[1] VarCorr anova as.function coef confint
[6] deviance df.residual drop1 extractAIC family
[11] fitted fixef formula getL getME
[16] hatvalues isGLMM isLMM isNLMM isREML
[21] logLik model.frame model.matrix ngrps nobs
[26] plot predict print profile ranef
[31] refit refitML residuals show sigma
[36] simulate summary terms update vcov
[41] weights
see '?methods' for accessing help and source code
Linear mixed model fit by REML ['lmerMod']
Formula: Reaction ~ Days + (Days  Subject)
Data: sleepstudy
REML criterion at convergence: 1743.628
Random effects:
Groups Name Std.Dev. Corr
Subject (Intercept) 24.740
Days 5.922 0.07
Residual 25.592
Number of obs: 180, groups: Subject, 18
Fixed Effects:
(Intercept) Days
251.41 10.47
List of 45
$ X : num [1:180, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
.. attr(*, "dimnames")=List of 2
.. attr(*, "assign")= int [1:2] 0 1
.. attr(*, "msgScaleX")= chr(0)
$ Z :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
$ Zt :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
$ Ztlist :List of 2
..$ Subject.(Intercept):Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
..$ Subject.Days :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
$ mmList :List of 1
..$ Days  Subject: num [1:180, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
.. .. attr(*, "dimnames")=List of 2
.. .. attr(*, "assign")= int [1:2] 0 1
$ y : num [1:180] 250 259 251 321 357 ...
$ mu : num [1:180] 254 273 293 313 332 ...
$ u : num [1:36] 2.34 39.68 41.79 34.58 40.3 ...
$ b :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
$ Gp : int [1:2] 0 36
$ Tp : Named num [1:2] 0 3
.. attr(*, "names")= chr [1:2] "beg__" "Subject"
$ L :Formal class 'dCHMsimpl' [package "Matrix"] with 10 slots
$ Lambda :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
$ Lambdat :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
$ Lind : int [1:54] 1 2 3 1 2 3 1 2 3 1 ...
$ Tlist :List of 1
..$ Subject: num [1:2, 1:2] 0.9667 0.0152 0 0.2309
$ A :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
$ RX : num [1:2, 1:2] 3.79 0 2.3 16.56
.. attr(*, "dimnames")=List of 2
$ RZX : num [1:36, 1:2] 3.022 0.269 3.022 0.269 3.022 ...
.. attr(*, "dimnames")=List of 2
$ sigma : num 25.6
$ flist :List of 1
..$ Subject: Factor w/ 18 levels "308","309","310",..: 1 1 1 1 1 1 1 1 1 1 ...
.. attr(*, "assign")= int 1
$ fixef : Named num [1:2] 251.4 10.5
.. attr(*, "names")= chr [1:2] "(Intercept)" "Days"
$ beta : num [1:2] 251.4 10.5
$ theta : Named num [1:3] 0.9667 0.0152 0.2309
.. attr(*, "names")= chr [1:3] "Subject.(Intercept)" "Subject.Days.(Intercept)" "Subject.Days"
$ ST :List of 1
..$ Subject: num [1:2, 1:2] 0.9667 0.0157 0 0.2309
$ REML : int 2
$ is_REML : logi TRUE
$ n_rtrms : int 1
$ n_rfacs : int 1
$ N : Named int 180
.. attr(*, "names")= chr "N"
$ n : Named int 180
.. attr(*, "names")= chr "n"
$ p : Named int 2
.. attr(*, "names")= chr "p"
$ q : Named int 36
.. attr(*, "names")= chr "q"
$ p_i : Named int 2
.. attr(*, "names")= chr "Days  Subject"
$ l_i : Named int 18
.. attr(*, "names")= chr "Subject"
$ q_i : Named int 36
.. attr(*, "names")= chr "Days  Subject"
$ k : int 1
$ m_i : Named num 3
.. attr(*, "names")= chr "Days  Subject"
$ m : int 3
$ cnms :List of 1
..$ Subject: chr [1:2] "(Intercept)" "Days"
$ devcomp :List of 2
..$ cmp : Named num [1:10] 7.60e+01 8.28 9.89e+04 1.77e+04 1.17e+05 ...
.. .. attr(*, "names")= chr [1:10] "ldL2" "ldRX2" "wrss" "ussq" ...
..$ dims: Named int [1:12] 180 180 2 178 36 3 1 1 0 2 ...
.. .. attr(*, "names")= chr [1:12] "N" "n" "p" "nmp" ...
$ offset : num [1:180] 0 0 0 0 0 0 0 0 0 0 ...
$ lower : num [1:3] 0 Inf 0
$ devfun :function (theta)
$ glmer.nb.theta: logi NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.