plot.EFAscreet.Rd
Plots the Scree Plot from an object of class EFAscreet
. The scree plot visualizes the eigenvalues
of the correlation matrix in descending order and helps in identifying the optimal number of factors
by showing where the eigenvalues start to plateau.
# S3 method for class 'EFAscreet'
plot(x, ...)
A scree plot displaying the eigenvalues against the number of factors.
The scree plot is a graphical tool used in exploratory factor analysis. It shows the eigenvalues corresponding to the factors. The number of factors is typically determined by finding the point where the plot levels off ("elbow" point).
library(EFAfactors)
set.seed(123)
##Take the data.bfi dataset as an example.
data(data.bfi)
response <- as.matrix(data.bfi[, 1:25]) ## loading data
response <- na.omit(response) ## Remove samples with NA/missing values
## Transform the scores of reverse-scored items to normal scoring
response[, c(1, 9, 10, 11, 12, 22, 25)] <- 6 - response[, c(1, 9, 10, 11, 12, 22, 25)] + 1
## Run EFAscreet function with default parameters.
# \donttest{
EFAscreet.obj <- EFAscreet(response)
plot(EFAscreet.obj)
# }