[R] Different results on running Wilcoxon Rank Sum test in R and SPSS

bharat rawlley bh@r@t_m_@|| @end|ng |rom y@hoo@co@|n
Mon Jan 18 18:26:57 CET 2021


Hello, 
On running the Wilcoxon Rank Sum test in R and SPSS, I am getting the following discrepancies which I am unable to explain.
Q1 In the attached data set, I was trying to compare freq4w_n in those with drug_code 0 vs 1. SPSS gives a P value 0.031 vs R gives a P value 0.001779. 
The code I used in R is as follows - 
wilcox.test(freq4w_n, drug_code, conf.int = T)


Q2 Similarly, in the same data set, when trying to compare PFD_n in those with drug_code 0 vs 1, SPSS gives a P value 0.038 vs R gives a P value < 2.2e-16. 
The code I used in R is as follows - 
wilcox.test(PFD_n, drug_code, mu = 0, alternative = "two.sided", correct = TRUE, paired = FALSE, conf.int = TRUE)


I have tried searching on Google and watching some Youtube tutorials, I cannot find an answer, Any help will be really appreciated, Thank you! 


More information about the R-help mailing list