This vignette provides an overview for the functionalities of the EFAtools package. The general aim of the package is to provide flexible implementations of different algorithms for an exploratory factor analyses (EFA) procedure, including factor retention methods, factor extraction and rotation methods, as well as the computation of a Schmid-Leiman solution and McDonaldβs omega coefficients.
The package was first designed to enable a comparison of EFA (specifically, principal axis factoring with subsequent promax rotation) performed in R using the psych package and EFA performed in SPSS. That is why some functions allow the specification of a type, including"psych"
and "SPSS"
, such that the respective procedure will be executed to match the output of these implementations (which do not always lead to the same results). This vignette will go through a complete example, that is, we will first show how to determine the number of factors to retain, then perform different factor extraction methods, run a Schmid-Leiman transformation and compute omegas.
The package can be installed from CRAN using install.packages("EFAtools")
, or from GitHub using devtools::install_github("mdsteiner/EFAtools")
, and then loaded using:
In this vignette, we will use the DOSPERT_raw
dataset, which contains responses to the Domain Specific Risk Taking Scale (DOSPERT) of 3123 participants. The dataset is contained in the EFAtools
package, for details, see ?DOSPERT_raw
. Note that this vignette is to provide a general overview and it is beyond its scope to explain all methods and functions in detail. If you want to learn more on the details and methods, please see the respective help functions for explanations and literature references. However, the dataset is rather large, so, just to save time when building the vignette, we will only use the first 250 observations. When you normally do your analyses, you use the full dataset.
The first step in an EFA procedure is to test whether your data is suitable for factor analysis. To this end, the EFAtools
package provides the BARTLETT()
and the KMO()
functions. The Bartlettβs test of sphericity tests whether a correlation matrix is significantly different from an identity matrix (a correlation matrix with zero correlations between all variables). This test should thus be significant. The Kaiser-Meyer-Olkin criterion (KMO) represents the degree to which each observed variable is predicted by the other variables in the dataset and thus is another indicator for how correlated the different variables are.
We can test whether our DOSPERT_sub
dataset is suitable for factor analysis as follows.
# Bartlett's test of sphericity
BARTLETT(DOSPERT_sub)
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> β The Bartlett's test of sphericity was significant at an alpha level of .05.
#> These data are probably suitable for factor analysis.
#>
#> πΒ²(435) = 3042.73, p = 0
# KMO criterion
KMO(DOSPERT_sub)
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> ββ Kaiser-Meyer-Olkin criterion (KMO) βββββββββββββββ
#>
#> β The overall KMO value for your data is meritorious.
#> These data are probably suitable for factor analysis.
#>
#> Overall: 0.836
#>
#> For each variable:
#> ethR_1 ethR_2 ethR_3 ethR_4 ethR_5 ethR_6 finR_1 finR_2 finR_3 finR_4 finR_5
#> 0.862 0.882 0.858 0.723 0.891 0.826 0.830 0.797 0.817 0.820 0.829
#> finR_6 heaR_1 heaR_2 heaR_3 heaR_4 heaR_5 heaR_6 recR_1 recR_2 recR_3 recR_4
#> 0.840 0.858 0.874 0.841 0.822 0.838 0.906 0.894 0.868 0.882 0.853
#> recR_5 recR_6 socR_1 socR_2 socR_3 socR_4 socR_5 socR_6
#> 0.841 0.896 0.733 0.762 0.651 0.721 0.827 0.740
Note that these tests can also be run in the N_FACTORS()
function.
As the goal of EFA is to determine the underlying factors from a set of multiple variables, one of the most important decisions is how many factors can or should be extracted. There exists a plethora of factor retention methods to use for this decision. The problem is that there is no method that consistently outperforms all other methods. Rather, which factor retention method to use depends on the structure of the data: are there few or many indicators, are factors strong or weak, are the factor intercorrelations weak or strong. For rules on which methods to use, see, for example, Auerswald and Moshagen, (2019).
There are multiple factor retention methods implemented in the EFAtools
package. They can either be called with separate functions, or all (or a selection) of them using the N_FACTORS()
function.
Letβs first look at how to determine the number of factors to retain by calling separate functions. For example, if you would like to perform a parallel analysis based on squared multiple correlations (SMC; sometimes also called a parallel analysis with principal factors), you can do the following:
# determine the number of factors to retain using parallel analysis
PARALLEL(DOSPERT_sub, eigen_type = "SMC")
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#> Parallel Analysis performed using 1000 simulated random data sets
#> Eigenvalues were found using SMC
#>
#> Decision rule used: means
#>
#> ββ Number of factors to retain according to βββββββββ
#>
#> β SMC-determined eigenvalues: 11
Generating the plot can also be suppressed if the output is printed explicitly:
# determine the number of factors to retain using parallel analysis
print(PARALLEL(DOSPERT_sub, eigen_type = "SMC"), plot = FALSE)
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#> Parallel Analysis performed using 1000 simulated random data sets
#> Eigenvalues were found using SMC
#>
#> Decision rule used: means
#>
#> ββ Number of factors to retain according to βββββββββ
#>
#> β SMC-determined eigenvalues: 11
Other factor retention methods can be used accordingly. For example, to use the empirical Kaiser criterion, use the EKC
function:
# determine the number of factors to retain using parallel analysis
print(EKC(DOSPERT_sub), plot = FALSE)
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> Empirical Kaiser criterion suggests 4 factors.
The following factor retention methods are currently implemented: comparison data (CD()
), empirical Kaiser criterion (EKC()
), the hull method (HULL()
), the Kaiser-Guttman criterion (KGC()
), parallel analysis (PARALLEL()
), and sequential model tests (SMT()
). Many of these functions have multiple versions of the respective factor retention method implemented, for example, the parallel analysis can be done based on eigenvalues found using unity (principal components) or SMCs, or on an EFA procedure. Another example is the hull method, which can be used with different fitting methods (principal axis factoring [PAF], maximum likelihood [ML], or unweighted least squares [ULS]), and different goodness of fit indices. Please see the respective function documentations for details.
N_FACTORS()
If you want to use multiple factor retention methods, for example, to compare whether different methods suggest the same number of factors, it is easier to use the N_FACTORS()
function. This is a wrapper around all the implemented factor retention methods. Moreover, it also enables to run the Bartlettβs test of sphericity and compute the KMO criterion.
For example, to test the suitability of the data for factor analysis and to determine the number of factors to retain based on parallel analysis (but only using eigen values based on SMCs and PCA), the EKC, and the sequential model test, we can run the following code:
N_FACTORS(DOSPERT_sub, criteria = c("PARALLEL", "EKC", "SMT"),
eigen_type_KGC_PA = c("SMC", "PCA"))
#>
#> ββ Tests for the suitability of the data for factor a
#>
#> Bartlett's test of sphericity
#>
#> β The Bartlett's test of sphericity was significant at an alpha level of .05.
#> These data are probably suitable for factor analysis.
#>
#> πΒ²(435) = 3042.73, p = 0
#>
#> Kaiser-Meyer-Olkin criterion (KMO)
#>
#> β The overall KMO value for your data is meritorious with 0.836.
#> These data are probably suitable for factor analysis.
#>
#> ββ Number of factors suggested by the different facto
#>
#> β Empirical Kaiser criterion: 4
#> β Parallel analysis with PCA: 4
#> β Parallel analysis with SMC: 11
#> β Sequential πΒ² model tests: 14
#> β Lower bound of RMSEA 90% confidence interval: 6
#> β Akaike Information Criterion: 12
If all possible factor retention methods should be used, it is sufficient to provide the data object (note that this takes a while, as the comparison data is computationally expensive and therefore relatively slow method, especially if larger datasets are used). We additionally specify the method argument to use unweighted least squares (ULS) estimation. This is a bit faster than using principle axis factoring (PAF) and it enables the computation of more goodness of fit indices:
N_FACTORS(DOSPERT_sub, method = "ULS")
#>
#> ββ Tests for the suitability of the data for factor a
#>
#> Bartlett's test of sphericity
#>
#> β The Bartlett's test of sphericity was significant at an alpha level of .05.
#> These data are probably suitable for factor analysis.
#>
#> πΒ²(435) = 3042.73, p = 0
#>
#> Kaiser-Meyer-Olkin criterion (KMO)
#>
#> β The overall KMO value for your data is meritorious with 0.836.
#> These data are probably suitable for factor analysis.
#>
#> ββ Number of factors suggested by the different facto
#>
#> β Comparison data: 5
#> β Empirical Kaiser criterion: 4
#> β Hull method with CAF: 4
#> β Hull method with CFI: 4
#> β Hull method with RMSEA: 4
#> β Kaiser-Guttman criterion with PCA: 8
#> β Kaiser-Guttman criterion with SMC: 4
#> β Kaiser-Guttman criterion with EFA: 4
#> β Parallel analysis with PCA: 4
#> β Parallel analysis with SMC: 11
#> β Parallel analysis with EFA: 5
#> β Sequential πΒ² model tests: 14
#> β Lower bound of RMSEA 90% confidence interval: 6
#> β Akaike Information Criterion: 12
Now, this is not the scenario one is happy about, but it still does happen: There is no obvious convergence between the methods and thus the choice of the number of factors to retain becomes rather difficult (and to some extend arbitrary). We will proceed with 6 factors, as it is what is typically used with DOSPERT data, but this does not mean that other number of factors are not just as plausible.
Note that all factor retention methods, except comparison data (CD), can also be used with correlation matrices. We use method = "ULS"
and eigen_type_KGC_PA = c("SMC", "PCA")
to skip the slower criteria. In this case, the sample size has to be specified:
N_FACTORS(test_models$baseline$cormat, N = 500,
method = "ULS", eigen_type_KGC_PA = c("SMC", "PCA"))
#> Warning in N_FACTORS(test_models$baseline$cormat, N = 500, method = "ULS", : ! 'x' was a correlation matrix but CD needs raw data. Skipping CD.
#>
#> ββ Tests for the suitability of the data for factor a
#>
#> Bartlett's test of sphericity
#>
#> β The Bartlett's test of sphericity was significant at an alpha level of .05.
#> These data are probably suitable for factor analysis.
#>
#> πΒ²(153) = 2173.28, p = 0
#>
#> Kaiser-Meyer-Olkin criterion (KMO)
#>
#> β The overall KMO value for your data is marvellous with 0.916.
#> These data are probably suitable for factor analysis.
#>
#> ββ Number of factors suggested by the different facto
#>
#> β Comparison data: NA
#> β Empirical Kaiser criterion: 2
#> β Hull method with CAF: 3
#> β Hull method with CFI: 3
#> β Hull method with RMSEA: 3
#> β Kaiser-Guttman criterion with PCA: 3
#> β Kaiser-Guttman criterion with SMC: 1
#> β Parallel analysis with PCA: 3
#> β Parallel analysis with SMC: 3
#> β Sequential πΒ² model tests: 3
#> β Lower bound of RMSEA 90% confidence interval: 2
#> β Akaike Information Criterion: 3
Multiple algorithms to perform an EFA and to rotate the found solutions are implemented in the EFAtools
package. All of them can be used using the EFA()
function. To perform the EFA, you can use one of principal axis factoring (PAF), maximum likelihood estimation (ML), and unweighted least squares (ULS; also sometimes referred to as MINRES). To rotate the solutions, the EFAtools
package offers varimax and promax rotations, as well as the orthogonal and oblique rotations provided by the GPArotation
package (i.e., the GPArotation
functions are called in the EFA()
function in this case).
You can run an EFA with PAF and no rotation like this:
EFA(DOSPERT_sub, n_factors = 6)
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> EFA performed with type = 'EFAtools', method = 'PAF', and rotation = 'none'.
#>
#> ββ Unrotated Loadings βββββββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> ethR_1 .528 -.177 .011 .243 .106 .035
#> ethR_2 .468 -.142 .073 .328 -.086 .065
#> ethR_3 .450 -.461 .202 .070 .014 .066
#> ethR_4 .255 -.197 .235 .349 .080 .192
#> ethR_5 .465 -.247 .242 -.051 -.004 .062
#> ethR_6 .416 -.392 .171 .217 -.051 .103
#> finR_1 .602 -.349 -.488 .016 -.168 -.085
#> finR_2 .327 .320 -.300 -.111 .238 .265
#> finR_3 .603 -.262 -.487 .048 -.210 -.081
#> finR_4 .568 -.083 -.263 -.049 .392 .133
#> finR_5 .639 -.372 -.480 .043 -.140 -.116
#> finR_6 .555 .185 -.253 -.079 .390 .100
#> heaR_1 .432 -.093 .040 .164 -.106 .072
#> heaR_2 .451 .074 .186 .222 -.130 .132
#> heaR_3 .475 -.063 .264 .079 .215 -.252
#> heaR_4 .533 -.126 .339 -.030 .100 -.174
#> heaR_5 .342 -.009 .113 .222 .122 -.012
#> heaR_6 .497 .008 .126 -.037 .187 -.083
#> recR_1 .461 .328 -.045 -.161 .057 -.067
#> recR_2 .614 -.016 .145 -.262 .028 -.303
#> recR_3 .618 .157 .081 -.319 -.010 -.152
#> recR_4 .674 .225 .195 -.304 -.291 .251
#> recR_5 .659 .145 .159 -.357 -.255 .187
#> recR_6 .684 .188 .101 -.261 -.004 .066
#> socR_1 .187 .486 -.044 .249 -.158 -.058
#> socR_2 .441 .415 -.008 .281 -.096 -.138
#> socR_3 .082 .567 -.166 .152 -.060 .017
#> socR_4 .248 .453 .070 .189 -.057 -.199
#> socR_5 .328 .274 -.024 .213 .042 .031
#> socR_6 .234 .462 -.037 .315 .007 .032
#>
#> ββ Variances Accounted for ββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> SS loadings 7.079 2.485 1.507 1.331 0.812 0.595
#> Prop Tot Var 0.236 0.083 0.050 0.044 0.027 0.020
#> Cum Prop Tot Var 0.236 0.319 0.369 0.413 0.440 0.460
#> Prop Comm Var 0.513 0.180 0.109 0.096 0.059 0.043
#> Cum Prop Comm Var 0.513 0.693 0.802 0.898 0.957 1.000
#>
#> ββ Model Fit ββββββββββββββββββββββββββββββββββββββββ
#>
#> CAF: .49
#> df: 270
To rotate the loadings (e.g., using a promax rotation) adapt the rotation
argument:
EFA(DOSPERT_sub, n_factors = 6, rotation = "promax")
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> EFA performed with type = 'EFAtools', method = 'PAF', and rotation = 'promax'.
#>
#> ββ Rotated Loadings βββββββββββββββββββββββββββββββββ
#>
#> F4 F2 F3 F1 F6 F5
#> ethR_1 .449 .066 .133 -.096 .090 .157
#> ethR_2 .516 .183 .149 .008 -.037 -.060
#> ethR_3 .537 -.274 .075 .082 .132 -.021
#> ethR_4 .646 .008 -.166 -.055 -.108 .063
#> ethR_5 .377 -.190 -.032 .234 .182 -.008
#> ethR_6 .603 -.120 .100 .049 -.003 -.069
#> finR_1 .067 -.022 .829 -.004 -.010 .048
#> finR_2 -.104 .071 -.025 .160 -.202 .638
#> finR_3 .052 .075 .819 .025 -.041 .015
#> finR_4 .145 -.152 .127 -.081 .080 .676
#> finR_5 .094 -.014 .839 -.055 .043 .054
#> finR_6 -.015 .036 .030 -.027 .120 .689
#> heaR_1 .353 .110 .147 .127 -.031 -.036
#> heaR_2 .430 .248 -.043 .229 -.059 -.068
#> heaR_3 .227 .081 -.093 -.172 .589 .020
#> heaR_4 .274 -.030 -.100 .060 .538 -.060
#> heaR_5 .323 .151 -.054 -.112 .143 .094
#> heaR_6 .148 .019 -.059 .020 .374 .181
#> recR_1 -.173 .219 .019 .208 .250 .188
#> recR_2 -.087 -.003 .124 .165 .658 -.061
#> recR_3 -.149 .051 .070 .350 .464 .049
#> recR_4 .126 .048 -.054 .873 -.038 -.020
#> recR_5 .067 -.034 .006 .809 .044 -.012
#> recR_6 .034 .038 -.031 .486 .236 .184
#> socR_1 -.042 .632 .036 .040 -.047 -.110
#> socR_2 .067 .647 .097 -.011 .145 -.079
#> socR_3 -.194 .565 -.005 .039 -.144 .089
#> socR_4 -.072 .586 -.036 -.040 .233 -.126
#> socR_5 .140 .375 -.017 -.010 -.001 .135
#> socR_6 .091 .580 -.072 -.046 -.081 .099
#>
#> ββ Factor Intercorrelations βββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> F1 1.000 0.122 0.394 0.273 0.461 0.240
#> F2 0.122 1.000 0.058 0.336 0.194 0.391
#> F3 0.394 0.058 1.000 0.345 0.363 0.404
#> F4 0.273 0.336 0.345 1.000 0.533 0.433
#> F5 0.461 0.194 0.363 0.533 1.000 0.423
#> F6 0.240 0.391 0.404 0.433 0.423 1.000
#>
#> ββ Variances Accounted for ββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> SS loadings 7.079 2.485 1.507 1.331 0.812 0.595
#> Prop Tot Var 0.236 0.083 0.050 0.044 0.027 0.020
#> Cum Prop Tot Var 0.236 0.319 0.369 0.413 0.440 0.460
#> Prop Comm Var 0.513 0.180 0.109 0.096 0.059 0.043
#> Cum Prop Comm Var 0.513 0.693 0.802 0.898 0.957 1.000
#>
#> ββ Model Fit ββββββββββββββββββββββββββββββββββββββββ
#>
#> CAF: .49
#> df: 270
This now performed PAF with promax rotation with the specification, on average, we found to produce the most accurate results in a simulation analysis (see function documentation). If you want to replicate the implementation of the psych R package, you can set the type
argument to "psych"
:
EFA(DOSPERT_sub, n_factors = 6, rotation = "promax", type = "psych")
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> EFA performed with type = 'psych', method = 'PAF', and rotation = 'promax'.
#>
#> ββ Rotated Loadings βββββββββββββββββββββββββββββββββ
#>
#> F4 F2 F3 F1 F6 F5
#> ethR_1 .447 .065 .127 -.105 .076 .166
#> ethR_2 .524 .188 .145 .019 -.061 -.064
#> ethR_3 .544 -.278 .069 .083 .125 -.020
#> ethR_4 .665 .009 -.176 -.043 -.139 .071
#> ethR_5 .378 -.199 -.040 .237 .176 -.008
#> ethR_6 .614 -.118 .095 .058 -.018 -.073
#> finR_1 .048 -.019 .840 -.012 -.007 .041
#> finR_2 -.110 .049 -.033 .168 -.257 .677
#> finR_3 .035 .079 .825 .020 -.039 .007
#> finR_4 .135 -.174 .116 -.103 .044 .723
#> finR_5 .073 -.009 .855 -.070 .049 .047
#> finR_6 -.034 .016 .019 -.053 .091 .730
#> heaR_1 .352 .114 .146 .134 -.042 -.045
#> heaR_2 .433 .250 -.048 .246 -.081 -.079
#> heaR_3 .203 .082 -.100 -.225 .634 .018
#> heaR_4 .257 -.034 -.108 .026 .569 -.065
#> heaR_5 .317 .153 -.059 -.128 .143 .098
#> heaR_6 .130 .012 -.066 -.009 .386 .188
#> recR_1 -.201 .211 .016 .188 .260 .189
#> recR_2 -.132 -.005 .125 .112 .727 -.081
#> recR_3 -.186 .042 .069 .320 .500 .037
#> recR_4 .120 .031 -.060 .920 -.071 -.039
#> recR_5 .054 -.048 .003 .827 .032 -.027
#> recR_6 .012 .023 -.038 .482 .230 .183
#> socR_1 -.053 .644 .038 .045 -.050 -.126
#> socR_2 .049 .654 .094 -.020 .148 -.090
#> socR_3 -.205 .570 -.003 .043 -.157 .086
#> socR_4 -.090 .590 -.038 -.055 .249 -.136
#> socR_5 .131 .378 -.019 -.016 -.012 .136
#> socR_6 .083 .586 -.074 -.046 -.097 .097
#>
#> ββ Factor Intercorrelations βββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> F1 1.000 0.150 0.425 0.305 0.523 0.294
#> F2 0.150 1.000 0.080 0.375 0.247 0.439
#> F3 0.425 0.080 1.000 0.371 0.400 0.441
#> F4 0.305 0.375 0.371 1.000 0.613 0.505
#> F5 0.523 0.247 0.400 0.613 1.000 0.510
#> F6 0.294 0.439 0.441 0.505 0.510 1.000
#>
#> ββ Variances Accounted for ββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> SS loadings 7.080 2.484 1.508 1.331 0.815 0.598
#> Prop Tot Var 0.236 0.083 0.050 0.044 0.027 0.020
#> Cum Prop Tot Var 0.236 0.319 0.369 0.413 0.441 0.460
#> Prop Comm Var 0.512 0.180 0.109 0.096 0.059 0.043
#> Cum Prop Comm Var 0.512 0.692 0.801 0.898 0.957 1.000
#>
#> ββ Model Fit ββββββββββββββββββββββββββββββββββββββββ
#>
#> CAF: .49
#> df: 270
If you want to use the SPSS implementation, you can set the type
argument to "SPSS"
:
EFA(DOSPERT_sub, n_factors = 6, rotation = "promax", type = "SPSS")
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> EFA performed with type = 'SPSS', method = 'PAF', and rotation = 'promax'.
#>
#> ββ Rotated Loadings βββββββββββββββββββββββββββββββββ
#>
#> F4 F1 F3 F2 F6 F5
#> ethR_1 .429 -.099 .141 .071 .120 .144
#> ethR_2 .509 .009 .162 .187 -.025 -.062
#> ethR_3 .488 .088 .079 -.269 .151 -.035
#> ethR_4 .652 -.063 -.172 .024 -.066 .063
#> ethR_5 .337 .253 -.037 -.193 .184 -.015
#> ethR_6 .570 .049 .109 -.111 .017 -.078
#> finR_1 .006 -.008 .881 -.033 -.046 .028
#> finR_2 -.075 .174 -.031 .065 -.236 .656
#> finR_3 .001 .023 .866 .062 -.079 .000
#> finR_4 .129 -.078 .123 -.154 .085 .670
#> finR_5 .029 -.061 .897 -.024 .014 .029
#> finR_6 -.015 -.020 .021 .030 .124 .685
#> heaR_1 .336 .130 .161 .111 -.028 -.041
#> heaR_2 .433 .240 -.039 .249 -.056 -.063
#> heaR_3 .186 -.174 -.106 .079 .662 -.012
#> heaR_4 .225 .074 -.112 -.036 .578 -.083
#> heaR_5 .317 -.118 -.057 .156 .186 .082
#> heaR_6 .119 .031 -.068 .014 .402 .163
#> recR_1 -.184 .227 .016 .204 .239 .182
#> recR_2 -.164 .180 .126 -.020 .686 -.099
#> recR_3 -.200 .378 .069 .031 .453 .030
#> recR_4 .107 .938 -.054 .028 -.120 -.004
#> recR_5 .032 .850 .009 -.052 -.020 -.001
#> recR_6 .004 .523 -.037 .022 .206 .182
#> socR_1 -.004 .042 .045 .626 -.051 -.101
#> socR_2 .087 -.005 .104 .634 .156 -.078
#> socR_3 -.143 .039 -.001 .558 -.157 .103
#> socR_4 -.049 -.033 -.039 .570 .248 -.124
#> socR_5 .160 -.012 -.014 .375 .016 .134
#> socR_6 .136 -.050 -.070 .579 -.063 .106
#>
#> ββ Factor Intercorrelations βββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> F1 1.000 0.307 0.456 0.030 0.495 0.218
#> F2 0.307 1.000 0.407 0.324 0.604 0.442
#> F3 0.456 0.407 1.000 0.050 0.469 0.448
#> F4 0.030 0.324 0.050 1.000 0.173 0.363
#> F5 0.495 0.604 0.469 0.173 1.000 0.467
#> F6 0.218 0.442 0.448 0.363 0.467 1.000
#>
#> ββ Variances Accounted for ββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> SS loadings 7.080 2.484 1.508 1.331 0.815 0.598
#> Prop Tot Var 0.236 0.083 0.050 0.044 0.027 0.020
#> Cum Prop Tot Var 0.236 0.319 0.369 0.413 0.441 0.461
#> Prop Comm Var 0.512 0.180 0.109 0.096 0.059 0.043
#> Cum Prop Comm Var 0.512 0.692 0.801 0.898 0.957 1.000
#>
#> ββ Model Fit ββββββββββββββββββββββββββββββββββββββββ
#>
#> CAF: .49
#> df: 270
This enables comparisons of different implementations. The COMPARE()
function provides an easy way to compare how similar two loading (pattern) matrices are:
COMPARE(
EFA(DOSPERT_sub, n_factors = 6, rotation = "promax", type = "psych")$rot_loadings,
EFA(DOSPERT_sub, n_factors = 6, rotation = "promax", type = "SPSS")$rot_loadings
)
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#> Mean [min, max] absolute difference: 0.0186 [ 0.0000, 0.0738]
#> Median absolute difference: 0.0146
#> Max decimals where all numbers are equal: 0
#> Minimum number of decimals provided: 17
#>
#> F4 F2 F3 F1 F6 F5
#> ethR_1 0.0175 -0.0050 -0.0136 -0.0063 -0.0443 0.0215
#> ethR_2 0.0149 0.0016 -0.0174 0.0103 -0.0355 -0.0019
#> ethR_3 0.0561 -0.0092 -0.0101 -0.0058 -0.0256 0.0145
#> ethR_4 0.0135 -0.0150 -0.0039 0.0200 -0.0738 0.0074
#> ethR_5 0.0411 -0.0062 -0.0034 -0.0169 -0.0087 0.0065
#> ethR_6 0.0435 -0.0065 -0.0142 0.0094 -0.0354 0.0051
#> finR_1 0.0426 0.0142 -0.0411 -0.0049 0.0388 0.0138
#> finR_2 -0.0351 -0.0158 -0.0017 -0.0057 -0.0201 0.0208
#> finR_3 0.0336 0.0169 -0.0409 -0.0025 0.0401 0.0071
#> finR_4 0.0058 -0.0199 -0.0077 -0.0245 -0.0405 0.0523
#> finR_5 0.0446 0.0146 -0.0418 -0.0086 0.0346 0.0182
#> finR_6 -0.0189 -0.0148 -0.0019 -0.0328 -0.0326 0.0454
#> heaR_1 0.0160 0.0023 -0.0151 0.0041 -0.0138 -0.0041
#> heaR_2 0.0006 0.0016 -0.0091 0.0068 -0.0256 -0.0154
#> heaR_3 0.0171 0.0030 0.0054 -0.0503 -0.0274 0.0307
#> heaR_4 0.0319 0.0022 0.0041 -0.0473 -0.0095 0.0181
#> heaR_5 0.0002 -0.0031 -0.0027 -0.0099 -0.0435 0.0154
#> heaR_6 0.0106 -0.0025 0.0024 -0.0401 -0.0161 0.0251
#> recR_1 -0.0172 0.0071 0.0002 -0.0391 0.0208 0.0068
#> recR_2 0.0324 0.0145 -0.0010 -0.0684 0.0411 0.0182
#> recR_3 0.0147 0.0111 -0.0005 -0.0583 0.0464 0.0070
#> recR_4 0.0132 0.0036 -0.0058 -0.0180 0.0485 -0.0345
#> recR_5 0.0220 0.0036 -0.0064 -0.0227 0.0523 -0.0257
#> recR_6 0.0083 0.0008 -0.0013 -0.0406 0.0242 0.0018
#> socR_1 -0.0495 0.0185 -0.0063 0.0024 0.0001 -0.0244
#> socR_2 -0.0378 0.0199 -0.0093 -0.0149 -0.0072 -0.0117
#> socR_3 -0.0619 0.0117 -0.0024 0.0042 -0.0005 -0.0171
#> socR_4 -0.0408 0.0195 0.0007 -0.0216 0.0000 -0.0116
#> socR_5 -0.0292 0.0031 -0.0049 -0.0040 -0.0282 0.0014
#> socR_6 -0.0531 0.0070 -0.0032 0.0042 -0.0336 -0.0086
Why would you want to do this? One of us has had the experience that a reviewer asked whether the results can be reproduced in another statistical program than R. We therefore implemented this possibility in the package for an easy application of large scale, systematic comparisons.
Note that the type
argument of the EFA()
function only affects the implementations of principal axis factoring (PAF), varimax and promax rotations. The other procedures are not affected (except the order of the rotated factors for the other rotation methods).
As indicated previously, it is also possible to use different estimation and rotation methods. For example, to perform an EFA with ULS and an oblimin rotation, you can use the following code:
EFA(DOSPERT_sub, n_factors = 6, rotation = "oblimin", method = "ULS")
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> EFA performed with type = 'EFAtools', method = 'ULS', and rotation = 'oblimin'.
#>
#> ββ Rotated Loadings βββββββββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> ethR_1 .221 -.046 .048 .371 .151 .152
#> ethR_2 .223 .042 .157 .444 .024 -.044
#> ethR_3 .164 .126 -.281 .423 .186 -.023
#> ethR_4 -.086 -.026 -.010 .587 .013 .045
#> ethR_5 .038 .280 -.192 .288 .204 .008
#> ethR_6 .185 .080 -.136 .500 .073 -.070
#> finR_1 .878 -.011 -.035 -.024 -.042 .052
#> finR_2 -.009 .147 .082 -.058 -.180 .607
#> finR_3 .857 .015 .058 -.028 -.073 .029
#> finR_4 .203 -.043 -.148 .110 .117 .634
#> finR_5 .902 -.053 -.029 -.006 .012 .058
#> finR_6 .088 .013 .043 -.019 .137 .659
#> heaR_1 .205 .143 .097 .288 .010 -.022
#> heaR_2 .016 .253 .231 .379 -.004 -.040
#> heaR_3 -.014 -.066 .071 .140 .590 .043
#> heaR_4 -.021 .156 -.036 .175 .526 -.024
#> heaR_5 .010 -.061 .137 .275 .194 .095
#> heaR_6 .007 .093 .018 .089 .371 .193
#> recR_1 .039 .245 .224 -.181 .200 .218
#> recR_2 .178 .247 .004 -.187 .582 -.014
#> recR_3 .107 .407 .063 -.210 .384 .098
#> recR_4 -.023 .884 .059 .082 -.072 .036
#> recR_5 .040 .804 -.017 .011 .008 .043
#> recR_6 .019 .529 .049 -.016 .201 .220
#> socR_1 .029 .050 .611 -.010 -.058 -.065
#> socR_2 .123 .038 .616 .060 .131 -.023
#> socR_3 -.031 .027 .554 -.126 -.154 .112
#> socR_4 -.032 .012 .560 -.059 .196 -.068
#> socR_5 .019 .015 .361 .137 .031 .146
#> socR_6 -.054 -.028 .559 .121 -.046 .118
#>
#> ββ Factor Intercorrelations βββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> F1 1.000 -0.365 -0.027 -0.332 0.338 -0.331
#> F2 -0.365 1.000 0.244 0.180 -0.431 0.314
#> F3 -0.027 0.244 1.000 0.059 -0.096 0.305
#> F4 -0.332 0.180 0.059 1.000 -0.363 0.088
#> F5 0.338 -0.431 -0.096 -0.363 1.000 -0.246
#> F6 -0.331 0.314 0.305 0.088 -0.246 1.000
#>
#> ββ Variances Accounted for ββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> SS loadings 7.080 2.484 1.508 1.331 0.815 0.598
#> Prop Tot Var 0.236 0.083 0.050 0.044 0.027 0.020
#> Cum Prop Tot Var 0.236 0.319 0.369 0.413 0.441 0.461
#> Prop Comm Var 0.512 0.180 0.109 0.096 0.059 0.043
#> Cum Prop Comm Var 0.512 0.692 0.801 0.898 0.957 1.000
#>
#> ββ Model Fit ββββββββββββββββββββββββββββββββββββββββ
#>
#> πΒ²: 142.39
#> df: 270
#> CFI: 1.00
#> RMSEA 90% CI: .00 [.00, .00]
#> AIC: -397.61
#> BIC: -1348.41
#> CAF: .49
Of course, COMPARE()
can also be used to compare results from different estimation or rotation methods (in fact, to compare any two matrices), not just from different implementations:
COMPARE(
EFA(DOSPERT_sub, n_factors = 6, rotation = "promax")$rot_loadings,
EFA(DOSPERT_sub, n_factors = 6, rotation = "oblimin", method = "ULS")$rot_loadings,
x_labels = c("PAF and promax", "ULS and oblimin")
)
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#>
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
#> Mean [min, max] absolute difference: 0.0376 [ 0.0006, 0.1204]
#> Median absolute difference: 0.0321
#> Max decimals where all numbers are equal: 0
#> Minimum number of decimals provided: 17
#>
#> F4 F2 F3 F1 F6 F5
#> ethR_1 0.0784 0.0181 -0.0878 -0.0503 -0.0612 0.0057
#> ethR_2 0.0720 0.0268 -0.0739 -0.0341 -0.0615 -0.0157
#> ethR_3 0.1141 0.0074 -0.0886 -0.0439 -0.0538 0.0022
#> ethR_4 0.0593 0.0177 -0.0796 -0.0297 -0.1204 0.0172
#> ethR_5 0.0889 0.0011 -0.0697 -0.0456 -0.0217 -0.0158
#> ethR_6 0.1031 0.0156 -0.0856 -0.0309 -0.0757 0.0008
#> finR_1 0.0908 0.0128 -0.0493 0.0075 0.0317 -0.0043
#> finR_2 -0.0460 -0.0116 -0.0156 0.0135 -0.0216 0.0304
#> finR_3 0.0792 0.0167 -0.0374 0.0098 0.0323 -0.0143
#> finR_4 0.0351 -0.0040 -0.0762 -0.0379 -0.0375 0.0424
#> finR_5 0.1003 0.0147 -0.0625 -0.0020 0.0315 -0.0036
#> finR_6 0.0044 -0.0068 -0.0577 -0.0407 -0.0169 0.0296
#> heaR_1 0.0650 0.0134 -0.0580 -0.0165 -0.0411 -0.0137
#> heaR_2 0.0510 0.0172 -0.0591 -0.0245 -0.0554 -0.0280
#> heaR_3 0.0871 0.0094 -0.0793 -0.1060 -0.0008 -0.0230
#> heaR_4 0.0991 0.0053 -0.0784 -0.0968 0.0122 -0.0362
#> heaR_5 0.0482 0.0141 -0.0639 -0.0508 -0.0512 -0.0009
#> heaR_6 0.0596 0.0006 -0.0656 -0.0731 0.0028 -0.0118
#> recR_1 0.0080 -0.0052 -0.0200 -0.0372 0.0497 -0.0301
#> recR_2 0.0999 -0.0071 -0.0544 -0.0825 0.0769 -0.0478
#> recR_3 0.0611 -0.0119 -0.0371 -0.0568 0.0792 -0.0484
#> recR_4 0.0447 -0.0109 -0.0308 -0.0113 0.0336 -0.0556
#> recR_5 0.0560 -0.0174 -0.0339 0.0052 0.0359 -0.0543
#> recR_6 0.0496 -0.0110 -0.0501 -0.0421 0.0348 -0.0360
#> socR_1 -0.0324 0.0211 0.0072 -0.0094 0.0108 -0.0447
#> socR_2 0.0070 0.0309 -0.0264 -0.0489 0.0148 -0.0561
#> socR_3 -0.0682 0.0112 0.0256 0.0121 0.0104 -0.0231
#> socR_4 -0.0132 0.0261 -0.0041 -0.0512 0.0371 -0.0582
#> socR_5 0.0026 0.0142 -0.0353 -0.0257 -0.0318 -0.0112
#> socR_6 -0.0303 0.0208 -0.0174 -0.0184 -0.0351 -0.0186
To improve performance of the iterative procedures (currently the parallel analysis, and the PAF, ML, and ULS methods) we implemented some of them in C++. For example, the following code compares the EFAtools parallel analysis with the corresponding one implemented in the psych package (the default of PARALLEL()
is to use 1000 datasets, but 25 is enough to show the difference):
microbenchmark::microbenchmark(
PARALLEL(DOSPERT_sub, eigen_type = "SMC", n_datasets = 25),
psych::fa.parallel(DOSPERT_sub, SMC = TRUE, plot = FALSE, n.iter = 25)
)
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 6 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 7 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 8 and the number of components = 4
#> Unit: milliseconds
#> expr
#> PARALLEL(DOSPERT_sub, eigen_type = "SMC", n_datasets = 25)
#> psych::fa.parallel(DOSPERT_sub, SMC = TRUE, plot = FALSE, n.iter = 25)
#> min lq mean median uq max neval cld
#> 19.3059 22.39218 24.09963 24.01505 24.68622 34.77841 100 a
#> 147.0720 158.77953 168.13459 164.23592 172.92319 457.40670 100 b
Moreover, the following code compares the PAF implementation (of type βpsychβ) of the EFAtools package with the one from the psych package:
microbenchmark::microbenchmark(
EFA(DOSPERT_raw, 6),
psych::fa(DOSPERT_raw, 6, rotate = "none", fm = "pa")
)
#> Unit: milliseconds
#> expr min lq
#> EFA(DOSPERT_raw, 6) 11.46451 11.85662
#> psych::fa(DOSPERT_raw, 6, rotate = "none", fm = "pa") 29.97873 31.85430
#> mean median uq max neval cld
#> 12.37416 12.04608 12.28165 20.55892 100 a
#> 34.17890 34.40464 35.81019 44.91571 100 b
While these differences are not large, they grow larger the more iterations the procedures need, which is usually the case if solutions are more tricky to find. Especially for simulations this might come in handy. For example, in one simulation analysis we ran over 10,000,000 EFAs, thus a difference of about 25 milliseconds per EFA leads to a difference in runtime of almost three days.
For the Schmid-Leiman transformation and computation of omegas, we will use PAF and promax rotation:
efa_dospert <- EFA(DOSPERT_sub, n_factors = 6, rotation = "promax")
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
efa_dospert
#>
#> EFA performed with type = 'EFAtools', method = 'PAF', and rotation = 'promax'.
#>
#> ββ Rotated Loadings βββββββββββββββββββββββββββββββββ
#>
#> F4 F2 F3 F1 F6 F5
#> ethR_1 .449 .066 .133 -.096 .090 .157
#> ethR_2 .516 .183 .149 .008 -.037 -.060
#> ethR_3 .537 -.274 .075 .082 .132 -.021
#> ethR_4 .646 .008 -.166 -.055 -.108 .063
#> ethR_5 .377 -.190 -.032 .234 .182 -.008
#> ethR_6 .603 -.120 .100 .049 -.003 -.069
#> finR_1 .067 -.022 .829 -.004 -.010 .048
#> finR_2 -.104 .071 -.025 .160 -.202 .638
#> finR_3 .052 .075 .819 .025 -.041 .015
#> finR_4 .145 -.152 .127 -.081 .080 .676
#> finR_5 .094 -.014 .839 -.055 .043 .054
#> finR_6 -.015 .036 .030 -.027 .120 .689
#> heaR_1 .353 .110 .147 .127 -.031 -.036
#> heaR_2 .430 .248 -.043 .229 -.059 -.068
#> heaR_3 .227 .081 -.093 -.172 .589 .020
#> heaR_4 .274 -.030 -.100 .060 .538 -.060
#> heaR_5 .323 .151 -.054 -.112 .143 .094
#> heaR_6 .148 .019 -.059 .020 .374 .181
#> recR_1 -.173 .219 .019 .208 .250 .188
#> recR_2 -.087 -.003 .124 .165 .658 -.061
#> recR_3 -.149 .051 .070 .350 .464 .049
#> recR_4 .126 .048 -.054 .873 -.038 -.020
#> recR_5 .067 -.034 .006 .809 .044 -.012
#> recR_6 .034 .038 -.031 .486 .236 .184
#> socR_1 -.042 .632 .036 .040 -.047 -.110
#> socR_2 .067 .647 .097 -.011 .145 -.079
#> socR_3 -.194 .565 -.005 .039 -.144 .089
#> socR_4 -.072 .586 -.036 -.040 .233 -.126
#> socR_5 .140 .375 -.017 -.010 -.001 .135
#> socR_6 .091 .580 -.072 -.046 -.081 .099
#>
#> ββ Factor Intercorrelations βββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> F1 1.000 0.122 0.394 0.273 0.461 0.240
#> F2 0.122 1.000 0.058 0.336 0.194 0.391
#> F3 0.394 0.058 1.000 0.345 0.363 0.404
#> F4 0.273 0.336 0.345 1.000 0.533 0.433
#> F5 0.461 0.194 0.363 0.533 1.000 0.423
#> F6 0.240 0.391 0.404 0.433 0.423 1.000
#>
#> ββ Variances Accounted for ββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> SS loadings 7.079 2.485 1.507 1.331 0.812 0.595
#> Prop Tot Var 0.236 0.083 0.050 0.044 0.027 0.020
#> Cum Prop Tot Var 0.236 0.319 0.369 0.413 0.440 0.460
#> Prop Comm Var 0.513 0.180 0.109 0.096 0.059 0.043
#> Cum Prop Comm Var 0.513 0.693 0.802 0.898 0.957 1.000
#>
#> ββ Model Fit ββββββββββββββββββββββββββββββββββββββββ
#>
#> CAF: .49
#> df: 270
The indicator names in the output (i.e., the rownames of the rotated loadings section) tell us which domain (out of ethical, financial, health, recreational, and social risks) an indicator stems from. From the pattern coefficients it can be seen that these theoretical domains are recovered relatively well in the six factor solution, that is, usually, the indicators from the same domain load onto the same factor. When we take a look at the factor intercorrelations, we can see that there are some strong and some weak correlations. It might be worthwhile to explore whether a general factor can be obtained, and which factors load more strongly on it. To this end, we will use a Schmid-Leiman (SL) transformation.
The SL transformation or orthogonalization transforms an oblique solution into a hierarchical, orthogonalized solution. To do this, the EFAtools
package provides the SL()
function.
sl_dospert <- SL(efa_dospert)
sl_dospert
#>
#> EFA for second-order loadings performed with type = 'EFAtools' and method = 'PAF'
#>
#> ββ Schmid-Leiman Solution βββββββββββββββββββββββββββ
#>
#> g F1 F2 F3 F4 F5 F6 h2 u2
#> ethR_1 .427 -.070 .062 .112 .387 .120 .062 .371 .629
#> ethR_2 .350 .006 .171 .125 .444 -.046 -.026 .367 .633
#> ethR_3 .353 .060 -.255 .063 .462 -.016 .091 .420 .580
#> ethR_4 .166 -.040 .008 -.139 .556 .048 -.074 .366 .634
#> ethR_5 .392 .171 -.177 -.026 .324 -.006 .126 .336 .664
#> ethR_6 .304 .036 -.112 .083 .519 -.053 -.002 .386 .614
#> finR_1 .499 -.003 -.021 .695 .057 .037 -.007 .736 .264
#> finR_2 .335 .117 .066 -.021 -.090 .487 -.139 .395 .605
#> finR_3 .497 .018 .070 .687 .044 .012 -.028 .727 .273
#> finR_4 .526 -.059 -.141 .106 .125 .516 .055 .597 .403
#> finR_5 .529 -.040 -.013 .704 .081 .041 .030 .786 .214
#> finR_6 .535 -.020 .034 .025 -.013 .526 .083 .572 .428
#> heaR_1 .341 .093 .103 .123 .304 -.028 -.021 .244 .756
#> heaR_2 .355 .167 .231 -.036 .370 -.052 -.041 .350 .650
#> heaR_3 .416 -.125 .075 -.078 .196 .015 .407 .405 .595
#> heaR_4 .465 .043 -.028 -.084 .236 -.046 .371 .422 .578
#> heaR_5 .277 -.082 .141 -.045 .278 .072 .099 .198 .802
#> heaR_6 .451 .015 .017 -.049 .128 .138 .258 .308 .692
#> recR_1 .447 .152 .204 .016 -.149 .144 .173 .337 .663
#> recR_2 .572 .120 -.003 .104 -.075 -.047 .454 .567 .433
#> recR_3 .588 .255 .047 .059 -.128 .038 .320 .537 .463
#> recR_4 .610 .637 .045 -.045 .109 -.015 -.026 .794 .206
#> recR_5 .602 .590 -.032 .005 .057 -.009 .031 .716 .284
#> recR_6 .636 .355 .036 -.026 .029 .141 .163 .580 .420
#> socR_1 .151 .029 .589 .030 -.037 -.084 -.032 .381 .619
#> socR_2 .369 -.008 .603 .081 .057 -.060 .100 .523 .477
#> socR_3 .084 .028 .526 -.005 -.167 .068 -.099 .327 .673
#> socR_4 .218 -.029 .546 -.030 -.062 -.096 .161 .386 .614
#> socR_5 .278 -.008 .350 -.014 .121 .103 -.001 .225 .775
#> socR_6 .192 -.034 .540 -.060 .078 .076 -.056 .348 .652
#>
#>
#> ββ Variances Accounted for ββββββββββββββββββββββββββ
#>
#> g F1 F2 F3 F4 F5 F6
#> SS loadings 5.407 1.107 2.011 1.584 1.814 0.920 0.864
#> Prop Tot Var 0.180 0.037 0.067 0.053 0.060 0.031 0.029
#> Cum Prop Tot Var 0.180 0.217 0.284 0.337 0.397 0.428 0.457
#> Prop Comm Var 0.394 0.081 0.147 0.116 0.132 0.067 0.063
#> Cum Prop Comm Var 0.394 0.475 0.622 0.738 0.870 0.937 1.000
From the output, it can be seen that all, except the social domain indicators substantially load on the general factor. That is, the other domains covary substantially.
Finally, we can compute omega reliability estimates based on the SL solution. To this end, we can either specify the variable-to-factor correspondences, or let them be determined automatically (in which case the highest factor loading will be taken, which might lead to a different solution than what is desired, in the presence of cross-loadings). Given that no cross-loadings are present here, it is easiest to let the function automatically determine the variable-to-factor correspondence. To this end, we will set the type
argument to "psych"
.
OMEGA(sl_dospert, type = "psych")
#> Omega total, omega hierarchical, and omega subscale for the general factor (top row) and the group factors:
#>
#> tot hier sub
#> g 0.923 0.677 0.175
#> F1 0.850 0.491 0.359
#> F2 0.748 0.158 0.590
#> F3 0.882 0.307 0.574
#> F4 0.771 0.307 0.464
#> F5 0.742 0.337 0.404
#> F6 0.751 0.492 0.259
If we wanted to specify the variable to factor correspondences explicitly, we could do it in the following way:
OMEGA(sl_dospert, factor_corres = c(rep(3, 6), 1, 5, 1, 5, 1, 5, 3, 3,
rep(6, 4), rep(4, 6), rep(2, 6)))
#> Omega total, omega hierarchical, and omega subscale for the general factor (top row) and the group factors:
#>
#> tot hier sub
#> g 0.923 0.677 0.065
#> F1 0.307 0.307 0.000
#> F2 0.747 0.107 0.640
#> F3 0.301 0.297 0.004
#> F4 0.577 0.575 0.001
#> F5 0.742 0.337 0.404
#> F6 0.519 0.347 0.172