EFAindex | R Documentation |
A function performs clustering on items by calling VSS and fa. Apply the Very Simple Structure (VSS), Comparative Fit Index (CFI), MAP, and other criteria to determine the appropriate number of factors.
EFAindex(
response,
nfact.max = 10,
cor.type = "cor",
use = "pairwise.complete.obs"
)
response |
A required |
nfact.max |
The maximum number of factors discussed by CD approach. (default = 10) |
cor.type |
How to find the correlations: "cor" is Pearson", "cov" is covariance, "tet" is tetrachoric, "poly" is polychoric, "mixed" uses mixed cor for a mixture of tetrachorics, polychorics, Pearsons, biserials, and polyserials, Yuleb is Yulebonett, Yuleq and YuleY are the obvious Yule coefficients as appropriate. |
use |
an optional character string giving a method for computing covariances in the presence of missing values. This must be one of the strings "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs" (default). @seealso cor. |
A matrix
with the following components:
the Comparative Fit Index
Root Mean Square Error of Approximation (RMSEA) for each number of factors.
Standardized Root Mean Square Residual.
Velicer's MAP values (lower values are better).
Bayesian Information Criterion (BIC) for each number of factors.
Sample-size Adjusted Bayesian Information Criterion (SABIC) for each number of factors.
Chi-square statistic from the factor analysis output.
Degrees of freedom.
Probability that the residual matrix is greater than 0.
Empirically found chi-square statistic.
Empirically found mean residual corrected for degrees of freedom.
Empirically found BIC based on the empirically found chi-square statistic.
VSS fit with complexity 1.
Squared residual correlations.
Factor fit of the complete model.
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 EFAindex function with default parameters.
EFAindex.matrix <- EFAindex(response)
print(EFAindex.matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.