plot.EFAscreet {EFAfactors} | R Documentation |
Plots the Scree Plot
Description
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.
Usage
## S3 method for class 'EFAscreet'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments to be passed to the |
Details
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).
Value
A scree plot displaying the eigenvalues against the number of factors.
Examples
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.
EFAscreet.obj <- EFAscreet(response)
plot(EFAscreet.obj)
[Package EFAfactors version 1.2.3 Index]