Learn R Programming

CDFt (version 1.2)

CramerVonMisesTwoSamples: Computation of the two-sample Cramer-von Mises statistics

Description

This function computes the two-sample Cramer-von Mises statistics U.

Usage

CramerVonMisesTwoSamples(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

U: The value of the Cramer-von Mises statistics.

Details

CDF1 and CDF2 are estimated empirically to compute the two-sample Cramer-von Mises statistics.

References

T.W. Anderson "On the distribution of the Two-sample Cramer-von Mises criterion". The Annals of Mathematical Statistics, 33 (3), 1148-1159 (1962).

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

KolmogorovSmirnov,CDFt

Examples

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

Run the code above in your browser using DataLab