有六个指标衡量一个变量,想用主成分分析法得出一个综合指标,然后用综合指标代入回归方程进行回归分析。但是那个综合指标到底该怎么得到不清楚把自己会的部分以及疑问贴上来,真诚求教,感谢!
1、数据标准化得到 zinput1 zinput2 zinput3 zinput4 zinput5 zinput6
2、主成分分析 pca zinput1 zinput2 zinput3 zinput4 zinput5 zinput6,结果如下
Principal components/correlation Number of obs = 10203
Number of comp. = 6
Trace = 6
Rotation: (unrotated = principal) Rho = 1.0000
--------------------------------------------------------------------------
Component | Eigenvalue Difference Proportion Cumulative
-------------+------------------------------------------------------------
Comp1 | 2.39135 .47773 0.3986 0.3986
Comp2 | 1.91362 .942164 0.3189 0.7175
Comp3 | .971458 .541061 0.1619 0.8794
Comp4 | .430397 .20724 0.0717 0.9511
Comp5 | .223157 .153143 0.0372 0.9883
Comp6 | .0700141 . 0.0117 1.0000
--------------------------------------------------------------------------
关于取哪些主成分,我看一种说通过累计方差贡献率判断的,这样就应该取前5个;另一种有通过特征根大于1判断的,这样就应该取前2个。这是第一个问题。其实为什么要取主成分,取了有什么用我也不知道……
3、检验主成分有效性
est kmo 结果如下
Kaiser-Meyer-Olkin measure of sampling adequacy
-----------------------
Variable | kmo
-------------+---------
zinput1 | 0.4359
zinput2 | 0.4225
zinput3 | 0.3667
zinput4 | 0.3440
zinput5 | 0.3597
zinput6 | 0.6648
-------------+---------
Overall | 0.4239
-----------------------
貌似太小了不行,这样该剔除了吧,剔除哪个呢,比如说剔除3,4,5,然后重新做pca zinput1 zinput2 zinput6吗?
estat smc
Squared multiple correlations of variables with all other variables
-----------------------
Variable | smc
-------------+---------
zinput1 | 0.8391
zinput2 | 0.7318
zinput3 | 0.7108
zinput4 | 0.8239
zinput5 | 0.3200
zinput6 | 0.6008
-----------------------
这个同问
4、撇开上一步的疑问不谈,这一步该得分了吧,如果我想就从这六个指标中得到一个综合指标,我该怎么做呢,(1)直接predict f1得出的f1就是综合指标吗,(2)假如我选择了前两个主成分,应该predict f1,f2吗?是选择几个主成分predict 后就保留几个新变量吗?然后再通过对f1 f2进行某种计算得出一个综合指标吗,怎么计算呢,有命令吗? (1)(2)哪个正确呢,
我就想要一个综合指标,然后代入模型去回归,唉求解!感谢!
本文来自: 人大经济论坛 Stata专版 版,详细出处参考: https://bbs.pinggu.org/forum.php?mod=viewthread&tid=2441468&page=1&from^^uid=2138296