KSd: Approximate Critical Values for Kolmogorov-Smirnov's D

View source: R/KS-confint.R

KSdR Documentation

Approximate Critical Values for Kolmogorov-Smirnov's D

Description

Computes the critical value for Kolmogorov-Smirnov's D_n, for sample sizes n \ge 10 and confidence level 95%.

Usage

KSd(n)

Arguments

n

the sample size, n >= 10.

Details

Based on tables values given in the reference below. For n\le 80 uses interpolations from exact values, elsewhere uses asymptotic approximation.

Value

The critical value for D (two-sided) for significance level 0.05 (or confidence level 95%).

Author(s)

Kjetil Halvorsen and Martin Maechler

References

Peter J. Bickel and Kjell A. Doksum (1977), Mathematical Statistics: Basic Ideas and Selected Topics. Holden Day. Section 9.6 and table IX.

See Also

Is used from ecdf.ksCI.

Examples

KSd(90)
KSd(1:9)# now works

op <- par(mfrow=c(2,1))
  plot(KSd, 10, 150)# nice
  abline(v = c(75,85), col = "gray")
  plot(KSd, 79, 81, n = 1001)# *very* tiny discontinuity at 80
par(op)

sfsmisc documentation built on Aug. 10, 2023, 5:06 p.m.