by-lmby | R Documentation |
The data is split into strata according to the levels of the grouping factors and individual lm fits are obtained for each stratum.
lm_by(data, formula, id = NULL, ...)
lmBy(formula, data, id = NULL, ...)
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 |
A list of lm fits.
Søren Højsgaard, sorenh@math.aau.dk
bb <- lmBy(1 / uptake ~ log(conc) | Treatment, data=CO2)
coef(bb)
fitted(bb)
residuals(bb)
summary(bb)
coef(summary(bb))
coef(summary(bb), simplify=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.