vec2ddc {svs} | R Documentation |
Transform a Vector into a Double-Coded Matrix
Description
A helper function for transforming a vector into a double-coded matrix.
Usage
vec2ddc(x, limits = c(NA, NA))
vec2dc(x, limits = c(NA, NA))
Arguments
x |
A vector, either numeric or an ordered factor. |
limits |
Numeric vector of length two specifying the limits (or "poles") of the underlying ordinal variable. If left unspecified (the default), then the minimum and maximum in |
Details
Double coding, also called data doubling, is a way of indicating how the values of an ordinal variable relate to the lower and upper limits of the variable. Columns -
and +
express how close each (observed) value is to these respective limits.
Value
A matrix with column names -
and +
.
References
Greenacre, M. (2014) Data doubling and fuzzy coding. In: J. Blasius and M. Greenacre (eds.) Visualization and verbalization of data. Chapman and Hall/CRC, 239–253. Greenacre, M. (2017) Correspondence analysis in practice, Third edition. Boca Raton: Chapman and Hall/CRC, 201–208.