Learn R Programming

RVAideMemoire (version 0.9-83-7)

cdf.discrete: Cumulative Distribution Function of a known discrete distribution

Description

Returns an object similar to what is produced by ecdf, but based on a known discrete distribution.

Usage

cdf.discrete(x, dist = c("binom", "geom", "hyper", "nbinom", "pois"), ...)

Arguments

x

numeric vector of the observations.

dist

character string naming a discrete distribution ("binom" by default).

...

parameters of the distribution specified by dist.

Author

Maxime HERVE <maxime.herve@univ-rennes1.fr>

Details

The function is intended to be used in goodness-of-fits tests for discrete distributions, such as proposed in the dgof package.

Examples

Run this code
if(require(dgof)) {
  set.seed(1124)
  resp <- rpois(20,2)
  cvm.test(resp,cdf.discrete(resp,"pois",2))
}

Run the code above in your browser using DataLab