contr.backward_difference | R Documentation |
Return a backward difference contrast matrix
contr.backward_difference(fct)
fct |
factor variable to apply contrast to |
matrix with n rows and n-1 columns where n is the number of factor levels
Backward difference coding # nolint
contrasts
contrasts(iris$Species) <- contr.backward_difference(iris$Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.