dnegocc {occupancy} | R Documentation |
The Negative Occupancy Distribution
Description
Density, distribution function, quantile function and random generation for the negative occupancy distribution with space and occupancy parameters.
Usage
dnegocc(x, space, occupancy, prob = 1, approx = FALSE, log = FALSE)
dnegocc.all(max.x, space, max.occupancy, prob = 1, approx = FALSE, log = FALSE)
pnegocc(
x,
space,
occupancy,
prob = 1,
approx = FALSE,
log.p = FALSE,
lower.tail = TRUE
)
qnegocc(
p,
space,
occupancy,
prob = 1,
approx = FALSE,
log.p = FALSE,
lower.tail = TRUE
)
rnegocc(n, space, occupancy, prob = 1)
Arguments
x |
vector of quantiles. |
space |
The space parameter for the negative occupancy distribution (number of bins) |
occupancy |
The occupancy parameter for the negative occupancy distribution (number of occupied bins) |
prob |
The probability parameter for the negative occupancy distribution (probability of ball occupying its bin) |
approx |
A logical value specifying whether to use an approximation for the distribution |
log |
logical; if TRUE, probabilities p are given as log(p). |
max.x |
A vector of numeric values to be used as arguments for the mass function |
max.occupancy |
The maximum occupancy parameter for the negative occupancy distribution (number of occupied bins) |
log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
Details
dnegcount.all
returns the entire PMF.
The computation method uses a recursive algorithm described in the reference.
Value
If all inputs are correctly specified (i.e., parameters are in allowable range and arguments are integers) then the output will be a matrix of probabilities/log-probabilities
References
O'Neill, B. (2021) An examination of the negative-occupancy distribution and the coupon-collector distribution.
Examples
x <- rnegocc(10, 2, 2)
p <- pnegocc(x, 2, 2)
qnegocc(0:9/10, 2, 2)
dnegocc.all(5,2,2)