简体   繁体   English

R中的factanal()函数如何计算因素之间的相关性?

[英]How does factanal() function in R calculate correlations between factors?

When using the factanal() function from the stats package in R using the promax rotation, you are given factor correlations. 使用promax旋转在R中使用stats包中的factanal()函数时,会得到因子相关性。

tmp = cbind(rnorm(200,2,1.5),rnorm(200,2,1.5),rnorm(200,2,1.5),rnorm(200,2,1.5),rnorm(200,2,1.5),rnorm(200,2,1.5))
print(factanal(tmp, 3, rotation="promax"))

However, I can not seem to find how these correlations are calculated (no help in the R documentation). 但是,我似乎找不到如何计算这些相关性(R文档中没有帮助)。 I also fail to recreate them myself using cor() on the factor scores. 我也无法使用系数得分的cor()自己重新创建它们。

I'm guessing it may be a polychoric correlation, but I can't be certain. 我猜可能是多因素相关,但我不确定。

它使用以下代码计算得出,可以在https://github.com/SurajGupta/r-source/blob/master/src/library/stats/R/factanal.R中找到:

tmat <- solve(tmp$rotmat) R <- tmat %*% t(tmat)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM