List of lm Objects with a Common Model
Data is partitioned according to the levels of the grouping
g and individual
lm fits are obtained for each
data partition, using the model defined in
lmList(object, data, level, na.action, pool)
- either a linear formula object of the form
y ~ x1+...+xn | gor a
groupedDataobject. In the formula object,
yrepresents the response,
x1,...,xnthe covariates, and
- a data frame in which to interpret the variables named in
- an optional integer specifying the level of grouping to be used when multiple nested levels of grouping are present.
- a function that indicates what should happen when the
NAs. The default action (
lmListto print an error message and terminate if there are any incomplete observations.
- an optional logical value that is preserved as an attribute of the
returned value. This will be used as the default for
poolin calculations of standard deviations or standard errors for summaries.
- a list of
lmobjects with as many components as the number of groups defined by the grouping factor. Generic functions such as
updatehave methods that can be applied to an
data(Orthodont) fm1 <- lmList(distance ~ age | Subject, Orthodont) summary(fm1)
Looks like there are no examples yet.