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
#[......已删除额外输出......]
#不过因子载荷阵的意义并很差解释,将结果使用因子旋转下,此时使用因子旋转将有助于因子的解释