我只是浪费了一整天的时间来寻找我的问题的解决方案。
简而言之,我有两个数据集,每个数据集都有两个来自wilcox_test的样本。现在,我想测试效果大小。对于第一个数据集,我收到了一个效果大小"r",对于另一个数据集,我收到了一个错误消息:
library(rcompanion)
wilcoxonPairedR(x = sport_1_4$value, g = sport_1_4$variable)
Fehler in wilcoxonZ(x = x[as.numeric(g) == 1], y = x[as.numeric(g) == 2], :
'x' and 'y' must have the same length我做了完全相同的操作,但它不会起作用。
编辑:对于两个变量,我有相同数量的of。
> table(sport_1_4$variable)
sport_t1 sport_t2 sport_t3 sport_t4
38 0 0 38 dataset1 -测试t1和t2
> head(sport_1_2)
ID variable value
1 1 sport_t1 2
2 2 sport_t1 4
3 3 sport_t1 4
4 4 sport_t1 2
5 5 sport_t1 3
6 6 sport_t1 2dataset2 -测试t1和t4
> head(sport_1_4)
ID variable value
1 1 sport_t1 2
2 2 sport_t1 4
3 3 sport_t1 4
4 4 sport_t1 2
5 5 sport_t1 3
6 6 sport_t1 2发布于 2021-02-07 22:07:02
好的,我通过将数据集复制到新的excel工作表中,并将其导入到Rstudio中解决了这个问题。现在它起作用了..。我什么都没改。真奇怪。
https://stackoverflow.com/questions/66084284
复制相似问题