[R] Query about wilcox.test() P-value
Govind Chandra
govind.chandra at bbsrc.ac.uk
Wed Jul 14 17:49:39 CEST 2010
Hi Peter,
Thanks for your response. Yes, I am interested in P-values smaller
than 1e-16. Below a certain value they may not tell much about
significance but are useful for ordering (ranking), for example,
differentially expressed genes in microarray data. Something similar
is done by sequence similarity searching tools such as BLAST (although
they use expect values not P-values) to rank hits to a database. To me
this is practically useful and harmless.
I am not a statistician but I use statistics and wish to avoid
misusing it unknowingly or knowingly. Hence the query.
I would still like to know why there is this difference between
the P-value printed on the console and that stored in the returned
object.
Govind
On Wed, Jul 14, 2010 at 02:32:39PM +0100, Peter Ehlers wrote:
> On 2010-07-14 3:53, Govind Chandra wrote:
> > Hi,
> >
> > I find that the p-value printed out by wilcox.test() and the p-value
> > stored in the p.value attribute in the object returned by
> > wilcox.test() are not the same. There seems to be a lower limit of
> > 2.2e-16 for the printed value although it does say that it is less
> > than that. What I want to know is the reason for the lower limit in
> > the printed value of p-value and also whether I am doing the right
> > thing by picking up the p-value from the p.value attribute of the
> > returned object. An example R session is pasted below (although the
> > test is probably not the right one for the kind of data).
> >
> >> x<- rnorm(500, mean = 30, sd = 3);
> >> y<- rnorm(500, mean = 8000, sd = 6);
> >> wilcox.test(x, y, alternative = "l");
> >
> > Wilcoxon rank sum test with continuity correction
> >
> > data: x and y
> > W = 0, p-value< 2.2e-16
> > alternative hypothesis: true location shift is less than 0
> >
> >> wt<- wilcox.test(x, y, alternative = "l");
> >> wt$p.value;
> > [1] 2.928121e-165
>
> Are you really interested in P-values smaller than 10^(-16)?
> Why? A reported P-value of 3e-165 is certainly not accurate
> to 165 decimal places and should perhaps be reported as zero,
> as t.test() does.
>
> As to your example: there is no sense at all in doing a
> test on such data (other than to satisfy some hypothetical
> fanatical journal editor).
>
> -Peter Ehlers
>
>
> >
> > My version for R is 2.11.1 (2010-05-31) running on x86_64 GNU/Linux
> > (RHEL).
> >
> > Thanks in advance for any help with this.
> >
> > Govind
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
More information about the R-help
mailing list