[R] wilcox.test warnig message p-value where are the zeros in the data?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Jan 12 16:28:17 CET 2006


Knut Krueger <admin at biostatistic.de> writes:

> does anybody know why there are the two warnings in the example above?
> 
> Regards Knut
> 
>  > day_4
>  [1] 540   1   1   1   1   1   1 300 720 480
>  > day_1
>  [1]  438  343    1  475    1  562  500  435 1045  890
> 
> > is.vector (day_1)
> [1] TRUE
> > is.vector (day_4)
> 
> [1] TRUE

The paired Wilcoxon test depends on pairwise differences and as far as
I can see you have two of those being zero, in cases 3 and 5.
 
>  > wilcox.test(day_4 
> ,day_1,paired=TRUE,alternative="two.sided",exact=TRUE,conf.int=TRUE)
> 
>         Wilcoxon signed rank test with continuity correction
> 
> data:  day_4 and day_1
> V = 1, p-value = 0.02086
> alternative hypothesis: true mu is not equal to 0
> 95 percent confidence interval:
>  -486.5 -120.0
> sample estimates:
> (pseudo)median
>           -348
> 
> Warning messages:
> 1: cannot compute exact p-value with zeroes in: 
> wilcox.test.default(day_4, day_1, paired = TRUE, alternative = 
> "two.sided", 
> 2: cannot compute exact confidence interval with zeroes in: 
> wilcox.test.default(day_4, day_1, paired = TRUE, alternative = 
> "two.sided",
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list