Question

How to downproject with PCA in R?

When I use princomp function on my data it creates as many principal components as there are dimensions in the original data. But how can I down-project, let's say if I have 10 dimensional data and I want to downproject to 2 dimensions?

Était-ce utile?

La solution

if you mean doing PCA and keeping just a few of the components (dimensions) then one way is to use principal in package psych. (Using the argument nfactors)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top