Skip to contents

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.

Note

It's not clear how general the used algorithm is for more exotic models. dummy.coef could in such cases be an alternative.

Value

a named vector containing the reference levels of all factors

Author

Andri Signorell <andri@signorell.net>

See also

dummy.coef, Response, relevel, lm

Examples

RefLevel(lm(breaks ~ wool + tension, data = warpbreaks))
#>    wool tension 
#>     "A"     "L"