説明
stats::factanal()は探索的因子分析を実行する関数である。対象となるデータは分散共分散行列あるいはデータ行列である。推定法は最尤推定法である。
stats::factanal()の強み
追加パッケージをインストールすることなくR本体だけで因子分析を実行できること。
stats::factanal()の弱み
機能的にものたらない。特に推定法が”最尤法”しかないこと、回転法が”なし”か”varimax”しかない点が弱い。例えばpsych::fa()は推定法、回転法ともにはるかに多くのオプションを実行可能である。特別な理由がない限り最初からpsych::fa()を使用した方がいいだろう。
使用法
factanal(x, factors = 1, data = NULL, covmat = NULL, n.obs = NA, subset, na.action, start = NULL, scores = c(“none”, “regression”, “Bartlett”), rotation = “varimax”, control = NULL, …)
通常はfactanal(データセット、factors=因子数)でOK。
返り値
factanalクラスのオブジェクトである。
実行例
とあるデータセット(27の項目からなる心理尺度に7つの因子数を想定して)探索的因子分析を実行する。
> fa(df2[,DAI_ITEMS],nfactors = 7) Factor Analysis using method = minres Call: fa(r = df2[, DAI_ITEMS], nfactors = 7) Standardized loadings (pattern matrix) based upon correlation matrix MR2 MR1 MR5 MR7 MR4 MR3 MR6 h2 u2 com Q3_2 -0.03 0.01 0.89 0.00 0.00 -0.01 0.01 0.77 0.226 1.0 Q3_3 0.03 -0.02 0.81 0.02 -0.04 0.04 -0.01 0.68 0.323 1.0 Q3_4 0.02 0.02 0.89 -0.01 0.03 0.00 0.01 0.81 0.193 1.0 Q3_5 0.02 -0.02 0.82 -0.01 0.02 0.00 0.00 0.67 0.331 1.0 Q3_8 0.92 -0.01 0.03 -0.09 -0.01 0.00 -0.02 0.78 0.222 1.0 Q3_9 0.89 0.00 0.01 0.00 0.00 0.00 0.04 0.81 0.194 1.0 Q3_10 0.86 0.00 -0.01 0.07 0.00 0.00 -0.02 0.79 0.212 1.0 Q3_11 0.79 0.03 -0.03 0.10 0.02 0.00 0.04 0.73 0.267 1.0 Q3_13 0.02 0.93 -0.01 -0.05 0.00 -0.01 0.00 0.85 0.153 1.0 Q3_14 0.00 0.97 -0.01 -0.02 0.00 -0.03 0.00 0.92 0.079 1.0 Q3_15 0.01 0.85 -0.04 0.04 0.00 0.04 -0.01 0.74 0.260 1.0 Q3_16 -0.05 0.68 0.14 0.11 0.02 0.04 0.05 0.59 0.406 1.2 Q3_17 0.08 0.04 -0.02 0.71 -0.03 -0.01 -0.10 0.58 0.419 1.1 Q3_18 -0.04 0.04 0.02 0.86 -0.01 -0.02 -0.02 0.72 0.278 1.0 Q3_19 -0.03 -0.02 -0.02 0.85 0.02 0.01 0.07 0.70 0.300 1.0 Q3_20 0.09 -0.04 0.00 0.80 0.00 0.02 0.00 0.72 0.281 1.0 Q3_21 -0.01 0.00 -0.03 -0.02 0.88 0.01 -0.03 0.76 0.243 1.0 Q3_22 0.00 0.00 -0.01 -0.01 0.90 -0.02 0.02 0.80 0.195 1.0 Q3_23 0.01 0.01 0.02 0.03 0.82 0.03 0.01 0.68 0.319 1.0 Q3_24 0.07 -0.10 0.16 -0.01 0.48 -0.03 -0.01 0.28 0.722 1.4 Q3_25 0.02 -0.01 0.07 0.02 0.00 -0.03 0.80 0.67 0.329 1.0 Q3_26 0.02 0.02 -0.06 -0.04 -0.01 -0.01 0.88 0.76 0.242 1.0 Q3_27 0.04 -0.01 0.01 0.01 -0.01 0.02 0.69 0.49 0.511 1.0 Q3_28 -0.10 0.03 0.01 0.06 0.06 0.09 0.57 0.37 0.633 1.2 Q3_29 0.01 0.00 -0.02 -0.01 0.01 0.94 0.00 0.87 0.130 1.0 Q3_30 0.00 0.00 -0.03 -0.01 -0.01 0.97 -0.01 0.91 0.088 1.0 Q3_31 -0.02 0.04 0.21 0.04 0.01 0.63 0.04 0.58 0.420 1.2 MR2 MR1 MR5 MR7 MR4 MR3 MR6 SS loadings 3.11 3.05 3.07 2.74 2.49 2.31 2.27 Proportion Var 0.12 0.11 0.11 0.10 0.09 0.09 0.08 Cumulative Var 0.12 0.23 0.34 0.44 0.54 0.62 0.70 Proportion Explained 0.16 0.16 0.16 0.14 0.13 0.12 0.12 Cumulative Proportion 0.16 0.32 0.48 0.63 0.76 0.88 1.00 With factor correlations of MR2 MR1 MR5 MR7 MR4 MR3 MR6 MR2 1.00 -0.02 0.16 0.52 -0.04 0.02 0.23 MR1 -0.02 1.00 0.13 0.20 0.03 0.25 0.24 MR5 0.16 0.13 1.00 0.13 0.14 0.35 0.20 MR7 0.52 0.20 0.13 1.00 -0.01 0.14 0.01 MR4 -0.04 0.03 0.14 -0.01 1.00 0.10 0.18 MR3 0.02 0.25 0.35 0.14 0.10 1.00 0.20 MR6 0.23 0.24 0.20 0.01 0.18 0.20 1.00 Mean item complexity = 1 Test of the hypothesis that 7 factors are sufficient. The degrees of freedom for the null model are 351 and the objective function was 19.28 with Chi Square of 56647.54 The degrees of freedom for the model are 183 and the objective function was 0.39 The root mean square of the residuals (RMSR) is 0.01 The df corrected root mean square of the residuals is 0.02 The harmonic number of observations is 2847 with the empirical chi square 293.75 with prob < 3.8e-07 The total number of observations was 2949 with MLE Chi Square = 1149.24 with prob < 1.2e-139 Tucker Lewis Index of factoring reliability = 0.967 RMSEA index = 0.042 and the 90 % confidence intervals are 0.04 0.045 BIC = -312.79 Fit based upon off diagonal values = 1 Measures of factor score adequacy MR2 MR1 MR5 MR7 MR4 MR3 MR6 Correlation of scores with factors 0.97 0.98 0.96 0.95 0.95 0.97 0.93 Multiple R square of scores with factors 0.93 0.96 0.92 0.90 0.91 0.95 0.87 Minimum correlation of possible factor scores 0.87 0.91 0.85 0.80 0.81 0.90 0.74
コメント