hP {DGLMExtPois} | R Documentation |
The hyper-Poisson Distribution
Description
Density, distribution function and random generation for the hyper-Poisson
distribution with parameters gamma
and lambda
.
Usage
dhP(x, gamma, lambda)
phP(q, gamma, lambda, lower.tail = TRUE)
rhP(n, gamma, lambda)
Arguments
x |
vector of (non-negative integer) quantiles. |
gamma |
dispersion parameter. Must be strictly positive. |
lambda |
location parameter. Must be strictly positive. |
q |
vector of quantiles. |
lower.tail |
logical; if |
n |
number of random values to return. |
Value
dhP
gives the density, phP
gives the distribution
function and rhP
generates random deviates.
Invalid gamma
or lambda
will result in return value
NaN
, with a warning.
The length of the result is determined by n for rhP
, and is the
maximum of the lengths of the numerical arguments for the other functions.
The numerical arguments other than n
are recycled to the length of
the result. Only the first element of the logical arguments is used.
Examples
## density function for hyper-Poisson
dhP(3, 15, 2)
## distribution function for hyper-Poisson
phP(3, 15, 2)
## random generation for the hyper-Poisson
rhP(10, 15, 2)