Lab week 9

We will in this lab explore how principal components are calculated and analyzed.

We will be using the concrete data set from the {modeldata} package which is loaded with {tidymodels}.

library(tidymodels)
data(concrete)
  1. Calculate the PCA of the data
  2. Explore the loading, eigenvalues, and final projection using the broom package
  3. Visualize the projections. Look at how the scaling of the variables changes the projection
  4. Use the {recipes} package to calculate the principal components.