contr.niets | R Documentation |
This function generates a cell means contrast matrix to support PLS models.
contr.niets(n, contrasts)
n |
A vector of levels for a factor, or the number of levels. |
contrasts |
a logical indicating whether contrasts should be computed; set to |
This function uses contr.treatment
to generate a cell means contrast matrix in support of PLS models.
For datasets with categorical variables it produces the needed design matrix.
Nelson Lee Afanador
# Three levels levels <- LETTERS[1:3] contr.niets(levels) # Two levels levels <- LETTERS[1:2] contr.niets(levels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.