on-internet
← Community

While using R, PCA and plotting cumulative variance

Stack Overflow ·

I am working with R using a scaled dataset and principal component analysis (princomp). Everything works fine, but I would like to graph the cumulative % variances of principle components to the whole. The summary provides this information, but I am not able to access it yet. In other words, I want to y='Cumulative Proportion' from pca vs. 'component#'. pca <- princomp(class5_subset_scaled) summary(pca) # Summary provides Importance of components: Comp.1 Comp.2 ... Standard deviation 0.0513980 0.04482971 ... Proportion of Variance 0.2089728 0.15897513 ... Cumulative Proportion 0.2089728 0.3679

Comments

Sign in or sign up to comment and upvote.

No comments yet.