View source: R/extractor.feature.FF.R
extractor.feature.FF | R Documentation |
This function will extract 181 features from the data according to the method by Goretzko & Buhner (2020).
extractor.feature.FF(
response,
cor.type = "pearson",
use = "pairwise.complete.obs"
)
response |
A required |
cor.type |
A character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman". @seealso cor. |
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. |
The code for the extractor.feature.FF
function is implemented based on the publicly available code by Goretzko & Buhner (2020) (https://osf.io/mvrau/).
The extracted features are completely consistent with the 181 features described in the original text by Goretzko & Buhner (2020).
These features include:
1.
- Number of examinees
2.
- Number of items
3.
- Number of eigenvalues greater than 1
4.
- Proportion of variance explained by the 1st eigenvalue
5.
- Proportion of variance explained by the 2nd eigenvalue
6.
- Proportion of variance explained by the 3rd eigenvalue
7.
- Number of eigenvalues greater than 0.7
8.
- Standard deviation of the eigenvalues
9.
- Number of eigenvalues accounting for 50
10.
- Number of eigenvalues accounting for 75
11.
- L1-norm of the correlation matrix
12.
- Frobenius-norm of the correlation matrix
13.
- Maximum-norm of the correlation matrix
14.
- Average of the off-diagonal correlations
15.
- Spectral-norm of the correlation matrix
16.
- Number of correlations smaller or equal to 0.1
17.
- Average of the initial communality estimates
18.
- Determinant of the correlation matrix
19.
- Measure of sampling adequacy (MSA after Kaiser, 1970)
20.
- Gini coefficient (Gini, 1921) of the correlation matrix
21.
- Kolm measure of inequality (Kolm, 1999) of the correlation matrix
22-101.
- Eigenvalues from Principal Component Analysis (PCA), padded with -1000 if insufficient
102-181.
- Eigenvalues from Factor Analysis (FA), fixed at 1 factor, padded with -1000 if insufficient
A matrix (1×181) containing all the 181 features (Goretzko & Buhner, 2020).
Goretzko, D., & Buhner, M. (2020). One model to rule them all? Using machine learning algorithms to determine the number of factors in exploratory factor analysis. Psychol Methods, 25(6), 776-786. https://doi.org/10.1037/met0000262.
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 extractor.feature.FF function with default parameters.
features <- extractor.feature.FF(response)
print(features)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.