25.5 Esempio con semTools
Presento qui un esempio di uso di vari metodi di estrazione fattoriale. Tra tali metodi, la rotazione obliqua Geomin è molto popolare ed è il default di M-Plus.
Iniziamo a caricare il pacchetto semTools
.
Eseguiamo l’analisi fattoriale esplorativa del classico set di dati di Holzinger e Swineford (1939) il quale è costituito dai punteggi dei test di abilità mentale di bambini di seconda e terza media di due scuole diverse (Pasteur e Grant-White). Nel set di dati originale (disponibile nel pacchetto MBESS
), sono forniti i punteggi di 26 test. Tuttavia, un sottoinsieme più piccolo con 9 variabili è più ampiamente utilizzato in letteratura. Questi sono i dati qui usati.
Nel presente esempio, verrà eseguita l’analisi fattoriale esplorativa con l’estrazione di tre fattori. Il metodo di estrazione è mlr
:
maximum likelihood estimation with robust (Huber-White) standard errors and a scaled test statistic that is (asymptotically) equal to the Yuan-Bentler test statistic. For both complete and incomplete data.
La soluzione iniziale non è ruotata.
unrotated <- efaUnrotate(HolzingerSwineford1939, nf = 3, varList = paste0("x", 1:9), estimator = "mlr")
summary(unrotated)
#> lavaan 0.6.15 ended normally after 203 iterations
#>
#> Estimator ML
#> Optimization method NLMINB
#> Number of model parameters 36
#>
#> Number of observations 301
#>
#> Model Test User Model:
#> Standard Scaled
#> Test Statistic 22.897 23.864
#> Degrees of freedom 12 12
#> P-value (Chi-square) 0.029 0.021
#> Scaling correction factor 0.959
#> Yuan-Bentler correction (Mplus variant)
#>
#> Parameter Estimates:
#>
#> Standard errors Sandwich
#> Information bread Observed
#> Observed information based on Hessian
#>
#> Latent Variables:
#> Estimate Std.Err z-value P(>|z|)
#> factor1 =~
#> x1 (l1_1) 0.653 0.083 7.909 0.000
#> x2 (l2_1) 0.353 0.079 4.481 0.000
#> x3 (l3_1) 0.415 0.086 4.832 0.000
#> x4 (l4_1) 0.926 0.067 13.762 0.000
#> x5 (l5_1) 1.014 0.067 15.176 0.000
#> x6 (l6_1) 0.868 0.062 13.886 0.000
#> x7 (l7_1) 0.283 0.091 3.113 0.002
#> x8 (l8_1) 0.340 0.083 4.096 0.000
#> x9 (l9_1) 0.460 0.078 5.881 0.000
#> factor2 =~
#> x1 (l1_2) 0.349 0.124 2.814 0.005
#> x2 (l2_2) 0.242 0.159 1.523 0.128
#> x3 (l3_2) 0.497 0.132 3.767 0.000
#> x4 (l4_2) -0.337 0.067 -5.058 0.000
#> x5 (l5_2) -0.461 0.077 -6.009 0.000
#> x6 (l6_2) -0.280 0.057 -4.908 0.000
#> x7 (l7_2) 0.372 0.188 1.976 0.048
#> x8 (l8_2) 0.510 0.133 3.830 0.000
#> x9 (l9_2) 0.489 0.066 7.416 0.000
#> factor3 =~
#> x1 (l1_3) -0.338 0.103 -3.275 0.001
#> x2 (l2_3) -0.405 0.092 -4.401 0.000
#> x3 (l3_3) -0.404 0.120 -3.355 0.001
#> x4 (l4_3) 0.049 0.098 0.503 0.615
#> x5 (l5_3) 0.122 0.105 1.154 0.248
#> x6 (l6_3) -0.000 0.076 -0.003 0.998
#> x7 (l7_3) 0.609 0.125 4.863 0.000
#> x8 (l8_3) 0.409 0.143 2.853 0.004
#> x9 (l9_3) 0.112 0.123 0.915 0.360
#>
#> Covariances:
#> Estimate Std.Err z-value P(>|z|)
#> factor1 ~~
#> factor2 0.000
#> factor3 0.000
#> factor2 ~~
#> factor3 0.000
#>
#> Variances:
#> Estimate Std.Err z-value P(>|z|)
#> factor1 1.000
#> factor2 1.000
#> factor3 1.000
#> .x1 0.696 0.113 6.184 0.000
#> .x2 1.035 0.106 9.803 0.000
#> .x3 0.692 0.097 7.133 0.000
#> .x4 0.377 0.053 7.170 0.000
#> .x5 0.403 0.064 6.303 0.000
#> .x6 0.365 0.046 7.984 0.000
#> .x7 0.594 0.148 4.014 0.000
#> .x8 0.479 0.099 4.842 0.000
#> .x9 0.551 0.065 8.518 0.000
#>
#> Constraints:
#> |Slack|
#> 0-(1_2*1_1+2_2*2_1+3_2*3_1+4_2*4_1+5_2*5_ 0.000
#> 0-(1_3*1_1+2_3*2_1+3_3*3_1+4_3*4_1+5_3*5_ 0.000
#> 0-(1_3*1_2+2_3*2_2+3_3*3_2+4_3*4_2+5_3*5_ 0.000
Si noti che, in assenza di rotazione, è impossibile assegnare un significato ai fattori comuni.
25.5.1 Orthogonal varimax
Utilizziamo ora la rotazione ortogonale Varimax.
out_varimax <- orthRotate(unrotated, method = "varimax")
summary(out_varimax, sort = FALSE, suppress = 0.3)
#> Standardized Rotated Factor Loadings
#> factor1 factor2 factor3
#> x1 0.320* 0.607*
#> x2 0.481*
#> x3 0.662*
#> x4 0.838*
#> x5 0.867*
#> x6 0.815*
#> x7 0.695*
#> x8 0.704*
#> x9 0.409* 0.511*
#>
#> Factor Correlation
#> factor1 factor2 factor3
#> factor1 1 0 0
#> factor2 0 1 0
#> factor3 0 0 1
#>
#> Method of rotation: varimax
#>
#> Test Statistics for Standardized Rotated Factor Loadings
#> lhs op rhs std.loading se z p ci.lower ci.upper
#> 1 factor1 =~ x1 0.320 0.055 5.799 0.000 0.212 0.428
#> 2 factor1 =~ x2 0.135 0.063 2.151 0.031 0.012 0.259
#> 3 factor1 =~ x3 0.080 0.049 1.622 0.105 -0.017 0.176
#> 4 factor1 =~ x4 0.838 0.028 30.193 0.000 0.784 0.892
#> 5 factor1 =~ x5 0.867 0.024 36.188 0.000 0.820 0.914
#> 6 factor1 =~ x6 0.815 0.024 33.939 0.000 0.768 0.862
#> 7 factor1 =~ x7 0.102 0.049 2.059 0.040 0.005 0.199
#> 8 factor1 =~ x8 0.078 0.048 1.618 0.106 -0.016 0.172
#> 9 factor1 =~ x9 0.170 0.053 3.222 0.001 0.067 0.273
#> 10 factor2 =~ x1 0.607 0.075 8.138 0.000 0.461 0.753
#> 11 factor2 =~ x2 0.481 0.067 7.184 0.000 0.350 0.612
#> 12 factor2 =~ x3 0.662 0.058 11.499 0.000 0.549 0.775
#> 13 factor2 =~ x4 0.113 0.043 2.615 0.009 0.028 0.198
#> 14 factor2 =~ x5 0.032 0.040 0.802 0.422 -0.047 0.111
#> 15 factor2 =~ x6 0.162 0.042 3.855 0.000 0.079 0.244
#> 16 factor2 =~ x7 -0.062 0.047 -1.341 0.180 -0.154 0.029
#> 17 factor2 =~ x8 0.174 0.082 2.117 0.034 0.013 0.336
#> 18 factor2 =~ x9 0.409 0.079 5.173 0.000 0.254 0.564
#> 19 factor3 =~ x1 0.130 0.066 1.978 0.048 0.001 0.259
#> 20 factor3 =~ x2 -0.041 0.071 -0.578 0.563 -0.179 0.098
#> 21 factor3 =~ x3 0.113 0.049 2.324 0.020 0.018 0.209
#> 22 factor3 =~ x4 0.077 0.040 1.916 0.055 -0.002 0.155
#> 23 factor3 =~ x5 0.070 0.042 1.669 0.095 -0.012 0.153
#> 24 factor3 =~ x6 0.066 0.038 1.715 0.086 -0.009 0.141
#> 25 factor3 =~ x7 0.695 0.092 7.591 0.000 0.516 0.875
#> 26 factor3 =~ x8 0.704 0.083 8.520 0.000 0.542 0.865
#> 27 factor3 =~ x9 0.511 0.065 7.884 0.000 0.384 0.638
25.5.2 Orthogonal Quartimin
Un metodo alternativo per la rotazione ortogonale è Quartimin.
out_quartimin <- orthRotate(unrotated, method = "quartimin")
summary(out_quartimin, sort = FALSE, suppress = 0.3)
#> Standardized Rotated Factor Loadings
#> factor1 factor2 factor3
#> x1 0.353* 0.590*
#> x2 0.474*
#> x3 0.657*
#> x4 0.844*
#> x5 0.869*
#> x6 0.823*
#> x7 0.692*
#> x8 0.702*
#> x9 0.397* 0.508*
#>
#> Factor Correlation
#> factor1 factor2 factor3
#> factor1 1 0 0
#> factor2 0 1 0
#> factor3 0 0 1
#>
#> Method of rotation: Quartimin
#>
#> Test Statistics for Standardized Rotated Factor Loadings
#> lhs op rhs std.loading se z p ci.lower ci.upper
#> 1 factor1 =~ x1 0.353 0.062 5.720 0.000 0.232 0.473
#> 2 factor1 =~ x2 0.158 0.066 2.375 0.018 0.028 0.288
#> 3 factor1 =~ x3 0.115 0.057 2.015 0.044 0.003 0.226
#> 4 factor1 =~ x4 0.844 0.027 30.814 0.000 0.790 0.898
#> 5 factor1 =~ x5 0.869 0.023 37.224 0.000 0.823 0.914
#> 6 factor1 =~ x6 0.823 0.024 35.026 0.000 0.777 0.869
#> 7 factor1 =~ x7 0.116 0.054 2.161 0.031 0.011 0.222
#> 8 factor1 =~ x8 0.104 0.054 1.914 0.056 -0.003 0.210
#> 9 factor1 =~ x9 0.202 0.059 3.403 0.001 0.086 0.319
#> 10 factor2 =~ x1 0.590 0.078 7.523 0.000 0.436 0.743
#> 11 factor2 =~ x2 0.474 0.068 6.935 0.000 0.340 0.608
#> 12 factor2 =~ x3 0.657 0.059 11.204 0.000 0.542 0.771
#> 13 factor2 =~ x4 0.072 0.041 1.748 0.080 -0.009 0.152
#> 14 factor2 =~ x5 -0.010 0.039 -0.263 0.793 -0.087 0.066
#> 15 factor2 =~ x6 0.122 0.040 3.008 0.003 0.042 0.201
#> 16 factor2 =~ x7 -0.071 0.048 -1.465 0.143 -0.166 0.024
#> 17 factor2 =~ x8 0.167 0.090 1.849 0.064 -0.010 0.343
#> 18 factor2 =~ x9 0.397 0.087 4.581 0.000 0.227 0.567
#> 19 factor3 =~ x1 0.124 0.071 1.740 0.082 -0.016 0.264
#> 20 factor3 =~ x2 -0.042 0.074 -0.574 0.566 -0.187 0.102
#> 21 factor3 =~ x3 0.114 0.054 2.093 0.036 0.007 0.221
#> 22 factor3 =~ x4 0.056 0.037 1.503 0.133 -0.017 0.128
#> 23 factor3 =~ x5 0.048 0.038 1.263 0.206 -0.027 0.123
#> 24 factor3 =~ x6 0.046 0.034 1.347 0.178 -0.021 0.112
#> 25 factor3 =~ x7 0.692 0.093 7.477 0.000 0.511 0.874
#> 26 factor3 =~ x8 0.702 0.084 8.331 0.000 0.537 0.867
#> 27 factor3 =~ x9 0.508 0.070 7.298 0.000 0.371 0.644
25.5.3 Oblique Quartimin
L’algoritmo Quartimin può anche essere usato per una soluzione obliqua.
out_oblq <- oblqRotate(unrotated, method = "quartimin")
summary(out_oblq, sort = FALSE, suppress = 0.3)
#> Standardized Rotated Factor Loadings
#> factor1 factor2 factor3
#> x1 0.602*
#> x2 0.505*
#> x3 0.689*
#> x4 0.840*
#> x5 0.888*
#> x6 0.808*
#> x7 0.723*
#> x8 0.701*
#> x9 0.366* 0.463*
#>
#> Factor Correlation
#> factor1 factor2 factor3
#> factor1 1.0000000 0.3257784 0.2164388
#> factor2 0.3257784 1.0000000 0.2704753
#> factor3 0.2164388 0.2704753 1.0000000
#>
#> Method of rotation: Quartimin
#>
#> Test Statistics for Standardized Rotated Factor Loadings
#> lhs op rhs std.loading se z p ci.lower ci.upper
#> 1 factor1 =~ x1 0.191 0.064 2.965 0.003 0.065 0.317
#> 2 factor1 =~ x2 0.044 0.066 0.665 0.506 -0.085 0.172
#> 3 factor1 =~ x3 -0.069 0.034 -2.031 0.042 -0.137 -0.002
#> 4 factor1 =~ x4 0.840 0.033 25.622 0.000 0.776 0.905
#> 5 factor1 =~ x5 0.888 0.027 32.583 0.000 0.835 0.942
#> 6 factor1 =~ x6 0.808 0.028 28.441 0.000 0.752 0.863
#> 7 factor1 =~ x7 0.044 0.037 1.179 0.238 -0.029 0.116
#> 8 factor1 =~ x8 -0.033 0.036 -0.916 0.360 -0.103 0.037
#> 9 factor1 =~ x9 0.035 0.048 0.728 0.467 -0.059 0.129
#> 10 factor2 =~ x1 0.602 0.086 7.003 0.000 0.434 0.771
#> 11 factor2 =~ x2 0.505 0.071 7.163 0.000 0.367 0.644
#> 12 factor2 =~ x3 0.689 0.056 12.344 0.000 0.580 0.799
#> 13 factor2 =~ x4 0.022 0.045 0.483 0.629 -0.067 0.110
#> 14 factor2 =~ x5 -0.067 0.036 -1.890 0.059 -0.137 0.002
#> 15 factor2 =~ x6 0.078 0.041 1.887 0.059 -0.003 0.158
#> 16 factor2 =~ x7 -0.152 0.037 -4.058 0.000 -0.225 -0.078
#> 17 factor2 =~ x8 0.104 0.109 0.960 0.337 -0.109 0.317
#> 18 factor2 =~ x9 0.366 0.097 3.780 0.000 0.176 0.556
#> 19 factor3 =~ x1 0.031 0.062 0.500 0.617 -0.090 0.152
#> 20 factor3 =~ x2 -0.117 0.066 -1.776 0.076 -0.245 0.012
#> 21 factor3 =~ x3 0.023 0.039 0.587 0.557 -0.054 0.100
#> 22 factor3 =~ x4 0.005 0.042 0.128 0.898 -0.076 0.087
#> 23 factor3 =~ x5 0.008 0.035 0.216 0.829 -0.061 0.076
#> 24 factor3 =~ x6 -0.011 0.030 -0.362 0.717 -0.070 0.048
#> 25 factor3 =~ x7 0.723 0.087 8.328 0.000 0.553 0.893
#> 26 factor3 =~ x8 0.701 0.098 7.137 0.000 0.509 0.894
#> 27 factor3 =~ x9 0.463 0.075 6.211 0.000 0.317 0.609
25.5.4 Orthogonal Geomin
Consideriamo ora la rotazione Geomin. L’algoritmo Geomin fornisce un metodo di rotazione che riduce al minimo la media geometrica delle saturazioni fattoriali innalzate al quadrato. Qui è usato per ottenere una soluzione ortogonale.
out_geomin_orh <- orthRotate(unrotated, method = "geomin")
summary(out_geomin_orh, sort = FALSE, suppress = 0.3)
#> Standardized Rotated Factor Loadings
#> factor1 factor2 factor3
#> x1 0.315 -0.621
#> x2 -0.474*
#> x3 -0.671*
#> x4 0.838*
#> x5 0.867*
#> x6 0.814*
#> x7 0.696*
#> x8 0.677*
#> x9 0.456* -0.468
#>
#> Factor Correlation
#> factor1 factor2 factor3
#> factor1 1 0 0
#> factor2 0 1 0
#> factor3 0 0 1
#>
#> Method of rotation: Geomin
#>
#> Test Statistics for Standardized Rotated Factor Loadings
#> lhs op rhs std.loading se z p ci.lower ci.upper
#> 1 factor1 =~ x1 0.315 0.633 0.499 0.618 -0.925 1.555
#> 2 factor1 =~ x2 0.130 0.509 0.255 0.799 -0.868 1.128
#> 3 factor1 =~ x3 0.074 0.672 0.110 0.912 -1.244 1.392
#> 4 factor1 =~ x4 0.838 0.126 6.644 0.000 0.591 1.085
#> 5 factor1 =~ x5 0.867 0.047 18.395 0.000 0.775 0.960
#> 6 factor1 =~ x6 0.814 0.176 4.623 0.000 0.469 1.159
#> 7 factor1 =~ x7 0.112 0.112 0.993 0.321 -0.109 0.332
#> 8 factor1 =~ x8 0.085 0.157 0.542 0.588 -0.222 0.392
#> 9 factor1 =~ x9 0.172 0.409 0.421 0.674 -0.629 0.973
#> 10 factor2 =~ x1 0.053 0.112 0.475 0.635 -0.166 0.272
#> 11 factor2 =~ x2 -0.099 0.087 -1.142 0.254 -0.269 0.071
#> 12 factor2 =~ x3 0.033 0.069 0.482 0.630 -0.103 0.169
#> 13 factor2 =~ x4 0.051 0.136 0.374 0.708 -0.215 0.317
#> 14 factor2 =~ x5 0.054 0.158 0.340 0.734 -0.256 0.363
#> 15 factor2 =~ x6 0.035 0.133 0.260 0.795 -0.226 0.296
#> 16 factor2 =~ x7 0.696 0.089 7.863 0.000 0.523 0.870
#> 17 factor2 =~ x8 0.677 0.098 6.897 0.000 0.485 0.869
#> 18 factor2 =~ x9 0.456 0.109 4.175 0.000 0.242 0.671
#> 19 factor3 =~ x1 -0.621 0.345 -1.797 0.072 -1.298 0.056
#> 20 factor3 =~ x2 -0.474 0.151 -3.144 0.002 -0.769 -0.179
#> 21 factor3 =~ x3 -0.671 0.090 -7.499 0.000 -0.847 -0.496
#> 22 factor3 =~ x4 -0.129 0.861 -0.150 0.881 -1.816 1.558
#> 23 factor3 =~ x5 -0.048 0.905 -0.053 0.958 -1.822 1.725
#> 24 factor3 =~ x6 -0.176 0.840 -0.209 0.834 -1.823 1.471
#> 25 factor3 =~ x7 -0.021 0.170 -0.123 0.902 -0.354 0.312
#> 26 factor3 =~ x8 -0.257 0.173 -1.481 0.139 -0.597 0.083
#> 27 factor3 =~ x9 -0.468 0.263 -1.776 0.076 -0.984 0.048
25.5.5 Oblique Geomin
La rotazione Geomin può anche essere usata per ottenere una soluzione obliqua.
out_geomin_obl <- oblqRotate(unrotated, method = "geomin")
summary(out_geomin_obl, sort = FALSE, suppress = 0.3)
#> Standardized Rotated Factor Loadings
#> factor1 factor2 factor3
#> x1 -0.604*
#> x2 -0.507*
#> x3 -0.691*
#> x4 0.839*
#> x5 0.887*
#> x6 0.806*
#> x7 0.726*
#> x8 0.703*
#> x9 0.463* -0.368*
#>
#> Factor Correlation
#> factor1 factor2 factor3
#> factor1 1.0000000 0.2296197 -0.3271561
#> factor2 0.2296197 1.0000000 -0.2776935
#> factor3 -0.3271561 -0.2776935 1.0000000
#>
#> Method of rotation: Geomin
#>
#> Test Statistics for Standardized Rotated Factor Loadings
#> lhs op rhs std.loading se z p ci.lower ci.upper
#> 1 factor1 =~ x1 0.188 0.070 2.670 0.008 0.050 0.326
#> 2 factor1 =~ x2 0.044 0.054 0.806 0.420 -0.062 0.150
#> 3 factor1 =~ x3 -0.073 0.050 -1.466 0.143 -0.170 0.024
#> 4 factor1 =~ x4 0.839 0.032 26.467 0.000 0.777 0.901
#> 5 factor1 =~ x5 0.887 0.029 30.078 0.000 0.829 0.945
#> 6 factor1 =~ x6 0.806 0.030 26.717 0.000 0.747 0.865
#> 7 factor1 =~ x7 0.031 0.034 0.914 0.361 -0.036 0.099
#> 8 factor1 =~ x8 -0.045 0.048 -0.949 0.343 -0.139 0.048
#> 9 factor1 =~ x9 0.025 0.034 0.746 0.455 -0.041 0.091
#> 10 factor2 =~ x1 0.029 0.051 0.566 0.571 -0.071 0.129
#> 11 factor2 =~ x2 -0.119 0.072 -1.663 0.096 -0.260 0.021
#> 12 factor2 =~ x3 0.020 0.037 0.538 0.590 -0.052 0.092
#> 13 factor2 =~ x4 0.007 0.043 0.174 0.862 -0.076 0.091
#> 14 factor2 =~ x5 0.010 0.036 0.285 0.775 -0.060 0.080
#> 15 factor2 =~ x6 -0.009 0.030 -0.309 0.758 -0.068 0.049
#> 16 factor2 =~ x7 0.726 0.072 10.089 0.000 0.585 0.867
#> 17 factor2 =~ x8 0.703 0.118 5.966 0.000 0.472 0.934
#> 18 factor2 =~ x9 0.463 0.080 5.820 0.000 0.307 0.619
#> 19 factor3 =~ x1 -0.604 0.081 -7.442 0.000 -0.763 -0.445
#> 20 factor3 =~ x2 -0.507 0.073 -6.972 0.000 -0.649 -0.364
#> 21 factor3 =~ x3 -0.691 0.061 -11.384 0.000 -0.810 -0.572
#> 22 factor3 =~ x4 -0.024 0.034 -0.702 0.483 -0.091 0.043
#> 23 factor3 =~ x5 0.065 0.045 1.459 0.145 -0.022 0.153
#> 24 factor3 =~ x6 -0.080 0.048 -1.679 0.093 -0.173 0.013
#> 25 factor3 =~ x7 0.150 0.108 1.396 0.163 -0.061 0.361
#> 26 factor3 =~ x8 -0.106 0.165 -0.645 0.519 -0.428 0.216
#> 27 factor3 =~ x9 -0.368 0.133 -2.772 0.006 -0.628 -0.108