A blog on statistics and R aiming at helping academics and professionals working with data to grasp important concepts in statistics and to apply them in R. See www.statsandr.com
Note that in the two-sample case the estimator for the difference in location parameters does not estimate the difference in medians (a common misconception) but rather the median of the difference between a sample from x and a sample from y.
> library("coin")
> wilcox_test(Grade ~ Sex,data= dat, conf.int= T,distribution = exact())
Exact Wilcoxon-Mann-Whitney Test
data: Grade by Sex (Boy, Girl)
Z = -2.3449, p-value = 0.01763
alternative hypothesis: true mu is not equal to 0
95 percent confidence interval:
-10 -1
sample estimates:
difference in location
-4
Thanks for pointing it out! So if I understand correctly it's a bit like the Student's t-test for paired samples which uses the mean of the differences between samples x and y. I have corrected the article.
Documentation - section: Details: http://finzi.psych.upenn.edu/R/library/stats/html/wilcox.test.html: