啊啊啊啊啊吖

2018-10-24   阅读量: 815

数据分析师 统计学 R语言

主成份分析各指标的贡献率

扫码加入数据分析学习群

在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除以变量个数

添加CDA认证专家【维克多阿涛】,微信号:【cdashijiazhuang】,提供数据分析指导及CDA考试秘籍。已助千人通过CDA数字化人才认证。欢迎交流,共同成长!
7.3728 1 1 关注作者 收藏

评论(0)


暂无数据

推荐课程

推荐帖子