getME | R Documentation |
Extract (or
“get”) “components” – in a generalized sense – from
a fitted mixed-effects model, i.e. from an object of class
"rlmerMod"
or "merMod"
.
The function theta
is short for getME(,
"theta")
.
## S3 method for class 'rlmerMod'
getME(object,
name = c("X", "Z", "Zt", "Ztlist", "y", "mu",
"u", "b.s", "b", "Gp", "Tp", "Lambda",
"Lambdat","A", "U_b", "Lind", "sigma",
"flist", "beta", "theta", "n_rtrms",
"n_rfacs", "cnms", "devcomp", "offset",
"lower", "rho_e", "rho_b", "rho_sigma_e",
"rho_sigma_b", "M", "w_e", "w_b",
"w_b_vector", "w_sigma_e", "w_sigma_b",
"w_sigma_b_vector", "is_REML"), ...)
theta(object)
object |
a fitted mixed-effects model of class
|
name |
a character string specifying the name of the
“component”. Possible values are:
|
... |
potentially further arguments passed to and from methods; none here at the moment. |
The goal is to provide “everything a user may
want” from a fitted "rlmerMod"
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
rlmerMod objects, such as ranef
,
fixef
, vcov
, etc.: see
methods(class="rlmerMod")
## shows many methods you should consider *before* using getME():
methods(class = "rlmerMod")
## doFit = FALSE to speed up example
(fm1 <- rlmer(Reaction ~ Days + (Days|Subject), sleepstudy,
method="DASvar", doFit=FALSE))
Z <- getME(fm1, "Z")
stopifnot(is(Z, "CsparseMatrix"),
c(180,36) == dim(Z),
all.equal(fixef(fm1), getME(fm1, "beta"),
check.attributes=FALSE, tolerance = 0))
## All that can be accessed [potentially ..]:
(nmME <- eval(formals(robustlmm:::getME.rlmerMod)$name))
% dont..
stopifnot(all.equal(theta(fm1), getME(fm1, "theta")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.