Is there a package in R for the Kolmogorov distribution which allows me to plot density, distribution, calculates quantiles, etc.?
The Kolmogorov distribution arises from $K=\sup|B|$, where $B$ is a Brownian bridge. Its values are usually tabulated, so I thought it would have its own function in R, like the normal distribution.
It seems ks.test()
uses this for cdf:
pkolmogorov1x <- function(x, n) {
if (x <= 0)
return(0)
if (x >= 1)
return(1)
j <- seq.int(from = 0, to = floor(n * (1 -
x)))
1 - x * sum(exp(lchoose(n, j) + (n - j) * log(1 -
x - j/n) + (j - 1) * log(x + j/n)))
}