如何解决统计功能的标准偏差为零
我目前正在处理多级数据。因此,我决定使用函数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 举报,一经查实,本站将立刻删除。