Extract lme Random Effects
The estimated random effects at level i are represented as a data frame with rows given by the different groups at that level and columns given by the random effects. If a single level of grouping is specified, the returned object is a data frame; else, the returned object is a list of such data frames. Optionally, the returned data frame(s) may be augmented with covariates summarized over groups.
## S3 method for class 'lme' ranef(object, augFrame, level, data, which, FUN, standard, omitGroupingFactor, subset, ...)
object |
an object inheriting from class |
augFrame |
an optional logical value. If |
level |
an optional vector of positive integers giving the levels of grouping to be used in extracting the random effects from an object with multiple nested grouping levels. Defaults to all levels of grouping. |
data |
an optional data frame with the variables to be used for
augmenting the returned data frame when |
which |
an optional positive integer vector specifying which
columns of |
FUN |
an optional summary function or a list of summary functions
to be applied to group-varying variables, when collapsing |
standard |
an optional logical value indicating whether the
estimated random effects should be "standardized" (i.e. divided by
the estimate of the standard deviation of that group of random
effects). Defaults to |
omitGroupingFactor |
an optional logical value. When |
subset |
an optional expression indicating for which rows the random effects should be extracted. |
... |
some methods for this generic require additional arguments. None are used in this method. |
a data frame, or list of data frames, with the estimated
random effects at the grouping level(s) specified in level
and,
optionally, other covariates summarized over groups. The returned
object inherits from classes random.effects.lme
and
data.frame
.
José Pinheiro and Douglas Bates bates@stat.wisc.edu
Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer, esp. pp. 100, 461.
fm1 <- lme(distance ~ age, Orthodont, random = ~ age | Subject) ranef(fm1) random.effects(fm1) # same as above random.effects(fm1, augFrame = TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.