Extract lmList Random Effects

DESCRIPTION:

A data frame containing the differences between the coefficients of the individual lm fits and the average coefficients.

USAGE:

ranef(object, augFrame, data, which, FUN, standard, omitGroupingFactor) 

REQUIRED ARGUMENTS:

object
an object inheriting from class lmList, representing a list of lm objects with a common model.
augFrame
an optional logical value. If TRUE, the returned data frame is augmented with variables defined in the data frame used to produce object; else, if FALSE, only the random effects are returned. Defaults to FALSE.
data
an optional data frame with the variables to be used for augmenting the returned data frame when `augFrame = TRUE. Defaults to the data frame used to fit object.
which
an optional positive integer or character vector specifying which columns of the data frame used to produce object should be used in the augmentation of the returned data frame. Defaults to all variables in the data.
FUN
an optional summary function or a list of summary functions to be applied to group-varying variables, when collapsing the data by groups. Group-invariant variables are always summarized by the unique value that they assume within that group. If FUN is a single function it will be applied to each non-invariant variable by group to produce the summary for that variable. If FUN is a list of functions, the names in the list should designate classes of variables in the frame such as ordered, factor, or numeric. The indicated function will be applied to any group-varying variables of that class. The default functions to be used are mean for numeric factors, and Mode for both factor and ordered. The Mode function, defined internally in gsummary, returns the modal or most popular value of the variable. It is different from the mode function that returns the S-language mode of the variable.
standard
an optional logical value indicating whether the estimated random effects should be "standardized" (i.e. divided by the corresponding estimated standard error). Defaults to FALSE.
omitGroupingFactor
an optional logical value. When TRUE the grouping factor itself will be omitted from the group-wise summary of data but the levels of the grouping factor will continue to be used as the row names for the returned data frame. Defaults to FALSE.

VALUE:

a data frame with the differences between the individual lm coefficients in object and their average. Optionally, the returned data frame may be augmented with covariates summarized over groups or the differences may be standardized.

SEE ALSO:

,

EXAMPLES:

fm1 <- lmList(distance ~ age | Subject, Orthodont) 
ranef(fm1) 
ranef(fm1, standard = TRUE) 
ranef(fm1, augFrame = TRUE)