Home > front end >  R wilcox test different result
R wilcox test different result

Time:03-29

I am performing on R the wilcox.test in 2 different ways:

1st: y <- wilcox.test(week1,week2, alternative='two.sided', conf.level=.95)

2nd: wilcox.test(week1,week2, alternative='two.sided', conf.level=.95)

The result for the 1st is:

List of 7
 $ statistic  : Named num 563751
  ..- attr(*, "names")= chr "W"
 $ parameter  : NULL
 $ p.value    : num 1.24e-24
 $ null.value : Named num 0
  ..- attr(*, "names")= chr "location shift"
 $ alternative: chr "two.sided"
 $ method     : chr "Wilcoxon rank sum test with continuity correction"
 $ data.name  : chr "week1 and week2"
 - attr(*, "class")= chr "htest" ```

The result for the 2nd is:

data:  week1 and week2
W = 563751, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0

I understand that in the 1st I have the p-value number (1.24e-24), and the second it mentions that p-value is too low (lower than 2.2e-16), but not specific number.

Is it right, or I am doing something wrong?

CodePudding user response:

eps is the distance from 1.0 to the next larger double-precision number. When results come back with values less than the square root of the smallest possible value the smallest possible number whose sum with 1 is not equal to 1 given the floating point representation of numbers, then there is the sense among statisticians that the is no solid basis for saying that the number is definitely any particular value between 0 and 2.2e-16. So the safe thing to do is just report that the number is very small, effectively 0.

.Machine
$double.eps
[1] 2.220446e-16

?.Machine
#--------

A list with components

double.eps  
   the smallest positive floating-point number x such that 1   x != 1. It 
   equals double.base ^ ulp.digits if either double.base is 2 or 
   double.rounding is 0; otherwise, it is (double.base ^ double.ulp.digits) / 
   2. Normally 2.220446e-16.

#the rest elided
  •  Tags:  
  • r
  • Related