Both simultaneous and pointwise confidence intervals come in a
finite-sample and an asymptotic version;
the finite sample versions will get quite slow
for large data sets x
, so in these cases the asymptotic version
will be preferrable.
For simultaneous intervals,
the finite sample version is based on C function "pkolmogorov2x"
from package stats, while the asymptotic one uses
R function pkstwo
again from package stats, both taken
from the code to ks.test
.
Both finite sample and asymptotic versions use the fact,
that the distribution of the supremal distance between the
empirical distribution \(\hat F_n\) and the corresponding theoretical one
\(F\) (assuming data from \(F\))
does not depend on \(F\) for continuous distribution \(F\)
and leads to the Kolmogorov distribution (compare, e.g. Durbin(1973)).
In case of \(F\) with jumps, the corresponding Kolmogorov distribution
is used to produce conservative intervals.
For pointwise intervals,
the finite sample version is based on corresponding binomial distributions,
(compare e.g., Fisz(1963)), while the asymptotic one uses a CLT approximation
for this binomial distribution. In fact, this approximation is only valid
for distributions with strictly positive density at the evaluation quantiles.
In the finite sample version, the binomial distributions will in general not
be symmetric, so that, by setting nosym.pCI
to TRUE
we may
produce shortest asymmetric confidence intervals (albeit with a considerable
computational effort).
The symmetric intervals returned by default will
be conservative (which also applies to distributions with jumps in this case).
For distributions with jumps or with density (nearly) equal to 0 at the
corresponding quantile, we use the approximation of (D-E(D))/sd(D)
by the standard normal at these points; this latter approximation is only
available if package distrEx is installed; otherwise the corresponding
columns will be filled with NA
.