具有因子变量的FactoMineR PCA

问题描述 投票:0回答:1

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

Vaccination Data 2016

这是代码:

df %>%
   PCA(scale.unit = TRUE,
       quali.sup = 14, #the factor variables
       graph = T)

除了告诉我它用手段替换缺失值(我很高兴看到),上面产生了这个:

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类型。你能复制一下吗?如果是这样,解决方案是什么?谢谢,所有。

r debugging pca
1个回答
0
投票

噢亲爱的。事实证明我输错了。我应该说quali.sum变量是13:19而我说它们是14.这就是问题所在。

© www.soinside.com 2019 - 2024. All rights reserved.