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(formula, data, family, subset, weights, na.action, offset, pool, ...)
lmList, a linear formula object of the form
y ~ x1+...+xn | g. In the formula object,
yrepresents the response,
x1,...,xnthe covariates, and
gthe grouping factor speci
- a data frame in which to interpret the variables named in
- an optional family specification for a generalized linear model.
- an optional vector of weights to be used in the fitting process.
- an optional vector specifying a subset of observations to be used in the fitting process.
- a function which indicates what should happen
when the data contain
NAs. The default is set by the
options, and is
- this can be used to specify an a priori known component to be included in the linear predictor during fitting.
- 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.
- optional arguments to be passed to the model-fitting function.
- an object of class lmList which is a list of
lmobjects with as many components as the number of groups defined by the grouping factor.
(fm1 <- lmList(breaks ~ wool | tension, warpbreaks))
Looks like there are no examples yet.