RefLevel: Used Reference Levels in a Linear Model

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/ModTools.R

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

1

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

1
RefLevel(lm(breaks ~ wool + tension, data = warpbreaks))

ModTools documentation built on July 26, 2021, 9:06 a.m.