[R] one sample Wilcoxon test using 'coin'
Holger Taschenberger
Holger.Taschenberger at mpi-bpc.mpg.de
Mon Nov 7 11:59:19 CET 2011
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
More information about the R-help
mailing list