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; see separate vignette **Replicate_SPSS_psych** for a demonstration of the replication of original 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 < .001
# 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()`

), scree test (`SCREE()`

), 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_other = c("SMC", "PCA"))
#>
π β― β― Running EKC
β π β― Running PARALLEL
β β π Running SMT
β β β Done!
#>
#> ββ Tests for the suitability of the data for factor analys
#>
#> 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 < .001
#>
#> 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 factor ret
#>
#> β 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")
#>
π β― β― β― β― β― β― Running CD
β π β― β― β― β― β― Running EKC
β β π β― β― β― β― Running HULL
β β β π β― β― β― Running KGC
β β β β π β― β― Running PARALLEL
β β β β β π β― Running SCREE
β β β β β β π Running SMT
β β β β β β β Done!
#>
#> ββ Tests for the suitability of the data for factor analys
#>
#> 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 < .001
#>
#> 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 factor ret
#>
#> β Comparison data: 4
#> β 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_other = 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_other = 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.
#>
β π β― β― β― β― β― Running EKC
β β π β― β― β― β― Running HULL
β β β π β― β― β― Running KGC
β β β β π β― β― Running PARALLEL
β β β β β π β― Running SCREE
β β β β β β π Running SMT
β β β β β β β Done!
#>
#> ββ Tests for the suitability of the data for factor analys
#>
#> 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 < .001
#>
#> 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 factor ret
#>
#> β 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 .010 .242 .105 .035
#> ethR_2 .468 -.142 .073 .329 -.086 .068
#> ethR_3 .450 -.461 .202 .070 .015 .068
#> ethR_4 .255 -.197 .235 .350 .081 .189
#> ethR_5 .465 -.247 .242 -.050 -.004 .066
#> ethR_6 .416 -.391 .170 .217 -.051 .102
#> finR_1 .602 -.349 -.488 .015 -.169 -.085
#> finR_2 .327 .321 -.301 -.111 .238 .267
#> finR_3 .602 -.261 -.483 .046 -.208 -.081
#> finR_4 .569 -.083 -.264 -.049 .393 .137
#> finR_5 .640 -.374 -.483 .042 -.142 -.118
#> finR_6 .555 .185 -.254 -.079 .390 .101
#> heaR_1 .432 -.093 .040 .164 -.106 .068
#> heaR_2 .451 .074 .185 .223 -.130 .129
#> heaR_3 .475 -.063 .264 .080 .216 -.254
#> heaR_4 .532 -.126 .338 -.029 .101 -.170
#> heaR_5 .342 -.009 .113 .222 .121 -.015
#> heaR_6 .497 .008 .126 -.036 .186 -.082
#> recR_1 .461 .328 -.045 -.160 .056 -.067
#> recR_2 .615 -.016 .147 -.264 .030 -.310
#> recR_3 .618 .157 .082 -.319 -.010 -.154
#> recR_4 .675 .227 .198 -.306 -.295 .255
#> recR_5 .658 .145 .159 -.353 -.251 .184
#> recR_6 .684 .189 .101 -.260 -.004 .066
#> socR_1 .187 .487 -.044 .250 -.159 -.059
#> socR_2 .440 .414 -.008 .281 -.095 -.134
#> socR_3 .082 .567 -.166 .153 -.060 .014
#> socR_4 .247 .450 .069 .188 -.056 -.192
#> socR_5 .328 .273 -.025 .214 .041 .026
#> socR_6 .234 .461 -.037 .315 .007 .027
#>
#> ββ 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
```

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 ββββββββββββββββββββββββββββββββββββββ
#>
#> F3 F1 F2 F4 F6 F5
#> ethR_1 .141 -.099 .070 .428 .121 .144
#> ethR_2 .162 .008 .187 .508 -.023 -.062
#> ethR_3 .079 .088 -.269 .487 .152 -.035
#> ethR_4 -.172 -.064 .024 .652 -.064 .064
#> ethR_5 -.036 .254 -.193 .336 .185 -.015
#> ethR_6 .110 .048 -.112 .570 .018 -.078
#> finR_1 .881 -.007 -.033 .006 -.047 .028
#> finR_2 -.031 .174 .065 -.074 -.237 .656
#> finR_3 .866 .023 .062 .001 -.080 .000
#> finR_4 .124 -.078 -.154 .128 .086 .670
#> finR_5 .897 -.061 -.024 .029 .014 .029
#> finR_6 .021 -.019 .030 -.016 .124 .684
#> heaR_1 .161 .130 .111 .336 -.028 -.041
#> heaR_2 -.039 .239 .248 .433 -.055 -.063
#> heaR_3 -.106 -.172 .079 .185 .661 -.012
#> heaR_4 -.112 .076 -.036 .223 .578 -.084
#> heaR_5 -.057 -.117 .156 .317 .187 .083
#> heaR_6 -.068 .032 .014 .118 .402 .162
#> recR_1 .016 .229 .204 -.184 .237 .182
#> recR_2 .126 .185 -.020 -.164 .681 -.098
#> recR_3 .069 .382 .031 -.200 .450 .031
#> recR_4 -.054 .938 .028 .107 -.121 -.004
#> recR_5 .009 .853 -.052 .032 -.024 -.001
#> recR_6 -.037 .525 .022 .004 .204 .181
#> socR_1 .045 .042 .626 -.004 -.050 -.101
#> socR_2 .104 -.005 .635 .087 .156 -.079
#> socR_3 -.001 .039 .558 -.142 -.157 .103
#> socR_4 -.039 -.033 .571 -.050 .248 -.125
#> socR_5 -.014 -.012 .375 .160 .016 .134
#> socR_6 -.070 -.051 .579 .137 -.063 .106
#>
#> ββ Factor Intercorrelations ββββββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> F1 1.000 0.408 0.050 0.456 0.470 0.448
#> F2 0.408 1.000 0.324 0.308 0.603 0.442
#> F3 0.050 0.324 1.000 0.030 0.171 0.363
#> F4 0.456 0.308 0.030 1.000 0.494 0.217
#> F5 0.470 0.603 0.171 0.494 1.000 0.465
#> F6 0.448 0.442 0.363 0.217 0.465 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
```

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 ββββββββββββββββββββββββββββββββββββββ
#>
#> F1 F4 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 .896 -.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 βββββββββββββββββββββββββββββββββββββββββββββ
#>
#> πΒ²(270) = 142.39, p =1.000
#> 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.0328 [ 0.0003, 0.1062]
#> Median absolute difference: 0.0287
#> Max decimals where all numbers are equal: 0
#> Minimum number of decimals provided: 17
#>
#> F3 F1 F2 F4 F6 F5
#> ethR_1 -0.0800 -0.0537 0.0223 0.0578 -0.0302 -0.0074
#> ethR_2 -0.0608 -0.0342 0.0300 0.0644 -0.0476 -0.0181
#> ethR_3 -0.0848 -0.0373 0.0123 0.0642 -0.0346 -0.0119
#> ethR_4 -0.0858 -0.0384 0.0331 0.0654 -0.0767 0.0185
#> ethR_5 -0.0745 -0.0259 -0.0010 0.0485 -0.0194 -0.0229
#> ethR_6 -0.0756 -0.0315 0.0240 0.0695 -0.0544 -0.0082
#> finR_1 0.0030 0.0042 0.0025 0.0299 -0.0054 -0.0247
#> finR_2 -0.0224 0.0271 -0.0174 -0.0160 -0.0569 0.0488
#> finR_3 0.0096 0.0080 0.0041 0.0287 -0.0072 -0.0291
#> finR_4 -0.0792 -0.0343 -0.0061 0.0186 -0.0319 0.0363
#> finR_5 -0.0051 -0.0081 0.0052 0.0345 0.0020 -0.0287
#> finR_6 -0.0663 -0.0323 -0.0125 0.0038 -0.0127 0.0252
#> heaR_1 -0.0434 -0.0134 0.0143 0.0476 -0.0380 -0.0185
#> heaR_2 -0.0550 -0.0139 0.0177 0.0539 -0.0514 -0.0230
#> heaR_3 -0.0921 -0.1062 0.0080 0.0445 0.0711 -0.0553
#> heaR_4 -0.0910 -0.0806 -0.0003 0.0486 0.0524 -0.0599
#> heaR_5 -0.0667 -0.0560 0.0188 0.0424 -0.0077 -0.0123
#> heaR_6 -0.0752 -0.0610 -0.0040 0.0297 0.0312 -0.0301
#> recR_1 -0.0229 -0.0162 -0.0203 -0.0023 0.0368 -0.0360
#> recR_2 -0.0525 -0.0623 -0.0241 0.0226 0.0997 -0.0844
#> recR_3 -0.0380 -0.0253 -0.0316 0.0093 0.0652 -0.0671
#> recR_4 -0.0313 0.0532 -0.0310 0.0254 -0.0498 -0.0404
#> recR_5 -0.0308 0.0491 -0.0351 0.0217 -0.0321 -0.0437
#> recR_6 -0.0554 -0.0036 -0.0271 0.0199 0.0032 -0.0390
#> socR_1 0.0161 -0.0077 0.0145 0.0064 0.0074 -0.0365
#> socR_2 -0.0192 -0.0432 0.0182 0.0270 0.0254 -0.0557
#> socR_3 0.0299 0.0122 0.0043 -0.0166 -0.0028 -0.0090
#> socR_4 -0.0069 -0.0441 0.0103 0.0095 0.0520 -0.0568
#> socR_5 -0.0327 -0.0268 0.0135 0.0225 -0.0148 -0.0114
#> socR_6 -0.0161 -0.0229 0.0200 0.0154 -0.0169 -0.0115
```

Finally, if you are interested in factor scores from the EFA solution, these can be obtained with `FACTOR_SCORES()`

, a wrapper for `psych::factor.scores()`

to be used directly with an output from `EFA()`

:

```
EFA_mod <- EFA(DOSPERT_sub, n_factors = 6, rotation = "promax")
#> βΉ 'x' was not a correlation matrix. Correlations are found from entered raw data.
fac_scores <- FACTOR_SCORES(DOSPERT_sub, f = EFA_mod)
```

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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 8 and the number of components = 4
#> Parallel analysis suggests that the number of factors = 9 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
#> 20.27715 21.36491 23.17253 22.64953 23.87495 44.96305 100 a
#> 140.06746 149.18150 159.97544 155.41487 164.71419 218.66477 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.66520 12.01466
#> psych::fa(DOSPERT_raw, 6, rotate = "none", fm = "pa") 29.97657 31.37060
#> mean median uq max neval cld
#> 12.33037 12.19222 12.35153 15.52374 100 a
#> 33.88602 34.18302 35.73385 40.97280 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 ββββββββββββββββββββββββββββββββββββββ
#>
#> F3 F1 F2 F4 F6 F5
#> ethR_1 .141 -.099 .070 .428 .121 .144
#> ethR_2 .162 .008 .187 .508 -.023 -.062
#> ethR_3 .079 .088 -.269 .487 .152 -.035
#> ethR_4 -.172 -.064 .024 .652 -.064 .064
#> ethR_5 -.036 .254 -.193 .336 .185 -.015
#> ethR_6 .110 .048 -.112 .570 .018 -.078
#> finR_1 .881 -.007 -.033 .006 -.047 .028
#> finR_2 -.031 .174 .065 -.074 -.237 .656
#> finR_3 .866 .023 .062 .001 -.080 .000
#> finR_4 .124 -.078 -.154 .128 .086 .670
#> finR_5 .897 -.061 -.024 .029 .014 .029
#> finR_6 .021 -.019 .030 -.016 .124 .684
#> heaR_1 .161 .130 .111 .336 -.028 -.041
#> heaR_2 -.039 .239 .248 .433 -.055 -.063
#> heaR_3 -.106 -.172 .079 .185 .661 -.012
#> heaR_4 -.112 .076 -.036 .223 .578 -.084
#> heaR_5 -.057 -.117 .156 .317 .187 .083
#> heaR_6 -.068 .032 .014 .118 .402 .162
#> recR_1 .016 .229 .204 -.184 .237 .182
#> recR_2 .126 .185 -.020 -.164 .681 -.098
#> recR_3 .069 .382 .031 -.200 .450 .031
#> recR_4 -.054 .938 .028 .107 -.121 -.004
#> recR_5 .009 .853 -.052 .032 -.024 -.001
#> recR_6 -.037 .525 .022 .004 .204 .181
#> socR_1 .045 .042 .626 -.004 -.050 -.101
#> socR_2 .104 -.005 .635 .087 .156 -.079
#> socR_3 -.001 .039 .558 -.142 -.157 .103
#> socR_4 -.039 -.033 .571 -.050 .248 -.125
#> socR_5 -.014 -.012 .375 .160 .016 .134
#> socR_6 -.070 -.051 .579 .137 -.063 .106
#>
#> ββ Factor Intercorrelations ββββββββββββββββββββββββββββββ
#>
#> F1 F2 F3 F4 F5 F6
#> F1 1.000 0.408 0.050 0.456 0.470 0.448
#> F2 0.408 1.000 0.324 0.308 0.603 0.442
#> F3 0.050 0.324 1.000 0.030 0.171 0.363
#> F4 0.456 0.308 0.030 1.000 0.494 0.217
#> F5 0.470 0.603 0.171 0.494 1.000 0.465
#> F6 0.448 0.442 0.363 0.217 0.465 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
```

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 .448 -.070 .067 .109 .367 .113 .073 .374 .626
#> ethR_2 .368 .005 .179 .126 .435 -.049 -.014 .375 .625
#> ethR_3 .387 .062 -.257 .061 .417 -.027 .091 .406 .594
#> ethR_4 .179 -.045 .023 -.133 .558 .050 -.038 .367 .633
#> ethR_5 .414 .178 -.184 -.028 .288 -.012 .111 .333 .667
#> ethR_6 .332 .034 -.107 .085 .487 -.061 .011 .371 .629
#> finR_1 .526 -.005 -.031 .682 .005 .022 -.028 .744 .256
#> finR_2 .305 .122 .062 -.024 -.064 .512 -.142 .398 .602
#> finR_3 .519 .016 .059 .670 .001 .000 -.048 .725 .275
#> finR_4 .532 -.054 -.147 .096 .110 .523 .051 .605 .395
#> finR_5 .561 -.043 -.023 .694 .024 .023 .008 .800 .200
#> finR_6 .528 -.013 .029 .016 -.013 .534 .074 .571 .429
#> heaR_1 .353 .091 .106 .125 .287 -.032 -.017 .244 .756
#> heaR_2 .358 .168 .238 -.030 .370 -.049 -.033 .355 .645
#> heaR_3 .451 -.121 .076 -.082 .158 -.010 .396 .412 .588
#> heaR_4 .499 .053 -.035 -.087 .191 -.065 .347 .421 .579
#> heaR_5 .291 -.082 .149 -.044 .271 .064 .112 .206 .794
#> heaR_6 .469 .023 .014 -.053 .101 .127 .241 .307 .693
#> recR_1 .441 .161 .195 .012 -.157 .142 .142 .324 .676
#> recR_2 .605 .130 -.019 .097 -.140 -.076 .408 .585 .415
#> recR_3 .600 .268 .030 .054 -.171 .024 .270 .538 .462
#> recR_4 .597 .658 .027 -.042 .091 -.003 -.073 .806 .194
#> recR_5 .595 .599 -.050 .007 .028 -.001 -.014 .716 .284
#> recR_6 .636 .369 .021 -.028 .003 .142 .122 .576 .424
#> socR_1 .135 .030 .599 .035 -.003 -.079 -.030 .386 .614
#> socR_2 .367 -.004 .607 .080 .074 -.061 .093 .528 .472
#> socR_3 .054 .027 .534 -.001 -.122 .080 -.094 .319 .681
#> socR_4 .213 -.023 .546 -.030 -.042 -.097 .149 .378 .622
#> socR_5 .272 -.008 .359 -.011 .137 .105 .010 .232 .768
#> socR_6 .175 -.035 .554 -.055 .117 .083 -.038 .364 .636
#>
#>
#> ββ Variances Accounted for βββββββββββββββββββββββββββββββ
#>
#> g F1 F2 F3 F4 F5 F6
#> SS loadings 5.665 1.170 2.066 1.526 1.648 0.962 0.730
#> Prop Tot Var 0.189 0.039 0.069 0.051 0.055 0.032 0.024
#> Cum Prop Tot Var 0.189 0.228 0.297 0.348 0.402 0.435 0.459
#> Prop Comm Var 0.411 0.085 0.150 0.111 0.120 0.070 0.053
#> Cum Prop Comm Var 0.411 0.497 0.647 0.757 0.877 0.947 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.705 0.169
#> F1 0.859 0.480 0.380
#> F2 0.746 0.144 0.603
#> F3 0.894 0.341 0.553
#> F4 0.765 0.342 0.423
#> F5 0.748 0.322 0.426
#> F6 0.763 0.544 0.218
```

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.705 0.067
#> F1 0.341 0.341 0.000
#> F2 0.753 0.095 0.658
#> F3 0.336 0.332 0.004
#> F4 0.587 0.582 0.006
#> F5 0.748 0.322 0.426
#> F6 0.551 0.390 0.160
```