CommencerCommencer gratuitement

Creating a scree plot

The scree plot is a visual representation of eigenvalues. Visual inspection of the scree plot is a quick and easy way to get a feel for the dimensionality of your dataset. Like the eigen() function in the previous exercise, the scree() function takes a correlation matrix as its argument. Eigenvalues can be generated from a principal component analysis or a factor analysis, and the scree() function calculates and plots both by default. Since eigen() finds eigenvalues via principal components analysis, we will use factors = FALSE so our scree plot will only display the values corresponding to those results.

Cet exercice fait partie du cours

Factor Analysis in R

Afficher le cours

Instructions

  • Once again, calculate the correlation matrix.
  • Next, use that correlation matrix function to create a scree plot.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Calculate the correlation matrix first
bfi_EFA_cor <- cor(___, use = ___)

# Then use that correlation matrix to create the scree plot
___(___, factors = FALSE)
Modifier et exécuter le code