Hi, R allows me to run a one sample Wilcoxon test like this: wilcox.test(c(1,3.5,2.1,4,1.5,5), mu=2, exact=TRUE) The function 'wilcoxsign_test' from the package 'coin' should (I suppose) be able to calculate exact p values even if there are ties in the ranks. However, I couldn't find information on how to run a one sample test using 'wilcoxsign_test' like in the example above. Can anybody help? Thanks, Holger
The wilcoxon test in coin are meant only for "Testing the equality of the distributions of a numeric response in *two or more* independent groups against shift alternatives" whereas the wilcoxon test in the base pacakge "Performs *one-* and two-sample Wilcoxon tests on vectors of data; the latter is also known as ‘Mann-Whitney’ test." So, wilcoxon_test and wilcoxonsign_test in coin will not work for one-sample. Why not just use wilcox.test? Mark J. Lamias ________________________________ From: Holger Taschenberger <Holger.Taschenberger@mpi-bpc.mpg.de> To: r-help@r-project.org Sent: Monday, October 31, 2011 11:12 AM Subject: [R] one sample Wilcoxon test using 'coin' Hi, R allows me to run a one sample Wilcoxon test like this: wilcox.test(c(1,3.5,2.1,4,1.5,5), mu=2, exact=TRUE) The function 'wilcoxsign_test' from the package 'coin' should (I suppose) be able to calculate exact p values even if there are ties in the ranks. However, I couldn't find information on how to run a one sample test using 'wilcoxsign_test' like in the example above. Can anybody help? Thanks, Holger ______________________________________________ R-help@r-project.org mailing list stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]
Hi, I'm trying to use the package 'coin' to run a one sample Wilcoxon test equivalent to this: x1<-c(1,3.5,2.1,4,1.5,5) wilcox.test(x1, mu=2, exact=TRUE) I assume that I can do this like so: x2<-rep(2,length(x1)) wilcoxsign_test(x1 ~ x2,distribution = exact()) But I'm not sure if this is really the correct way. Can someone please advise? (BTW: The reason to use 'coin' is it's ability to compute exact p-values even in the presence of ties in the ranks.) Thanks a lot, Holger
Possibly Parallel Threads
- The three routines in R that calculate the wilcoxon signed-rank test give different p-values.......which is correct?
- permutation test on paired samples
- Wilcoxon signed-ranks test using package coin ?
- Wilcoxon Rank test of Package Coin
- extracting results from wilcox_test (package::coin)