by-lmby {doBy} | R Documentation |
List of lm objects with a common model
Description
The data is split into strata according to the levels of the grouping factors and individual lm fits are obtained for each stratum.
Usage
lm_by(data., formula., id = NULL, ...)
lmBy(formula., data., id = NULL, ...)
Arguments
data. |
A dataframe |
formula. |
A linear model formula object of the form |
id |
A formula describing variables from data which are to be available also in the output. |
... |
Additional arguments passed on to |
Value
A list of lm fits.
Author(s)
Søren Højsgaard, sorenh@math.aau.dk
Examples
lm_lst <- lmBy(1 / uptake ~ log(conc) | Treatment, data=CO2)
coef(lm_lst)
fitted(lm_lst)
residuals(lm_lst)
summary(lm_lst)
coef(summary(lm_lst))
coef(summary(lm_lst), simplify=TRUE)
[Package doBy version 4.7.0 Index]