[R] Kolmogorov-Smirnoff test

Jasjeet Singh Sekhon sekhon at berkeley.edu
Wed Nov 7 21:29:59 CET 2007

A bootstrap Kolmogorov-Smirnoff test will have the correct test level
even if there are ties---i.e., even if non-continuous distributions
are being compared.  See Abadie, Alberto. 2002. ``Bootstrap Tests for
Distributional Treatment Effects in Instrumental Variable Models.'' 
Journal of the American Statistical Association, 97:457 (March)

The algorithm is implemented in the ks.boot function of the Matching
package: http://sekhon.berkeley.edu/matching/ks.boot.html


Jasjeet S. Sekhon

Associate Professor
Travers Department of Political Science
Survey Research Center
UC Berkeley

V: 510-642-9974  F: 617-507-5524

Oarabile Molaodi writes:
 > I am trying to determine whether two samples are identical or not. I'm 
 > aware that somebody can use the Kolmogorov-Smirnoff test to compare 
 > empirical distributions, but since my samples have ties I'm not sure if 
 > I'm getting the right p-values for the comparison. Can the 
 > Kolmogorov-Smirnoff test be adjusted for the case when ties exists and 
 > are there any functions that already exists in R ( Kolmogorov-Smirnoff 
 > test )performing  that can be used in the case of the existance of ties?
 > Thank you in advance for your help.
 > Oarabile

More information about the R-help mailing list