dummycode {multiblock} | R Documentation |
Dummy-coding of a single vector
Description
Flexible dummy-coding allowing for all R's built-in types of contrasts and optional dropping of a factor level to reduce rank defficiency probability.
Usage
dummycode(Y, contrast = "contr.sum", drop = TRUE)
Arguments
Y |
|
contrast |
Contrast type, default = "contr.sum". |
drop |
|
Value
matrix
made by dummy-coding the input vector.
Examples
vec <- c("a","a","b","b","c","c")
dummycode(vec)
[Package multiblock version 0.8.8.1 Index]