Verify the geometry in browser R
Why this lab Confirm the PCA geometry with real R output and plots.
The lab runs PCA on the raw and the standardized campus data, prints the loadings, eigenvalues and explained-variance ratios, and draws a scree plot and a biplot, so the scale effect and the retained share can be read directly from the output (Jolliffe & Cadima, 2016).
Three further blocks connect the output to step 3 and step 4. The squared singular values of the standardized matrix, divided by \( n-1 \), reproduce the eigenvalues, so svd() and prcomp() agree. The rank-two reconstruction error is 0.0922, exactly \( n-1 \) times the discarded eigenvalues, or a share of 0.0033 of the standardized variation; the per-campus table shows that campus 5, at 0.042, is the observation the plane represents least well. Finally, the arrow lengths differ by convention: under scale = 0 they range from 0.506 to 0.939, while under scale = 1 every variable is close to 1, because nearly all of the variance of each standardized variable lies in the plane (Gabriel, 1971). The biplot below the scree plot uses scale = 0.
Inline R lab loading…
Evidence check: after running the code, select the result the output supports.