热线电话:13121318867

登录
2019-04-12 阅读量: 629
主成份分析各指标的贡献率

在factoextra包中对贡献率有一个绘图。图中有参考线,高于此线的认为变量是显著的,随着变量的多少这个值是不同的。

library(factoextra)

library(FactoMineR)

df <- decathlon2[1:23, 1:10]

res.pca <- PCA(df, graph = FALSE)

fviz_contrib(res.pca, choice = "var", axes = 1, top = 10)

包的帮助中说了这个参考线,但没说这个线对应的值是多少:

A reference dashed line is also shown on the barplot. This reference line corresponds to the expected value if the contribution where uniform. For a given dimension, any row/column with a contribution above the reference line could be considered as important in contributing to the dimension.

终于眼尖的我在函数的原文件中找到了答案:

是100/length(contrib)

也就是100除以变量个数

15.0180
4
关注作者
收藏
评论(0)

发表评论

暂无数据