CDFt (version 1.2)

KolmogorovSmirnov: Computation of the Kolmogorov-Smirnov statistics

Description

This function computes the Kolmogorov-Smirnov statistics (KS).

Usage

KolmogorovSmirnov(S1, S2)

Arguments

S1

Vector containing the sample 1 from which CDF1 will be estimated.

S2

Vector containing the sample 2 from which CDF2 will be estimated.

Value

Returns the value of the Kolmogorov-Smirnov statistics.

Details

CDF1 and CDF2 are estimated empirically to compute the Kolmogorov-Smirnov statistics.

References

D.A. Darling. "The Kolmogorov-Smirnov, Cramer-von Mises tests", Ann. Math. Statist., 28 (4), 823-838 (1957).

P.-A. Michelangeli, M. Vrac, H. Loukos. "Probabilistic downscaling approaches: Application to wind cumulative distribution functions", Geophys. Res. Lett., doi:10.1029/2009GL038401, 2009.

See Also

CramerVonMisesTwoSamples,CDFt

Examples

Run this code
# NOT RUN {
# generate random values (for the example)
S1 = rnorm(100)
S2 = rnorm(100)
KolmogorovSmirnov(S1, S2)
# }

Run the code above in your browser using DataCamp Workspace