Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid warning message in wilcox.test

Tags:

r

x <- c(9, 5, 9 ,10, 13, 8, 8, 13, 18, 30)
y <- c(10, 6, 9, 8, 11, 4, 1, 3, 3, 10)
wilcox.test(y,x, paired=TRUE,correct = FALSE)

Warning messages occurred when submit these codes. How to avoid warning message in wilcox.test.Thanks!

like image 469
stata Avatar asked Nov 26 '25 20:11

stata


1 Answers

use

suppressWarnings(wilcox.test(...))

or (better)

wilcox.test(...,exact=FALSE)

or

library(coin)
wilcoxsign_test(y~x,zero="Pratt")
like image 65
Ben Bolker Avatar answered Nov 28 '25 17:11

Ben Bolker