So a classmate and I are working with the same data and code for a problem in a data analysis class. My code for this section looks like this:
aml <- c(1.56, 1.28, 1.94, 1.15, 1.31, 1.92, 0.91, 0.96) natl <- c(1.17,0.76, 1.24, 1.01, 1.26, 1.18, 0.80) ks.test(aml, natl, alternative = "less")
When I run this code I get
D^- = 0.625, p-value = 0.05411
When he runs the code he gets
D^- = 0.625, p-value = 0.027055
There is no difference in our inputs, however, where my output says "Two-sample Kolmogorov-Smirnov test," His output says " Exact Two-sample Kolmogorov-Smirnov test."
At first I tried to see if I could get the same result as him by using:
ks.test(aml, natl, alternative = "less", exact = T)
But this didn't change anything. He also tried using:
ks.test(aml, natl, alternative = "less", exact = F)
But he still got his original answer.
We've tried everything to reconcile this difference. We've tried sweeping environments, restarting R, checking our numbers, etc. etc. etc. Does anyone know what's happening here?