Statistics: princomp

### Function Reference: `princomp`

statistics: COEFF = princomp (X)
statistics: [COEFF, SCORE] = princomp (X)
statistics: [COEFF, SCORE, latent] = princomp (X)
statistics: [COEFF, SCORE, latent, tsquare] = princomp (X)
statistics: […] = princomp (X, "econ")

Performs a principal component analysis on a NxP data matrix X.

- COEFF : returns the principal component coefficients
- SCORE : returns the principal component scores, the representation of X in the principal component space
- LATENT : returns the principal component variances, i.e., the eigenvalues of the covariance matrix X.
- TSQUARE : returns Hotelling’s T-squared Statistic for each observation in X
- [...] = princomp(X,’econ’) returns only the elements of latent that are not necessarily zero, and the corresponding columns of COEFF and SCORE, that is, when n <= p, only the first n-1. This can be significantly faster when p is much larger than n. In this case the svd will be applied on the transpose of the data matrix X

### References

1. Jolliffe, I. T., Principal Component Analysis, 2nd Edition, Springer, 2002

Source Code: princomp