Learn R Programming

NSM3 (version 1.1)

ecdf.ks.CI: Kolmogorov's Confidence Band

Description

Function to compute and plot Kolmogorov's 95% confidence band for the distribution function F(x). This code is adapted from the code by Kjetil Halvorsen found at: https://stat.ethz.ch/pipermail/r-help/2003-July/036643.html

Usage

ecdf.ks.CI(x, main = NULL, sub = NULL, xlab = deparse(substitute(x)), ...)

Arguments

Value

The function returns a list with three elements:lowerthe values of the lower part of the confidence bandupperthe values of the upper part of the confidence bandDthe value of Kolmogorov's D statistic

Examples

Run this code
methyl<-c(42, 43, 51, 61, 66, 69, 71, 81, 82, 82)
ecdf.ks.CI(methyl)

ecdf.ks.CI(methyl, lwd=2, main="KS Confidence Bands")

Run the code above in your browser using DataLab