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?

Was it helpful?

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top