Performs simple correspondence analysis (CA) and multiple (MCA) in a data set.
CA(data, typdata = "f", typmatrix = "I")
Verify if the rows and columns are dependent, or independent by the chi-square test, at the 5% significance level.
Data type: "F" frequency or "C" qualitative.
Number of principal components.
Matrix of the relative frequency.
Vector with sums of the rows.
Vector with sums of the columns.
Matrix with profile of the rows.
Matrix with profile of the columns
Matrix Z.
Matrix with the eigenvectors U.
Matrix with the eigenvectors V.
Matrix with eigenvalues.
Matrix with the principal coordinates of the rows.
Matrix with the principal coordinates of the columns.
Matrix of the inertias (variances), with the proportions and proportions accumulated.
Data to be analyzed (contingency table).
"f" for frequency data (default),
"c" for qualitative data.
Matrix used for calculations when typdata = "c".
"I" for indicator matrix (default),
"B" for Burt's matrix.
Paulo Cesar Ossani
Marcelo Angelo Cirillo
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.
Plot.CA
data(DataFreq) # frequency data set
data <- DataFreq[,2:ncol(DataFreq)]
rownames(data) <- as.character(t(DataFreq[1:nrow(DataFreq),1]))
res <- CA(data = data, "f") # performs CA
print("Is there dependency between rows and columns?"); res$depdata
print("Number of principal coordinates:"); res$numcood
print("Principal coordinates of the rows:"); round(res$mtxX,2)
print("Principal coordinates of the columns:"); round(res$mtxY,2)
print("Inertia of the principal components:"); round(res$mtxAutvlr,2)
Run the code above in your browser using DataLab