contr.backward_difference: Backward difference contrast matrix

View source: R/contr.R

contr.backward_differenceR Documentation

Backward difference contrast matrix

Description

Return a backward difference contrast matrix

Usage

contr.backward_difference(fct)

Arguments

fct

factor variable to apply contrast to

Value

matrix with n rows and n-1 columns where n is the number of factor levels

References

Backward difference coding # nolint

See Also

contrasts

Examples

contrasts(iris$Species) <- contr.backward_difference(iris$Species)

the-mad-statter/washu documentation built on May 11, 2023, 7:24 p.m.