"".getME(object, name, ...)# S3 method for 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"),
…)
length(name) > 1 or if name
= "ALL", a named list of components will be returned. Possible values are:
"X":"Z":"Zt":Zt has changed since lme4.0; to get a
backward-compatible structure, use
do.call(Matrix::rBind,getME(.,"Ztlist"))"Ztlist":"mmList":"y":"mu":"u":"b":"Gp":"Tp":"L":"Lambda":"Lambdat":"Lind":"Tlist":"A":"dgCMatrix") for
the unit, orthogonal random effects, \(U\), equal to
getME(.,"Zt") %*% getME(.,"Lambdat")"RX":"RZX":"sigma":sigma(object) is preferred."flist":"fixef":"beta":fixef, but without names)"theta":"ST":"n_rtrms":"n_rfacs":"N":X"n":y"p":X"q":Z"p_i":mmList"l_i":"q_i":ZtList"k":"m_i":"m":"cnms":list."REML":0 indicates the model was fitted by maximum
likelihood, any other positive integer indicates fitting by
restricted maximum likelihood"is_REML":isREML(.)"devcomp":cmp, and a named integer vector, dims, describing
the fitted model. The elements of cmp are:
LRXudims are:
XyXn-pthetaZglmerglmerControlTRUE if model has a scale parameter0 indicates the model was fitted by maximum
likelihood, any other positive integer indicates fitting by
restricted maximum likelihoodTRUE if a GLMMTRUE if an NLMM
"offset":"lower":"devfun":"glmer.nb.theta":glmer.nb.%% -- keep at the very end:
"ALL":list.
name."merMod" object as far
as it is not available by methods, such as
fixef, ranef,
vcov, etc.getCall(). More standard methods for "merMod"
objects, such as ranef, fixef,
vcov, etc.: see methods(class="merMod")## shows many methods you should consider *before* using getME():
methods(class = "merMod")
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), 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))
Run the code above in your browser using DataLab