Skip to content
Prev 170605 / 398506 Next

PCA functions

princomp uses the raw data and calculates the correlation or covariance matrix on the way to the PC's, so that doesn't use a correlation matrix itself. You do, however, get the choice.

However, PC's are the eigenvectors of the correlation (or covariance) matrix, so in principle calling eigen() on either would be sufficient for the PC's. The signs may differ, though, as they are arbitrary; compare prcomp(USArrests)$rotation with eigen(cov(USArrests)).

S
"glenn" <g1enn.roberts at btinternet.com> writes:
Yes, there is: princomp(). :-)