Nonparametric Goodness-of-Fit Tests for Discrete Null Distributions

Methodology extending nonparametric goodness-of-fit tests to discrete null distributions has existed for several decades. However, modern statistical software has generally failed to provide this methodology to users. We offer a revision of R’s ks.test() function and a new cvm.test() function that fill this need in the R language for two of the most popular nonparametric goodness-of-fit tests. This paper describes these contributions and provides examples of their usage. Particular attention is given to various numerical issues that arise in their implementation.

Taylor B. Arnold , John W. Emerson

CRAN packages used

dgof, nortest, ADGofTest, CvM2SL1Test, CvM2SL2Test, cramer

CRAN Task Views implied by cited packages



Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Arnold & Emerson, "The R Journal: Nonparametric Goodness-of-Fit Tests for Discrete Null Distributions", The R Journal, 2011

BibTeX citation

  author = {Arnold, Taylor B. and Emerson, John W.},
  title = {The R Journal: Nonparametric Goodness-of-Fit Tests for Discrete Null Distributions},
  journal = {The R Journal},
  year = {2011},
  note = {},
  doi = {10.32614/RJ-2011-016},
  volume = {3},
  issue = {2},
  issn = {2073-4859},
  pages = {34-39}