[R] Wilcoxon Rank-Sum Test with Bonferroni's correction

Spencer Graves spencer.graves at pdf.com
Wed Sep 20 09:21:24 CEST 2006


      Consider the following: 

l0 <- list(1:3, 4:5)
l1 <- list(6:8, 9:11, 12:16)
WT <- mapply(function(x,y)wilcox.test(x,y)$p.value, l0, l1)

      The simplest Bonferroni for this case would be as follows: 

length(WT)*WT

      Greater numerical precision could be obtained as follows: 

1-(1-WT)^length(WT)

      If you aren't satisfied with either of these, I suggest two 
things:  First have you tried help('Bonferroni')?  This produced 124 
hits for me just now.  Second, please expand your example slightly to 
make it self contained (as I tried to do above) and PLEASE do read the 
posting guide "www.R-project.org/posting-guide.html". 

      Hope this helps. 
      Spencer Graves

Raj, Towfique wrote:
> Dear all,
>
> I am trying to run Wilcoxon Rank-Sum Test with Bonferroni's
> correction. I have two lists: l0, l1:
>
> mapply(function(x,y)wilcox.test(x,y)$p.value, l0, l1)
>
> How do I run Bonferroni's correction on mapply? Any help is much apperciated.
> Thanks,
>
> -Raj
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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