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)
t; >Best, >Wolfgang > >>-Original Message- >>From: R-help [mailto:r-help-boun...@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 <

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
l Message- > >From: R-help [mailto:r-help-boun...@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

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

2021-03-19 Thread Viechtbauer, Wolfgang (SP)
ginal Message- >From: R-help [mailto:r-help-boun...@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

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,

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

2021-03-18 Thread David Winsemius
Sent from my iPhone > On Mar 18, 2021, at 10:26 PM, Bogdan Tanasa wrote: > > Dear Spencer, thank you very much for your prompt email and help. When > using : > >> wilcox.test(rnorm(100), rnorm(100, 2), exact=TRUE) > W = 698, p-value < 2.2e-16 > >> wilcox.test(rnorm(100), rnorm(100, 2), exa

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

2021-03-18 Thread Bogdan Tanasa
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 ? On Thu, Mar 18, 2021 at 10:47 PM Vivek Das wrote: > Hi Bogdan, > > You can also get the

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

2021-03-18 Thread Vivek Das
Hi Bogdan, You can also get the information from the link of the Wilcox.test function page. “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.” For more: https:

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

2021-03-18 Thread Bogdan Tanasa
Dear Peter, thanks a lot. yes, we can see a very precise p-value, and that was the request from the journal. if I may ask another question please : what is the meaning of "exact=TRUE" or "exact=FALSE" in wilcox.test ? i can see that the "numerically precise" p-values are different. thanks a lot !

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

2021-03-18 Thread Bogdan Tanasa
Dear Spencer, thank you very much for your prompt email and help. When using : > wilcox.test(rnorm(100), rnorm(100, 2), exact=TRUE) W = 698, p-value < 2.2e-16 > wilcox.test(rnorm(100), rnorm(100, 2), exact=FALSE) W = 1443, p-value < 2.2e-16 and in both cases p-value < 2.2e-16. By "exact" p-value

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

2021-03-18 Thread Peter Langfelder
I thinnk the answer is much simpler. The print method for hypothesis tests (class htest) truncates the p-values. In the above example, instead of using wilcox.test(rnorm(100), rnorm(100, 2), exact=TRUE) and copying the output, just print the p-value: tst = wilcox.test(rnorm(100), rnorm(100, 2),

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

2021-03-18 Thread Spencer Graves
  I would push back on that from two perspectives:         1.  I would study exactly what the journal said very carefully.  If they mandated "wilcox.test", that function has an argument called "exact".  If that's what they are asking, then using that argument gives the exact p-value,

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

2021-03-18 Thread Bogdan Tanasa
Dear all, i would appreciate having your advice on the following please : in R, the wilcox.test() provides "a p-value < 2.2e-16", when we compare sets of 1000 genes expression (in the genomics field). however, the journal