psych::fa()
OutputThis example demonstrates how to compute factor simplicity and
complexity indices using loadings obtained from an exploratory factor
analysis conducted via psych::fa().
psychWe use the bfi dataset available in the
psych package.
We fit an EFA model with 2 factors using oblimin rotation and unweighted least squares (ULS) estimation.
We inspect the factor loadings and convert them to a standard data frame for analysis.
unclass(fa.output$loadings)
#> ULS2 ULS1
#> A1 0.079555681 -0.405491211
#> A2 0.006995264 0.677314929
#> A3 -0.028286525 0.759520290
#> A4 0.144928248 0.438718259
#> A5 0.027450912 0.602373942
#> C1 0.570727630 -0.060692741
#> C2 0.636806118 -0.013263138
#> C3 0.541558517 0.031626045
#> C4 -0.649199647 -0.003674095
#> C5 -0.561775233 -0.057959401
fa.load <- as.data.frame(unclass(fa.output$loadings))We now use the facomplex package to compute various
measures of factor simplicity and complexity.
We define the target items for each factor to compute the total, factor-level, and item-level simplicity.
simload(data = fa.load,
items_target = list(
ULS1 = c(6,7,8,9,10),
ULS2 = c(1,2,3,4,5)
))
#> $TSFI
#> [1] 0.01
#>
#> $SFI
#> ULS1 ULS2
#> 0.005 0.016
#>
#> $IFS
#> Items IFS
#> 1 C1 -87.427
#> 2 C2 -2304.271
#> 3 C3 -292.225
#> 4 C4 -31220.651
#> 5 C5 -92.946
#> 6 A1 -24.979
#> 7 A2 -9374.038
#> 8 A3 -719.974
#> 9 A4 -8.164
#> 10 A5 -480.525This example shows how to apply facomplex to factor
solutions derived from classical exploratory methods, making it an
accessible tool for researchers working with psych::fa()
and other traditional EFA approaches.