powered by
Generates orthonormal (orthogonal and normalized) contrasts. Each row is the vertex of an N-dimensional simplex. The only exception are contrasts for the 2-level case, which return 1 and -1.
contr.simplex(n, size = NULL)
The number of levels in the catagorical variable.
Default `1`. The length of the simplex vector.
A matrix of Orthonormal contrasts.
# NOT RUN { contr.simplex(4) # }
Run the code above in your browser using DataLab