CA {MVar} | R Documentation |
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), |
typmatrix |
Matrix used for calculations when typdata = "c". |
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. |
mtxP |
Matrix of the relative frequency. |
vtrR |
Vector with sums of the rows. |
vtrC |
Vector with sums of the columns. |
mtxPR |
Matrix with profile of the rows. |
mtxPC |
Matrix with profile of the columns |
mtxZ |
Matrix Z. |
mtxU |
Matrix with the eigenvectors U. |
mtxV |
Matrix with the eigenvectors V. |
mtxL |
Matrix with eigenvalues. |
mtxX |
Matrix with the principal coordinates of the rows. |
mtxY |
Matrix with the principal coordinates of the columns. |
mtxAutvlr |
Matrix of the inertias (variances), with the proportions and proportions accumulated. |
Author(s)
Paulo Cesar Ossani
Marcelo Angelo Cirillo
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
Examples
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)