Last chance! 50% off unlimited learning
Sale ends in
The grouping factors corresponding to the linear mixed-effects model
represented by object
are extracted. If more than one level is
indicated in level
, the corresponding grouping factors are
combined into a data frame; else the selected grouping factor is
returned as a vector.
# S3 method for lme
getGroups(object, form, level, data, sep)
an object inheriting from class lme
, representing
a fitted linear mixed-effects model.
this argument is included to make the method function compatible with the generic and is ignored in this method.
an optional integer vector giving the level(s) of grouping
to be extracted from object
. Defaults to the highest or
innermost level of grouping.
unused
character, the separator to use between group levels when
multiple levels are collapsed. The default is '/'
.
either a data frame with columns given by the grouping factors
indicated in level
, or, when a single level is requested, a
factor representing the selected grouping factor.
# NOT RUN {
fm1 <- lme(pixel ~ day + day^2, Pixel,
random = list(Dog = ~day, Side = ~1))
getGroups(fm1, level = 1:2)
# }
Run the code above in your browser using DataLab