Re: [R] Wilcoxon Test

2017-04-21 Thread Achim Zeileis
On Fri, 21 Apr 2017, peter dalgaard wrote: Also, as far as I know just for historical consistency, the test statistic in R is the rank sum of the first group MINUS its minimum possible value: W = 110.5 - sum(1:13) = 19.5 Ah, yes, I meant to add that remark. And coin::wilcox_test always comput

Re: [R] Wilcoxon Test

2017-04-21 Thread peter dalgaard
Also, as far as I know just for historical consistency, the test statistic in R is the rank sum of the first group MINUS its minimum possible value: W = 110.5 - sum(1:13) = 19.5 -pd > On 21 Apr 2017, at 14:54 , Achim Zeileis wrote: > > On Fri, 21 Apr 2017, Tripoli Massimiliano wrote: > >> De

Re: [R] Wilcoxon Test

2017-04-21 Thread Ivan Calandra
Try setting the 'correct' argument to FALSE (similar to CORRECT=NO option in the SAS documentation). The p-values are then identical, although the W values are different. Additionally I cannot understand why you get a warning from R that it cannot compute exact p-values because of ties, while

Re: [R] Wilcoxon Test

2017-04-21 Thread Achim Zeileis
On Fri, 21 Apr 2017, Tripoli Massimiliano wrote: Dear R users, Why the result of Wilcoxon sum rank test by R is different from sas https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_npar1way_sect022.htm The code is next: sampleA <- c(1.94, 1.94, 2.92, 2.9

Re: [R] Wilcoxon test output as a table

2013-12-12 Thread dc347
Hello there Was looking up a similar problem yesterday and came across the gMWT package (Generalized Mann-Whitney Type Tests). It addresses your problem, although I am still trying to figure out how it works. Kind regards, David -- View this message in context: http://r.789695.n4.nabble.com/

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-21 Thread Henric (Nilsson) Winell
On 2012-09-20 21:07, Thomas Lumley wrote: On Fri, Sep 21, 2012 at 6:43 AM, avinash barnwal wrote: Hi, http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test We can clearly see that null hypothesis is median different or not. One way of proving non difference is P(X>Y) = P(X Avinash. No. F

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-20 Thread Thomas Lumley
On Fri, Sep 21, 2012 at 6:43 AM, avinash barnwal wrote: > Hi, > > http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test > > We can clearly see that null hypothesis is median different or not. > One way of proving non difference is P(X>Y) = P(X ordered. Avinash. No. Firstly, the Wikipedia link

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-20 Thread avinash barnwal
Hi, http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test We can clearly see that null hypothesis is median different or not. One way of proving non difference is P(X>Y) = P(X wrote: > > On Sep 20, 2012, at 02:43 , Thomas Lumley wrote: > >> On Thu, Sep 20, 2012 at 5:46 AM, Mohamed Radhouane Anib

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-20 Thread peter dalgaard
On Sep 20, 2012, at 02:43 , Thomas Lumley wrote: > On Thu, Sep 20, 2012 at 5:46 AM, Mohamed Radhouane Aniba > wrote: >> Hello All, >> >> I am writing to ask your opinion on how to interpret this case. I have two >> vectors "a" and "b" that I am trying to compare. >> >> The wilcoxon test is gi

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-20 Thread avinash barnwal
Hi, In Wilcoxon test , we look for medians rather than the means. Ratio of medians should be more coherent with P value. On Thu, Sep 20, 2012 at 6:30 PM, Ben Bolker wrote: > Mohamed Radhouane Aniba gmail.com> writes: > > > > > > > Thank you Thomas, > > > > So you think a t-test is more adequat

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-20 Thread Ben Bolker
Mohamed Radhouane Aniba gmail.com> writes: > > > Thank you Thomas, > > So you think a t-test is more adequate to use in this case ? > > Rad No, because a t-test makes even stronger parametric assumptions. You were given more specific advice on stackoverflow http://stackoverflow.com/questi

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-19 Thread Mohamed Radhouane Aniba
Thank you Thomas, So you think a t-test is more adequate to use in this case ? Rad On Sep 19, 2012, at 8:43 PM, Thomas Lumley wrote: > On Thu, Sep 20, 2012 at 5:46 AM, Mohamed Radhouane Aniba > wrote: >> Hello All, >> >> I am writing to ask your opinion on how to interpret this case. I hav

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-19 Thread Thomas Lumley
On Thu, Sep 20, 2012 at 5:46 AM, Mohamed Radhouane Aniba wrote: > Hello All, > > I am writing to ask your opinion on how to interpret this case. I have two > vectors "a" and "b" that I am trying to compare. > > The wilcoxon test is giving me a pvalue of 5.139217e-303 of a over b with the > alter

Re: [R] Wilcoxon test

2012-08-08 Thread peter dalgaard
On Aug 8, 2012, at 18:16 , BELLAY Juliette wrote: > Dear list, > > I am facing a problem in my statistical analyses on R. > My experiments are about plants, I record there growth after each cutting > (every 3 weeks). > 'BC' is for the plant, and '1' to '5' is the time of cutting and recording.

Re: [R] Wilcoxon test p value with one decimal place

2012-02-16 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Jun Shen > Sent: Thursday, February 16, 2012 10:16 AM > To: R-help > Subject: [R] Wilcoxon test p value with one decimal place > > Dear list, > > Let's say I have data > > a=c

Re: [R] Wilcoxon test p value with one decimal place

2012-02-16 Thread Ted Harding
On 16-Feb-2012 Bert Gunter wrote: > On Thu, Feb 16, 2012 at 10:15 AM, Jun Shen wrote: >> Dear list, >> >> Let's say I have data >> >> _a=c(37.961,38.214,57.68) >> _b=c(77.56,61.875,67.683) >> >> >> >> the wilcoxon test only gives me a p value with one decimal place. Is this >> normal? > > No, it

Re: [R] Wilcoxon test p value with one decimal place

2012-02-16 Thread Bert Gunter
On Thu, Feb 16, 2012 at 10:15 AM, Jun Shen wrote: > Dear list, > > Let's say I have data > >  a=c(37.961,38.214,57.68) >  b=c(77.56,61.875,67.683) > > wilcox.test(a,b) > > the wilcoxon test only gives me a p value with one decimal place. Is this > normal? No, it's discrete :-) (Actually, that's

Re: [R] Wilcoxon test and grouping factor with multiple levels

2010-08-17 Thread Iurie Malai
Thank you, David Winsemius and Dennis Murphy! I want to compare pairs one by one. 2010/8/17 Iurie Malai : > Dear R users, > > I have a dataset with two variables: $esan - a grouping factor with 8 > levels and $reus. I'd like to do wilcox.test on this dataset as > sugested Weiwei here: > https://

Re: [R] Wilcoxon test and grouping factor with multiple levels

2010-08-17 Thread Dennis Murphy
Hi: As the help page for wilcox.test() states (?wilcox.test), the test is meant for one or two groups. Since you have eight groups in your data, the help page for wilcox.test() suggests using kruskal.test() instead, where the latter function applies the Kruskal-Wallis test if your intention is to

Re: [R] Wilcoxon test and grouping factor with multiple levels

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 2:48 AM, Iurie Malai wrote: Dear R users, I have a dataset with two variables: $esan - a grouping factor with 8 levels and $reus. I'd like to do wilcox.test on this dataset as sugested Weiwei here: https://stat.ethz.ch/pipermail/r-help/2007-July/136627.html. I tried to adap

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Iurie Malai
Maybe, this will be better: W <- as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative="two.sided", data=Dataset)$statistic)) P <- as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative="two.sided", data=Dataset)$p.value)) out <- rbind(as.numeric(W)

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Iurie Malai
Sorry, Joris, now is wonderful! Thank you! Now, this is the code: W <- as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative="two.sided", data=Dataset)$statistic)) P <- as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative="two.sided", data=Datase

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Joris Meys
Can't reproduce those with your code and your dataset. I also noticed some other unwanted behaviour by using as.numeric : it changes the formatting again. You won't get rid of the "" as that indicates it's a character, and you won't be able to format the numbers as the columns in a dataframe or in

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Iurie Malai
Thank you, Joris! I received two identical warnings: [14] WARNING: Warning in if (nchar(cmd) <= width) return(cmd) : the condition has length > 1 and only the first element will be used [15] WARNING: Warning in if (nchar(cmd) <= width) return(cmd) : the condition has length > 1 and only the f

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Joris Meys
# not tested out <- rbind(as.numeric(Wnew),as.numeric(P)) rownames(out) <- c("Wnew","P") Cheers On Sat, Jun 5, 2010 at 11:18 PM, Iurie Malai wrote: > Hi! > > I searched some time ago a way to get the Wilcoxon test results as a table > more or less formatted. Nobody told me any solution and I fou

Re: [R] wilcoxon test with bonferroni correction

2009-02-02 Thread Chuck Cleland
On 2/1/2009 8:32 PM, Laura Lucia Prieto Godino wrote: > Hi! > I need to run a wilcoxon (Mann-whitly, in fact) test with bonferroni > correction, as I am running 10 consecutive wilcoxon test not > independent, and I know that bonferroni will partially correct for this > problem, but I have no idea h