RefLevel {ModTools} | R Documentation |
Used Reference Levels in a Linear Model
Description
Returns all the reference levels in the factors used in a linear model. It is customer friendly to report also the reference level in lm summaries, which normally are suppressed.
Usage
RefLevel(x)
Arguments
x |
lm object, linear model with factors as predictors. |
Details
For reporting tables of linear models we might want to include an information about the used reference levels, which remain uncommented in the default lm
result output. RefLevel()
allows to add a footnote or integrate the reference levels in the coefficient table.
Value
a named vector containing the reference levels of all factors
Note
It's not clear how general the used algorithm is for more exotic models. dummy.coef
could in such cases be an alternative.
Author(s)
Andri Signorell <andri@signorell.net>
See Also
dummy.coef
, Response
, relevel
, lm
Examples
RefLevel(lm(breaks ~ wool + tension, data = warpbreaks))