COMPSTAT 2018: Start Registration
View Submission - COMPSTAT2018
A0385
Title: Computing p-values of the Kolmogorov-Smirnov test for (dis)continuous null distribution: R package KSgeneral Authors:  Senren Tan - Cass Business School, City, University of London (United Kingdom) [presenting]
Dimitrina Dimitrova - Cass Business School - City - University of London (United Kingdom)
Vladimir Kaishev - Cass Business School - City - University of London (United Kingdom)
Abstract: The distribution of the Kolmogorov-Smirnov (K-S) test statistic has been widely studied under the assumption that the underlying theoretical cumulative distribution function (cdf), F(x), is continuous. However, there are many real-life applications in which fitting discrete or mixed distributions is required. Nevertheless, due to inherent difficulties, the distribution of the K-S statistic when F(x) has jump discontinuities has been studied to a much lesser extent and no exact and efficient computational methods have been proposed in the literature. A fast and accurate method to compute the (complementary) cdf of the K-S statistic when F(x) is discontinuous is provided, and thus exact p-values of the K-S test are obtained. The approach is to express the complementary cdf through the rectangle probability for uniform order statistics, and to compute it using Fast Fourier Transform (FFT). Secondly, a C++ and an R implementation of the proposed method are provided, which fills in the existing gap in statistical software. The numerical performance of the proposed FFT-based method, implemented both in C++ and in the R package KSgeneral, is illustrated when F(x) is mixed, purely discrete, and continuous.