Learn R Programming

MNM (version 0.95-2)

mvPCA: Principal Component Analysis

Description

Principal component analysis based on different score functions

Usage

mvPCA(X, score = "identity", estimate = "outer", 
      na.action = na.fail, ...)

Arguments

X
a numeric data frame or matrix with p columns.
score
score to be used. Can be either "identity", "sign", "symmsign" or "rank".
estimate
can be "outer" or "inner".
na.action
a function which indicates what should happen when the data contain 'NA's. Default is to fail.
...
further arguments passed to or from other methods.

Value

  • A list with class 'mvloc' containing the following components:
  • EigenVthe standardized eigenvalues.
  • loadingsmatrix with the corresponding loadings.
  • scoresmatrix with the principal components.
  • dnamename of X.
  • methodWhich shape matrix was used for the computation.
  • n.obsnumber of observations used.
  • pnumber of variables.

Details

PCA as descriped in chapter 9 of the MNM book. Note that here ALL scatter matrices used are standardized to have trace(p). This function differs from most other PCA functions in R in that it does not center the data. The 'mvPCA' class has a print, summary, plot and predict method.

References

Oja, H. (2010), Multivariate Nonparametric Methods with R, Springer.

See Also

princomp, prcomp

Examples

Run this code
data(iris)
IRIS <- iris[,1:4]
iris.pca <- mvPCA(IRIS, "sign", "i")
iris.pca
summary(iris.pca)
pairs(iris.pca$scores, col=iris[,5])

Run the code above in your browser using DataLab