dHYPERPO: The hyper-Poisson distribution

View source: R/dHYPERPO.R

dHYPERPOR Documentation

The hyper-Poisson distribution

Description

These functions define the density, distribution function, quantile function and random generation for the hyper-Poisson, HYPERPO(), distribution with parameters \mu and \sigma.

Usage

dHYPERPO(x, mu = 1, sigma = 1, log = FALSE)

pHYPERPO(q, mu = 1, sigma = 1, lower.tail = TRUE, log.p = FALSE)

rHYPERPO(n, mu = 1, sigma = 1)

qHYPERPO(p, mu = 1, sigma = 1, lower.tail = TRUE, log.p = FALSE)

Arguments

x, q

vector of (non-negative integer) quantiles.

mu

vector of the mu parameter.

sigma

vector of the sigma parameter.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].

n

number of random values to return.

p

vector of probabilities.

Details

The hyper-Poisson distribution with parameters \mu and \sigma has a support 0, 1, 2, ... and density given by

f(x | \mu, \sigma) = \frac{\mu^x}{_1F_1(1;\mu;\sigma)}\frac{\Gamma(\sigma)}{\Gamma(x+\sigma)}

where the function _1F_1(a;c;z) is defined as

_1F_1(a;c;z) = \sum_{r=0}^{\infty}\frac{(a)_r}{(c)_r}\frac{z^r}{r!}

and (a)_r = \frac{\gamma(a+r)}{\gamma(a)} for a>0 and r positive integer.

Note: in this implementation we changed the original parameters \lambda and \gamma for \mu and \sigma respectively, we did it to implement this distribution within gamlss framework.

Value

dHYPERPO gives the density, pHYPERPO gives the distribution function, qHYPERPO gives the quantile function, rHYPERPO generates random deviates.


fhernanb/prueba documentation built on March 29, 2025, 6:42 p.m.