Calculating the proportion of variation explained
The proportion of variation and the cumulative proportion of variation explained by the leading PCs are widely used to determine the importance of the PCs and to decide the number of components to retain.
Diese Übung ist Teil des Kurses
<Kurs>Multivariate Probability Distributions in R</Kurs>Übungsanweisungen
- Using the
pca.stateobject that contains the PCs of thestate.x77data, calculate the variance explained by each principal component. - Calculate the proportion of variance explained by each principal component.
Interaktive praktische Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Variance explained by each PC
pca.var <- ___$sdev^2
# Proportion of variance explained by each PC
pca.pvar <- pca.var/sum(___)