首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带因子变量的FactoMineR主成分分析

带因子变量的FactoMineR主成分分析
EN

Stack Overflow用户
提问于 2018-09-02 07:56:06
回答 1查看 761关注 0票数 1

以下是R数据格式的数据链接(因此您可以看到因子实际上是因子):

Vaccination Data 2016

代码如下:

代码语言:javascript
复制
df %>%
   PCA(scale.unit = TRUE,
       quali.sup = 14, #the factor variables
       graph = T)

除了告诉我它用均值替换了缺少的值(我很高兴看到这一点)之外,上面的代码还产生了这样的结果:

代码语言:javascript
复制
argument is not numeric or logical: returning NA
argument is not numeric or logical: returning NA
argument is not numeric or logical: returning NA
argument is not numeric or logical: returning NA
argument is not numeric or logical: returning NA
argument is not numeric or logical: returning NA
Error in PCA(., scale.unit = TRUE, quali.sup = 14, graph = T) : 
    The following variables are not quantitative:  ins_stat_i
    The following variables are not quantitative:  c1r
    The following variables are not quantitative:  childnm
    The following variables are not quantitative:  state
    The following variables are not quantitative:  sex
    The following variables are not quantitative:  language

我很困惑。我没说它们是定量的。我说他们是quali.sup类型的。你能复制它吗?如果是这样,解决方案是什么?谢谢大家。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-09-02 08:08:13

哦,亲爱的。结果是我打错了。我应该说quali.sum变量是13:19,而我说的是14,这就是问题所在。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52133009

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档