contr.dummy | R Documentation |
Returns a matrix of contrasts.
contr.dummy(n, contrasts = TRUE)
n |
A vector containing levels of a factor, or the number of levels. |
contrasts |
A logical value indicating whether contrasts should be computed. |
contr.dummy
is standard dummy-coding, contr.metric
has the
same effect like as.numeric
(makes sense of course only for ordered
variables). contr.ordinal
computes contrasts for ordinal variables.
A matrix with n rows and n-1 columns for
contr.ordinal
, a matrix with n rows and n columns for
contr.dummy
and a vector of length n for contr.metric
.
Klaus P. Schliep klaus.schliep@gmail.com
Hechenbichler K. and Schliep K.P. (2004) Weighted k-Nearest-Neighbor Techniques and Ordinal Classification, Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich (\Sexpr[results=rd]{tools:::Rd_expr_doi("10.5282/ubm/epub.1769")})
contrasts
,
contr.poly
and contr.sdif
contr.metric(5)
contr.ordinal(5)
contr.dummy(5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.