简体   繁体   English

心理-从fa加载中获取累积方差

[英]psych - Getting cumulative Variance from fa loadings

I am using the psych package's fa command for factor analysis, and so have an object of class fa. 我正在使用psych软件包的fa命令进行因子分析,因此有一个fa类的对象。 I can query the loadings with fac$loadings,but how can I capture the bottom half of the loadings, which gives the SS loadings and the Proportion and cumulative Variance. 我可以使用fac $ loadings查询负载,但是如何捕获负载的下半部分,即SS负载,比例和累积方差。

Example code: 示例代码:

library(psych)
data(bfi)
fac <- fa(r=cor(bfi, use="complete.obs"), nfactors=5, fm="ml", rotate="none")
fac$loadings

And how can I extract the follow information? 以及如何提取以下信息?

                 ML1   ML2   ML3   ML4   ML5
SS loadings    4.429 2.423 1.562 1.331 0.966
Proportion Var 0.158 0.087 0.056 0.048 0.034
Cumulative Var 0.158 0.245 0.301 0.348 0.383

After running str(fac) it seems that you can get the data you're interested in with 运行str(fac) ,似乎可以获取感兴趣的数据

df <- fac$Vaccounted
> df
                            ML1        ML2       ML3       ML4        ML5
SS loadings           4.4291169 2.42278894 1.5623383 1.3308373 0.96561620
Proportion Var        0.1581827 0.08652818 0.0557978 0.0475299 0.03448629
Cumulative Var        0.1581827 0.24471092 0.3005087 0.3480386 0.38252492
Proportion Explained  0.4135227 0.22620272 0.1458671 0.1242531 0.09015437
Cumulative Proportion 0.4135227 0.63972545 0.7855925 0.9098456 1.00000000

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

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