0

我有以下代码:

> require(psych)
> require(MASS)
> pa <- fa(Harman74.cor$cov,4,fm="pa" ,rotate="none")
> ld <- loadings(pa)

> str(ld)

loadings [1:24, 1:4] 0.598 0.372 0.42 0.484 0.688 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:24] "VisualPerception" "Cubes" "PaperFormBoard" "Flags" ...
  ..$ : chr [1:4] "PA1" "PA2" "PA3" "PA4"

如何直接访问loadings4 个向量或 4x24 数组?

4

1 回答 1

1

问题不清楚。ld是一流的loadings。您可以使用unclass将其转换为matrix.

unclass(ld)
                             PA1         PA2          PA3          PA4
VisualPerception       0.5982838  0.02973076  0.379881903 -0.216752604
Cubes                  0.3721564 -0.03009154  0.261549017 -0.148551734
PaperFormBoard         0.4195414 -0.11770506  0.364650207 -0.125225346
Flags                  0.4840396 -0.10757757  0.260532547 -0.190122114
GeneralInformation     0.6880672 -0.29797186 -0.274215767 -0.037571574
........

但是结果是不一样的,因为print.loadings做了一些格式化和矩阵的总结。

于 2013-03-31T09:29:30.630 回答