以下是R数据格式的数据链接(因此您可以看到因子实际上是因子):
代码如下:
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类型的。你能复制它吗?如果是这样,解决方案是什么?谢谢大家。
发布于 2018-09-02 08:08:13
哦,亲爱的。结果是我打错了。我应该说quali.sum变量是13:19,而我说的是14,这就是问题所在。
https://stackoverflow.com/questions/52133009
复制相似问题