What is the difference between prcomp and princomp for PCA in R

pca

#1

Hello,

In doing PCA through R I came across two functions for doing so: prcomp and princomp.
Now help for prcomp says that SVD is used for computation and not the Eigen vectors as in princomp.

What does numerical accuracy mean here?
The prcomp doesn’t give the scores as in princomp,so how do I see the records in terms of the principal components??
Also there is difference in the rotated loadings from these two methods.
So how do we decide which function to use for PCA ?


#2

@Kaushik_Roy_Chowdhur can u help


#3

If your number of features is more than the number of samples, use prcomp().
If your number of samples is more than the number of features, use princomp().
princomp() can’t deal with the data that number of features is more than the number of samples


#4

Check out this link to know more about SVD and Eigen decomposition