Implements the Lilliefors-corrected Kolmogorov-Smirnov test for use
in goodness-of-fit tests, suitable when population parameters are unknown and
must be estimated by sample statistics. P-values are estimated by simulation.
Can be used with a variety of continuous distributions, including normal,
lognormal, univariate mixtures of normals, uniform, loguniform, exponential,
gamma, and Weibull distributions. Functions to generate random numbers and
calculate density, distribution, and quantile functions are provided for use
with the log uniform and mixture distributions.

Computing P-Values of the K-S Test for (Dis)Continuous Null
Distribution
Dimitrina S. Dimitrova <D.Dimitrova@city.ac.uk>
Vladimir K. Kaishev <Vladimir.Kaishev.1@city.ac.uk>
Senren Tan <senren.tan@cass.city.ac.uk>
Copyright holders of FFTW3: Copyright (c) 2003, 2007-11
Matteo Frigo; Copyright (c) 2003, 2007-11 Massachusetts
Institute of Technology
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).

Dimitrina S. Dimitrova <D.Dimitrova@city.ac.uk>,
Vladimir K. Kaishev <Vladimir.Kaishev.1@city.ac.uk> and
Senren Tan <senren.tan@cass.city.ac.uk>