KSgeneral: Computing P-Values of the K-S Test for (Dis)Continuous Null Distribution

Computes a p-value of the one-sample two-sided (or one-sided, as a special case) Kolmogorov-Smirnov (KS) statistic, for any fixed critical level, and an arbitrary, possibly large sample size for a pre-specified purely discrete, mixed or continuous cumulative distribution function (cdf) under the null hypothesis. If a data sample is supplied, 'KSgeneral' computes the p-value corresponding to the value of the KS test statistic computed based on the user provided data sample. The package 'KSgeneral' implements a novel, accurate and efficient method named Exact-KS-FFT, expressing the p-value as a double-boundary non-crossing probability for a homogeneous Poisson process, which is then efficiently computed using Fast Fourier Transform (FFT). The package can also be used to compute and plot the complementary cdf of the KS statistic which is known to depend on the hypothesized distribution when the latter is discontinuous (i.e. purely discrete or mixed). To cite this package in publication use: Dimitrina S. Dimitrova, Vladimir K. Kaishev, and Senren Tan. Computing the Kolmogorov-Smirnov Distribution When the Underlying CDF is Purely Discrete, Mixed, or Continuous. Journal of Statistical Software. 2020; 95(10): 1–42. <doi:10.18637/jss.v095.i10>.

Version: 1.1.3
Depends: R (≥ 3.3.0)
Imports: Rcpp (≥ 0.12.12), MASS, dgof
LinkingTo: Rcpp
Published: 2024-03-15
Author: Dimitrina S. Dimitrova, Yun Jia, Vladimir K. Kaishev and Senren Tan
Maintainer: Dimitrina S. Dimitrova <D.Dimitrova at city.ac.uk>
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2.0)]
Copyright: Copyright holders of FFTW3: Copyright (c) 2003, 2007-11 Matteo Frigo; Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
URL: https://github.com/raymondtsr/KSgeneral
NeedsCompilation: yes
SystemRequirements: fftw3 (>=3.3.4)
Citation: KSgeneral citation info
CRAN checks: KSgeneral results

Documentation:

Reference manual: KSgeneral.pdf

Downloads:

Package source: KSgeneral_1.1.3.tar.gz
Windows binaries: r-devel: KSgeneral_1.1.3.zip, r-release: KSgeneral_1.1.3.zip, r-oldrel: KSgeneral_1.1.3.zip
macOS binaries: r-release (arm64): KSgeneral_1.1.3.tgz, r-oldrel (arm64): KSgeneral_1.1.3.tgz, r-release (x86_64): KSgeneral_1.1.3.tgz
Old sources: KSgeneral archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=KSgeneral to link to this page.