Interactive demo · Statistical Methods for Modern Biology · Chapter 7

PCA explorer: scree plot, principal plane, correlation circle and biplot

A full principal component analysis in three pictures. The scree plot shows how the total variance splits over the components and helps to choose how many to keep. The principal plane shows the observations (the scores), drawn with equal scales so that distances can be read; large rings are group means projected as supplementary points. The correlation circle shows each variable as an arrow whose coordinates are its correlations with the two components; arrows close to the circle are well represented and the angle between two long arrows reflects their correlation. Switch between correlation PCA (standardised variables) and covariance PCA (centred only) to see why scaling matters (Holmes and Huber 2019, Sections 7.5 to 7.8).

Data

Preprocessing

Row weights

Axes

Show

Eigenvalues

Try these

Conventions are those of ade4::dudi.pca: weighted means and standard deviations with weights summing to one (divisor n for equal weights), eigenvalues of ZtDZ, scores ZV. With equal weights the eigenvalues are therefore (n − 1)/n times those of prcomp. With inverse group sizes the weights are rescaled to sum to one; dudi.pca uses them unscaled and reports eigenvalues multiplied by the number of groups (percentages are the same). Signs are fixed so that the largest loading of each axis is positive. For data with more than 13 variables only the 12 arrows longest in the chosen plane are drawn.

In the lecture notes