Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

caconv

Converting data types in CA and MCA


Description

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).

Usage

caconv(x, from = c("freq", "rpm", "ind", "Burt"), to = c("rpm", "ind", "Burt", "freq"), 
              nlev = NA, vars = c(1,2), ...)

Arguments

x

A matrix (two-way frequency table, indicator matrix, or Burt matrix) or data frame (response pattern matrix).

from

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").

to

The data type into which x should be converted.

nlev

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.

vars

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).

Details

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.

Value

A matrix or data frame containing the converted data (with the type specified in to).

See Also


ca

Simple, Multiple and Joint Correspondence Analysis

v0.71.1
GPL
Authors
Michael Greenacre [aut], Oleg Nenadic [aut, cre], Michael Friendly [ctb]
Initial release
2018-10-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.