ranef.lmList.Rd
The difference between the individual lm
components
coefficients and their average is calculated.
# S3 method for class 'lmList'
ranef(object, augFrame, data, which, FUN, standard,
omitGroupingFactor, ...)
an object inheriting from class "lmList"
, representing
a list of lm
objects with a common model.
an optional logical value. If TRUE
, the returned
data frame is augmented with variables defined in data
; else,
if FALSE
, only the coefficients are returned. Defaults to
FALSE
.
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
.
an optional positive integer vector specifying which
columns of data
should be used in the augmentation of the
returned data frame. Defaults to all columns in data
.
an optional summary function or a list of summary functions
to be applied to group-varying variables, when collapsing 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.
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
.
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
.
some methods for this generic require additional arguments. None are used in this method.
a vector with the differences between the individual lm
coefficients in object
and their average.
Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer, esp. pp. 100, 461.
fm1 <- lmList(distance ~ age | Subject, Orthodont)
ranef(fm1)
#> (Intercept) age
#> M16 0.1888889 -0.11018519
#> M05 -3.1111111 0.18981481
#> M02 -1.9111111 0.11481481
#> M11 3.2888889 -0.33518519
#> M07 -1.8111111 0.13981481
#> M08 2.9888889 -0.28518519
#> M03 -0.7611111 0.08981481
#> M12 -3.5111111 0.33981481
#> M13 -13.9611111 1.28981481
#> M14 2.3388889 -0.13518519
#> M09 -2.3611111 0.31481481
#> M15 -3.2611111 0.46481481
#> M06 2.1888889 0.01481481
#> M04 7.9388889 -0.48518519
#> M01 0.5388889 0.28981481
#> M10 4.4888889 0.08981481
#> F10 -3.2111111 -0.21018519
#> F09 1.3388889 -0.38518519
#> F06 0.2388889 -0.28518519
#> F01 0.4888889 -0.28518519
#> F05 2.8388889 -0.38518519
#> F07 0.1888889 -0.11018519
#> F02 -2.5611111 0.13981481
#> F08 4.6888889 -0.48518519
#> F03 -2.3611111 0.18981481
#> F04 2.8888889 -0.18518519
#> F11 2.1888889 0.01481481
random.effects(fm1) # same as above
#> (Intercept) age
#> M16 0.1888889 -0.11018519
#> M05 -3.1111111 0.18981481
#> M02 -1.9111111 0.11481481
#> M11 3.2888889 -0.33518519
#> M07 -1.8111111 0.13981481
#> M08 2.9888889 -0.28518519
#> M03 -0.7611111 0.08981481
#> M12 -3.5111111 0.33981481
#> M13 -13.9611111 1.28981481
#> M14 2.3388889 -0.13518519
#> M09 -2.3611111 0.31481481
#> M15 -3.2611111 0.46481481
#> M06 2.1888889 0.01481481
#> M04 7.9388889 -0.48518519
#> M01 0.5388889 0.28981481
#> M10 4.4888889 0.08981481
#> F10 -3.2111111 -0.21018519
#> F09 1.3388889 -0.38518519
#> F06 0.2388889 -0.28518519
#> F01 0.4888889 -0.28518519
#> F05 2.8388889 -0.38518519
#> F07 0.1888889 -0.11018519
#> F02 -2.5611111 0.13981481
#> F08 4.6888889 -0.48518519
#> F03 -2.3611111 0.18981481
#> F04 2.8888889 -0.18518519
#> F11 2.1888889 0.01481481