A new method based on density estimation is proposed for medians of two independent samples. The test controls the probability of Type I error and is at least as powerful as methods widely used in statistical practice. The method can be implemented using existing libraries in R.
Bichutskiy, Vadim Y.
"A Pooled Two-Sample Median Test Based on Density Estimation,"
Journal of Modern Applied Statistical Methods:
2, Article 28.
Available at: http://digitalcommons.wayne.edu/jmasm/vol10/iss2/28