Used Reference Levels in a Linear Model
RefLevel.Rd
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.
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.
Note
It's not clear how general the used algorithm is for more exotic models. dummy.coef
could in such cases be an alternative.
Examples
RefLevel(lm(breaks ~ wool + tension, data = warpbreaks))
#> wool tension
#> "A" "L"