统计功能的标准偏差为零

问题描述

我目前正在处理多级数据。因此,我决定使用函数statsBy来计算相关性。计算了相关性,但R继续发送此错误消息“ statsBy函数的标准偏差为零”。

我已经查看了所有变量的SD,non为零。

有人知道这个错误可能来自哪里吗?

library(psych)

cormatrix1 <- statsBy(dat_all[c("a","b","c","d","e","neuroticism","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")],c(dat_all$ID),cors = TRUE,cor="cor",method="pearson",use="pairwise",poly=FALSE,na.rm=TRUE,alpha=.05,minlength=5)

There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In cor(x[-gr],use = use,method = method) : the standard deviation is zero
2: In cor(x[-gr],method = method) : the standard deviation is zero
...
50: In cor(x[-gr],method = method) : the standard deviation is zero

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...