r语言Isfit_R语言学习笔记(十二):主成分分析和因子分析

#提取公共因子

fa

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

Cumulative Var 0.46 0.60

Proportion Explained 0.77 0.23

Cumulative Proportion 0.77 1.00

Mean item complexity = 1.5

Test of the hypothesis that 2 factors are sufficient.

The degrees of freedom for the null model are 15 and the objective function was 2.5

The degrees of freedom for the model are 4 and the objective function was 0.07

The root mean square of the residuals (RMSR) is 0.03

The df corrected root mean square of the residuals is 0.06

Fit based upon off diagonal values = 0.99

Measures of factor score adequacy

PA1 PA2

Correlation of scores with factors 0.96 0.92

Multiple R square of scores with factors 0.93 0.84

Minimum correlation of possible factor scores 0.86 0.68

#因子旋转

#正交旋转

fa.varimax

fa.varimax

Factor Analysis using method = pa

Call: fa(r = correlations, nfactors = 2, rotate = "varimax", fm = "pa")

Standardized loadings (pattern matrix) based upon correlation matrix

PA1  PA2  h2   u2    com

general 0.49 0.57 0.57 0.432 2.0

picture 0.16 0.59 0.38 0.623 1.1

blocks 0.18 0.89 0.83 0.166 1.1

maze 0.13 0.43 0.20 0.798 1.2

reading 0.93 0.20 0.91 0.089 1.1

vocab 0.80 0.23 0.69 0.313 1.2

PA1 PA2

SS loadings 1.83 1.75

Proportion Var 0.30 0.29

Cumulative Var 0.30 0.60

Proportion Explained 0.51 0.49

Cumulative Proportion 0.51 1.00

Mean item complexity = 1.3

Test of the hypothesis that 2 factors are sufficient.

The degrees of freedom for the null model are 15 and the objective function was 2.5

The degrees of freedom for the model are 4 and the objective function was 0.07

The root mean square of the residuals (RMSR) is 0.03

The df corrected root mean square of the residuals is 0.06

Fit based upon off diagonal values = 0.99

Measures of factor score adequacy

PA1 PA2

Correlation of scores with factors 0.96 0.92

Multiple R square of scores with factors 0.91 0.85

Minimum correlation of possible factor scores 0.82 0.71

#斜交旋转

install.packages("GPArotation")

library(GPArotation)

fa.promax

fa.promax

Factor Analysis using method = pa

Call: fa(r = correlations, nfactors = 2, rotate = "promax", fm = "pa")

Warning: A Heywood case was detected.

Standardized loadings (pattern matrix) based upon correlation matrix

PA1   PA2  h2  u2    com

general 0.37 0.48 0.57 0.432 1.9

picture -0.03 0.63 0.38 0.623 1.0

blocks -0.10 0.97 0.83 0.166 1.0

maze    0.00 0.45 0.20 0.798 1.0

reading 1.00 -0.09 0.91 0.089 1.0

vocab   0.84 -0.01 0.69 0.313 1.0

PA1 PA2

SS loadings 1.83 1.75

Proportion Var 0.30 0.29

Cumulative Var 0.30 0.60

Proportion Explained 0.51 0.49

Cumulative Proportion 0.51 1.00

With factor correlations of

PA1 PA2

PA1 1.00 0.55

PA2 0.55 1.00

Mean item complexity = 1.2

Test of the hypothesis that 2 factors are sufficient.

The degrees of freedom for the null model are 15 and the objective function was 2.5

The degrees of freedom for the model are 4 and the objective function was 0.07

The root mean square of the residuals (RMSR) is 0.03

The df corrected root mean square of the residuals is 0.06

Fit based upon off diagonal values = 0.99

Measures of factor score adequacy

PA1 PA2

Correlation of scores with factors 0.97 0.94

Multiple R square of scores with factors 0.93 0.88

Minimum correlation of possible factor scores 0.86 0.77

#显示因子的相关系数?

fsm

if(class(oblique)[2] =="fa" & is.null(oblique$Phi)){

warning("Object dosen‘t look like oblique EFA")

} else{

P

F

colnames(F)

return(F)

}

}

fsm(fa.promax)

PA1  PA2

general 0.64 0.69

picture 0.32 0.61

blocks  0.43 0.91

maze    0.25 0.45

reading 0.95 0.46

vocab   0.83 0.45

#斜交结果的图形展示

factor.plot(fa.promax,labels=rownames(fa.promax$loadings))

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值