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

View source: R/cdf.discrete.R

cdf.discreteR Documentation

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.

Details

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

Author(s)

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

Examples

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

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.