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.
This exercise is part of the course
Factor Analysis in R
Exercise instructions
- Once again, calculate the correlation matrix.
- Next, use that correlation matrix function to create a scree plot.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate the correlation matrix first
bfi_EFA_cor <- cor(___, use = ___)
# Then use that correlation matrix to create the scree plot
___(___, factors = FALSE)