[R] about a p-value < 2.2e-16

Jiefei Wang @zwj|08 @end|ng |rom gm@||@com
Fri Mar 19 16:31:43 CET 2021


Dear Wolfgang,

Thanks for the documentation, but the document only states the default
behavior, it does not mention what would happen if we tell it to compute
the exact p-value but the data has ties. I think this would be misleading
as people might think their result is exact by specifying `exact=TRUE` but
the truth is that their data contains ties and the result is from the
normal approximation.

Best,
Jiefei

On Fri, Mar 19, 2021 at 11:18 PM Viechtbauer, Wolfgang (SP) <
wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:

> Dear Jiefei,
>
> This behavior is documented. From help(wilcox.test):
>
> "By default (if exact is not specified), an exact p-value is computed if
> the samples contain less than 50 finite values and there are no ties.
> Otherwise, a normal approximation is used."
>
> Best,
> Wolfgang
>
> >-----Original Message-----
> >From: R-help [mailto:r-help-bounces using r-project.org] On Behalf Of Jiefei
> Wang
> >Sent: Friday, 19 March, 2021 15:52
> >To: Spencer Graves
> >Cc: r-help; Bogdan Tanasa
> >Subject: Re: [R] about a p-value < 2.2e-16
> >
> >After digging into the R source, it turns out that the argument `exact`
> has
> >nothing to do with the numeric precision. It only affects the statistic
> >model used to compute the p-value. When `exact=TRUE` the true distribution
> >of the statistic will be used. Otherwise, a normal approximation will be
> >used.
> >
> >I think the documentation needs to be improved here, you can compute the
> >exact p-value *only* when you do not have any ties in your data. If you
> >have ties in your data you will get the p-value from the normal
> >approximation no matter what value you put in `exact`. This behavior
> should
> >be documented or a warning should be given when `exact=TRUE` and ties
> >present.
> >
> >FYI, if the exact p-value is required, `pwilcox` function will be used to
> >compute the p-value. There are no details on how it computes the pvalue
> but
> >its C code seems to compute the probability table, so I assume it computes
> >the exact p-value from the true distribution of the statistic, not a
> >permutation or MC p-value.
> >
> >Best,
> >Jiefei
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list