Hello,

I was trying to test whether two medians are identical or not and used the 
function “mood.test” from the “stats" package. My co-author, a medical doctor, 
was trying to do the same in SPSS and had different results. 

I wanted to see whether there was a problem on my end and also used the 
function “mood.medtest” from the “RVAideMemoire” package. I find different 
results while I am under the impression that both functions claim to carry out 
the same test and have the same defaults. While my actual data is sensitive 
medical information, I provide simple code below for a reproducible example. 

library(RVAideMemoire)
set.seed(123)
a <- runif(100)
b <- runif(120,0.2,1.1)
indicator <- c(rep(0,100),rep(1,120))
x <- c(a,b)
mood.test(x ~ indicator)
mood.medtest(x ~ indicator)

Has anybody encounter this problem before or would be able to provide any 
insights?

Best wishes,
Lucas





______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to