Learn R Programming

MVar (version 2.0.4)

CA: Correspondence Analysis (CA).

Description

Performs simple correspondence analysis (CA) and multiple (MCA) in a data set.

Usage

CA(Data, TypData = "f", TypMatrix = "I")

Arguments

Data

Data to be analyzed (contingency table).

TypData

"f" for frequency data (default), "c" for qualitative data.

TypMatrix

Matrix used for calculations when TypData = "c". "I" for indicator matrix (default), "B" for Burt's matrix.

Value

DepData

Verify if the rows and columns are dependent, or independent by the chi-square test, at the 5% significance level.

TypData

Data type: "F" frequency or "C" qualitative.

NumCood

Number of principal components.

MatrixP

Matrix of the relative frequency.

VectorR

Vector with sums of the rows.

VectorC

Vector with sums of the columns.

MatrixPR

Matrix with profile of the rows.

MatrixPC

Matrix with profile of the columns

MatrixZ

Matrix Z.

MatrixU

Matrix with the eigenvectors U.

MatrixV

Matrix with the eigenvectors V.

MatrixL

Matrix with eigenvalues.

MatrixX

Matrix with the principal coordinates of the rows.

MatrixY

Matrix with the principal coordinates of the columns.

MatrixAutoVlr

Matrix of the inertias (variances), with the proportions and proportions accumulated.

References

MINGOTI, S. A. Analise de dados atraves de metodos de estatistica multivariada: uma abordagem aplicada. Belo Horizonte: UFMG, 2005. 297 p.

RENCHER, A. C. Methods of Multivariate Analysis. 2th. ed. New York: J.Wiley, 2002. 708 p.

See Also

Plot.CA

Examples

Run this code
# NOT RUN {
data(DataFreq) # frequency data set

Data <- DataFreq[,2:ncol(DataFreq)]

rownames(Data) <- as.character(t(DataFreq[1:nrow(DataFreq),1]))

Resp <- CA(Data, "f") # performs CA

print("Is there dependency between rows and columns?"); Resp$DepData

print("Number of principal coordinates:"); Resp$NumCood

print("Principal coordinates of the rows:"); round(Resp$MatrixX,2)

print("Principal coordinates of the columns:"); round(Resp$MatrixY,2)

print("Inertia of the principal components:"); round(Resp$MatrixAutoVlr,2)
# }

Run the code above in your browser using DataLab