Conversion from and to a number of different data types commonly used in CA and MCA (frequency tables, response pattern matrices, indicator matrices and Burt matrices).
caconv(x, from = c("freq", "rpm", "ind", "Burt"), to = c("rpm", "ind", "Burt", "freq"),
nlev = NA, vars = c(1,2), ...)
A matrix (two-way frequency table, indicator matrix, or Burt matrix) or data frame (response pattern matrix).
The type of input data in x: a frequency table ("freq"), or a response pattern matrix ("rpm"), or an indicator matrix ("ind"), or a Burt matrix ("Burt").
The data type into which x should be converted.
A vector containing the number of levels for each categorical variable (for from="ind" or from="Burt"). If NA, nlev is computed from the data.
A vector of length 2 specifying the index of the variables to use for converting to "freq" (i.e. to a regular two-way frequency table).
Further arguments (ignored).
A matrix or data frame containing the converted data (with the type specified in to).
The function caconv
converts between data types in CA and MCA. Note that a conversion from from="Burt" to to="ind" or to="rpm" is not supported.