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 EKC function with default parameters.
# \donttest{
Hull.obj <- Hull(response)
print(Hull.obj)
plot(Hull.obj)
## Get the CFI, df and nfact results.
CFI <- Hull.obj$CFI
df <- Hull.obj$df
nfact <- Hull.obj$nfact
print(CFI)
print(df)
print(nfact)
# }
Run the code above in your browser using DataLab