提取公共因子

  • fa()
使用fa()函数提取因子
fa(r,nfactors = ,n.obs = ,rotate =,score = ,fm =)
1
1
 
1
fa(r,nfactors = ,n.obs = ,rotate =,score = ,fm =)
r:是相关系数矩阵或原始数据矩阵
nfactors:设定提取的因子数(默认为1)
n.obs:是观测数(输入相关系数矩阵时需要填写)
rotate:设定旋转的方法(默认变异数最小法)
scores:设定是否计算因子得分(默认不计算)
fm:设定因子化方法(默认极小残差法)

与 PCA 不同,提取公共因子的方法很多,包括
最大似然法(ml)、
主轴迭代法(pa )、
加权最小二乘法(wls)、
广义加权最小二乘法(gls)、
最小残差法(miners)、
统计学家倾向与使用最大似然法,因为具有良好的统计性质,不过有时不会收敛,此时使用主轴迭代法(pa)效果会更好

#使用主轴迭代法(pa)
> fa <- fa(correlations,nfactors=2,rotate="none",fm="pa")   #rotate=none表示未旋转
> fa
Factor Analysis using method =  pa
Call: fa(r = correlations, nfactors = 2, rotate = "none", fm = "pa")
Standardized loadings (pattern matrix) based upon correlation matrix
         PA1   PA2   h2    u2 com
general 0.75  0.07 0.57 0.432 1.0
picture 0.52  0.32 0.38 0.623 1.7
blocks  0.75  0.52 0.83 0.166 1.8
maze    0.39  0.22 0.20 0.798 1.6
reading 0.81 -0.51 0.91 0.089 1.7
vocab   0.73 -0.39 0.69 0.313 1.5

                       PA1  PA2
SS loadings           2.75 0.83
Proportion Var        0.46 0.14    #两个因子解释了六个心理学测验60%的方差
Cumulative Var        0.46 0.60
Proportion Explained  0.77 0.23
Cumulative Proportion 0.77 1.00

#[......已删除额外输出......]
#不过因子载荷阵的意义并不好解释,将结果使用因子旋转下,此时使用因子旋转将有助于因子的解释
有助于因子的解释
 
1
#使用主轴迭代法(pa)
2
> fa <- fa(correlations,nfactors=2,rotate="none",fm="pa")   #rotate=none表示未旋转
3
> fa
4
Factor Analysis using method =  pa
5
Call: fa(r = correlations, nfactors = 2, rotate = "none", fm = "pa")
6
Standardized loadings (pattern matrix) based upon correlation matrix
7
         PA1   PA2   h2    u2 com
8
general 0.75  0.07 0.57 0.432 1.0
9
picture 0.52  0.32 0.38 0.623 1.7
10
blocks  0.75  0.52 0.83 0.166 1.8
11
maze    0.39  0.22 0.20 0.798 1.6
12
reading 0.81 -0.51 0.91 0.089 1.7
13
vocab   0.73 -0.39 0.69 0.313 1.5
14
15
                       PA1  PA2
16
SS loadings           2.75 0.83
17
Proportion Var        0.46 0.14    #两个因子解释了六个心理学测验60%的方差
18
Cumulative Var        0.46 0.60
19
Proportion Explained  0.77 0.23
20
Cumulative Proportion 0.77 1.00
21
22
#[......已删除额外输出......]
23
#不过因子载荷阵的意义并不好解释,将结果使用因子旋转下,此时使用因子旋转将有助于因子的解释



转载于:https://my.oschina.net/u/1785519/blog/1563573

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值