Hello, That's a very difficult question. See
Marsaglia, Tsang, Wang (2003) http://www.jstatsoft.org/v08/i18/ Simard, L'Ecuyer (2011) http://www.jstatsoft.org/v39/i11 R's ks functions are a port of Marsaglia et al. to the .C interface. Rui Barradas maxbre wrote > > thanks rui > > that's what I was looking for > > I have another related question: > - why of the difference between the max distance D calculated with > ks.test() and the max distance D “manually” calculated as in (2)? > > I guess it has something to do with the fact that KS is obtained with a > maximisation that depends on the range of x values not necessarly > coincident in the two different approaches > > ...any thought about this? > > maxbre > -- View this message in context: http://r.789695.n4.nabble.com/Kolmogorov-Smirnov-test-and-the-plot-of-max-distance-between-two-ecdf-curves-tp4631437p4631571.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.