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

2021-03-19 Thread Bogdan Tanasa
thanks a lot, Jiefei ! and thanks to all for your time and comments ! have a good weekend ! On Fri, Mar 19, 2021 at 10:01 PM Jiefei Wang wrote: > Hi Bogdan, > > I think the journal is asking about the exact value of the pvalue, it > doesn't matter if it is from the exact distribution or norm

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

2021-03-19 Thread Jiefei Wang
Hi Bogdan, I think the journal is asking about the exact value of the pvalue, it doesn't matter if it is from the exact distribution or normal approximation. However, it does not make any sense to report such a small pvlaue. If I was you, I would show the reviewers the exact pvalue they want and g

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

2021-03-19 Thread Bert Gunter
Yes, Bogdan, that sounds *exactly* right. ;-) -- it runs out of memory trying to calculate the exact permutation distribution. What you apparently get with exact = FALSE is the exact answer( to within floating point arithmetic's approximation) to a normal approximation. ... and furthermore... I

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

2021-03-19 Thread Bogdan Tanasa
Thank you Kevin, their wording is "Please note that the exact p value should be provided, when possible, etc" by "exact p-value" i believe that they do mean indeed the actual number, and not to specify "exact=TRUE" ; as we are working with 1000 genes, shall i specify "exact=TRUE" on my PC, it run

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

2021-03-19 Thread Kevin Thorpe
I have to ask since. Are you sure the journal simply means by exact p-value that they don’t want to see a p-value given as < 0.0001, for example, and simply want the actual number? I cannot imagine they really meant exact as in the p-value from some exact distribution. -- Kevin E. Thorpe Head

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

2021-03-19 Thread Bogdan Tanasa
Dear all, thank you all for comments and help. as far as i can see, shall we have samples of 1000 records, only "exact=FALSE" allows the code to run: wilcox.test(rnorm(1000), rnorm(1000, 2), exact=FALSE)$p.value [1] 7.304863e-231 shall i use "exact=TRUE", it runs out of memory on my 64GB RAM PC

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

2021-03-19 Thread Viechtbauer, Wolfgang (SP)
For me, it was always clear based on the documentation that if there are ties, then the normal approximation is used (irrespective of what 'exact' is set to). In fact, if there are ties, the output even tells you that this is happening: wilcox.test(c(1,3,2,2,4), exact=TRUE) [...] Warning messag

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

2021-03-19 Thread Bert Gunter
I **believe** -- if my old memory still serves-- that the "exact" specification uses a home grown version of the algorithm to calculate exact, or close approximations to the exact, permutation distribution originally developed by Cyrus Mehta, founder of StatXact software. Of course, examining the

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

2021-03-19 Thread Jiefei Wang
Hi Spencer, Thanks for your test results, I do not know the answer as I haven't used wilcox.test for many years. I do not know if it is possible to compute the exact distribution of the Wilcoxon rank sum statistic, but I think it is very likely, as the document of `Wilcoxon` says: This distributi

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

2021-03-19 Thread Bogdan Tanasa
Dear Jiefei, and all, many thanks for your time and comments, suggestions, insights. -- bogdan On Fri, Mar 19, 2021 at 7:52 AM Jiefei Wang wrote: > 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 statis

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

2021-03-19 Thread Jiefei Wang
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=

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

2021-03-19 Thread Viechtbauer, Wolfgang (SP)
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---

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

2021-03-19 Thread Spencer Graves
On 2021-3-19 9:52 AM, Jiefei Wang wrote: 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.

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

2021-03-19 Thread Jiefei Wang
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 use

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

2021-03-19 Thread Jiefei Wang
Hey, I just want to point out that the word "exact" has two meanings. It can mean the numerically accurate p-value as Bogdan asked in his first email, or it could mean the p-value calculated from the exact distribution of the statistic(In this case, U stat). These two are actually not related, eve

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

2021-03-19 Thread Spencer Graves
On 2021-3-19 12:54 AM, Bogdan Tanasa wrote: > thanks a lot, Vivek ! in other words, assuming that we work with 1000 data > points, > > shall we use EXACT = TRUE, it uses the normal approximation, > > while if EXACT=FALSE (for these large samples), it does not ?   As David Winsemius noted,