PCA {MVar}R Documentation

Principal Components Analysis (PCA).

Description

Performs principal component analysis (PCA) in a data set.

Usage

PCA(data, type = 1)

Arguments

data

Data to be analyzed.

type

1 for analysis using the covariance matrix (default),
2 for analysis using the correlation matrix.

Value

mtxC

Matrix of covariance or correlation according to "type".

mtxAutvlr

Matrix of eigenvalues (variances) with the proportions and proportions accumulated.

mtxAutvec

Matrix of eigenvectors - principal components.

mtxVCP

Matrix of covariance of the principal components with the original variables.

mtxCCP

Matrix of correlation of the principal components with the original variables.

mtxscores

Matrix with scores of the principal components.

Author(s)

Paulo Cesar Ossani

Marcelo Angelo Cirillo

References

Hotelling, H. Analysis of a complex of statistical variables into principal components. Journal of Educational Psychology, Arlington, v. 24, p. 417-441, Sept. 1933.

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

Ferreira, D. F. Estatistica Multivariada. 2a ed. revisada e ampliada. Lavras: Editora UFLA, 2011. 676 p.

Rencher, A. C. Methods of multivariate analysis. 2th. ed. New York: J.Wiley, 2002. 708 p.

See Also

Plot.PCA

Examples

data(DataQuan) # set of quantitative data

data <- DataQuan[,2:8]

rownames(data) <- DataQuan[1:nrow(DataQuan),1]

pc <- PCA(data, 2) # performs the PCA

print("Covariance matrix / Correlation:"); round(pc$mtxC,2)

print("Principal Components:"); round(pc$mtxAutvec,2)

print("Principal Component Variances:"); round(pc$mtxAutvlr,2)

print("Covariance of the Principal Components:"); round(pc$mtxVCP,2)

print("Correlation of the Principal Components:"); round(pc$mtxCCP,2)

print("Scores of the Principal Components:"); round(pc$mtxscores,2)

[Package MVar version 2.2.2 Index]