efa.ekc | R Documentation |
Identify the number of factors to extract based on the Empirical Kaiser
Criterion (EKC). The analysis can be run on a data.frame
or data
matrix
(data
), or on a correlation or covariance matrix
(sample.cov
) and the sample size (sample.nobs
). A
data.frame
is returned with two columns: the eigenvalues from your
data or covariance matrix and the reference eigenvalues. The number of
factors suggested by the Empirical Kaiser Criterion (i.e. the sample
eigenvalues greater than the reference eigenvalues), and the number of
factors suggested by the original Kaiser Criterion
(i.e. sample eigenvalues > 1) is printed above the output.
efa.ekc(data = NULL, sample.cov = NULL, sample.nobs = NULL,
missing = "default", ordered = NULL, plot = TRUE)
data |
A |
sample.cov |
A covariance or correlation matrix can be used, instead of
|
sample.nobs |
Number of observations (i.e. sample size) if
|
missing |
If |
ordered |
|
plot |
logical. Whether to print a scree plot comparing the sample eigenvalues with the reference eigenvalues. |
A data.frame
showing the sample and reference eigenvalues.
The number of factors suggested by the Empirical Kaiser Criterion (i.e. the sample eigenvalues greater than the reference eigenvalues) is returned as an attribute (see Examples).
The number of factors suggested by the original Kaiser Criterion (i.e.
sample eigenvalues > 1) is also printed as a header to the data.frame
Ylenio Longo (University of Nottingham; yleniolongo@gmail.com)
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
Braeken, J., & van Assen, M. A. L. M. (2017). An empirical Kaiser criterion. Psychological Methods, 22(3), 450–466. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/met0000074")}
## Simulate data with 3 factors
model <- '
f1 =~ .3*x1 + .5*x2 + .4*x3
f2 =~ .3*x4 + .5*x5 + .4*x6
f3 =~ .3*x7 + .5*x8 + .4*x9
'
dat <- simulateData(model, seed = 123)
## save summary statistics
myCovMat <- cov(dat)
myCorMat <- cor(dat)
N <- nrow(dat)
## Run the EKC function
(out <- efa.ekc(dat))
## To extract the recommended number of factors using the EKC:
attr(out, "nfactors")
## If you do not have raw data, you can use summary statistics
(x1 <- efa.ekc(sample.cov = myCovMat, sample.nobs = N, plot = FALSE))
(x2 <- efa.ekc(sample.cov = myCorMat, sample.nobs = N, plot = FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.