plot.EKC.Rd
This function generates an Empirical Kaiser Criterion (EKC) plot to visualize the eigenvalues of the actual data. The EKC method helps in determining the number of factors to retain by identifying the point where the eigenvalues exceed the reference eigenvalue. The plot provides a graphical representation to assist in factor selection.
# S3 method for class 'EKC'
plot(x, ...)
None. This function is used for side effects (plotting).
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
# \donttest{
EKC.obj <- EKC(response)
#> The number of factors suggested by EKC is 6 .
## EKC plot
plot(EKC.obj)
# }