KolmogorovDist {distrEx}  R Documentation 
Generic function for the computation of the Kolmogorov distance of two distributions
Description
Generic function for the computation of the Kolmogorov distance d_\kappa
of two distributions P
and Q
where the distributions are defined
on a finitedimensional Euclidean space (\R^m,{\cal B}^m)
with {\cal B}^m
the Borel\sigma
algebra on R^m
.
The Kolmogorov distance is defined as
d_\kappa(P,Q)=\sup\{P(\{y\in\R^m\,\,y\le x\})Q(\{y\in\R^m\,\,y\le x\})  x\in\R^m\}
where \le
is coordinatewise on \R^m
.
Usage
KolmogorovDist(e1, e2, ...)
## S4 method for signature 'AbscontDistribution,AbscontDistribution'
KolmogorovDist(e1,e2, ...)
## S4 method for signature 'AbscontDistribution,DiscreteDistribution'
KolmogorovDist(e1,e2, ...)
## S4 method for signature 'DiscreteDistribution,AbscontDistribution'
KolmogorovDist(e1,e2, ...)
## S4 method for signature 'DiscreteDistribution,DiscreteDistribution'
KolmogorovDist(e1,e2, ...)
## S4 method for signature 'numeric,UnivariateDistribution'
KolmogorovDist(e1, e2, ...)
## S4 method for signature 'UnivariateDistribution,numeric'
KolmogorovDist(e1, e2, ...)
## S4 method for signature 'AcDcLcDistribution,AcDcLcDistribution'
KolmogorovDist(e1, e2, ...)
Arguments
e1 
object of class 
e2 
object of class 
... 
further arguments to be used in particular methods (not in package distrEx) 
Value
Kolmogorov distance of e1
and e2
Methods
 e1 = "AbscontDistribution", e2 = "AbscontDistribution":

Kolmogorov distance of two absolutely continuous univariate distributions which is computed using a union of a (pseudo)random and a deterministic grid.
 e1 = "DiscreteDistribution", e2 = "DiscreteDistribution":

Kolmogorov distance of two discrete univariate distributions. The distance is attained at some point of the union of the supports of
e1
ande2
.  e1 = "AbscontDistribution", e2 = "DiscreteDistribution":

Kolmogorov distance of absolutely continuous and discrete univariate distributions. It is computed using a union of a (pseudo)random and a deterministic grid in combination with the support of
e2
.  e1 = "DiscreteDistribution", e2 = "AbscontDistribution":

Kolmogorov distance of discrete and absolutely continuous univariate distributions. It is computed using a union of a (pseudo)random and a deterministic grid in combination with the support of
e1
.  e1 = "numeric", e2 = "UnivariateDistribution":

Kolmogorov distance between (empirical) data and a univariate distribution. The computation is based on
ks.test
.  e1 = "UnivariateDistribution", e2 = "numeric":

Kolmogorov distance between (empirical) data and a univariate distribution. The computation is based on
ks.test
.  e1 = "AcDcLcDistribution", e2 = "AcDcLcDistribution":

Kolmogorov distance of mixed discrete and absolutely continuous univariate distributions. It is computed using a union of the discrete part, a (pseudo)random and a deterministic grid in combination with the support of
e1
.
Author(s)
Matthias Kohl Matthias.Kohl@stamats.de,
Peter Ruckdeschel peter.ruckdeschel@unioldenburg.de
References
Huber, P.J. (1981) Robust Statistics. New York: Wiley.
Rieder, H. (1994) Robust Asymptotic Statistics. New York: Springer.
See Also
ContaminationSize
, TotalVarDist
,
HellingerDist
, Distributionclass
Examples
KolmogorovDist(Norm(), UnivarMixingDistribution(Norm(1,2),Norm(0.5,3),
mixCoeff=c(0.2,0.8)))
KolmogorovDist(Norm(), Td(10))
KolmogorovDist(Norm(mean = 50, sd = sqrt(25)), Binom(size = 100))
KolmogorovDist(Pois(10), Binom(size = 20))
KolmogorovDist(Norm(), rnorm(100))
KolmogorovDist((rbinom(50, size = 20, prob = 0.5)10)/sqrt(5), Norm())
KolmogorovDist(rbinom(50, size = 20, prob = 0.5), Binom(size = 20, prob = 0.5))