form is missing, or is given as a one-sided formula, a
Trellis dot-plot of the random effects is generated, with a different
panel for each random effect (coefficient). Rows in the dot-plot are
determined by the form argument (if not missing) or by the row
names of the random effects (coefficients). If a single factor is
specified in form, its levels determine the dot-plot rows
(with possibly multiple dots per row); otherwise, if form
specifies a crossing of factors, the dot-plot rows are determined by
all combinations of the levels of the individual factors in the
formula. The Trellis function dotplot is used in this method
function. If form is a two-sided formula, a Trellis display is generated,
with a different panel for each variable listed in the right hand side
of form. Scatter plots are generated for numeric variables and
boxplots are generated for categorical (factor or
ordered) variables.
## S3 method for class 'ranef.lmList':
plot(x, form, grid, control, \dots)ranef.lmList, representing the estimated coefficients or
estimated random effects for the lmList object from which it was
produced.dotplot of the estimated
random effects (coefficients) grouped according to all combinations of
the levels of the factors named in form. Default is FALSE.form is given as a two-sided formula. The control
values are referenced by name in the control list and only
the ones to be modified from the default need todotplot
function.lmList, dotplotfm1 <- lmList(distance ~ age | Subject, Orthodont)
plot(ranef(fm1))
fm1RE <- ranef(fm1, aug = TRUE)
plot(fm1RE, form = ~ Sex)
plot(fm1RE, form = age ~ Sex)Run the code above in your browser using DataLab