docc {occupancy} | R Documentation |
The Extended Occupancy Distribution
Description
Density, distribution function, quantile function and random generation for the extended occupancy distribution with size and shape parameters.
Usage
docc(x, size, space, prob = 1, approx = FALSE, log = FALSE)
docc.all(max.size, space, prob = 1, approx = FALSE, log = FALSE)
pocc(
x,
size,
space,
prob = 1,
approx = FALSE,
log.p = FALSE,
lower.tail = TRUE
)
qocc(
p,
size,
space,
prob = 1,
approx = FALSE,
log.p = FALSE,
lower.tail = TRUE
)
rocc(n, size, space, prob = 1)
Arguments
x |
vector of quantiles. |
size |
The size parameter for the occupancy distribution (number of balls) |
space |
The space parameter for the occupancy distribution (number of bins) |
prob |
The probability parameter for the occupancy distribution (probability of ball occupying its bin) |
approx |
A logical value specifying whether to use the normal approximation to the occupancy distribution |
log |
logical; if TRUE, probabilities p are given as log(p). |
max.size |
The maximum size parameter for the occupancy distribution (number of balls) |
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
docc.all
returns the entire PMF.
Value
If all inputs are correctly specified (i.e., parameters are in allowable range and arguments are integers) then the output will be a vector of probabilities/log-probabilities corresponding to the vector argument x
References
O'Neill, B. (2021) Three distributions in the extended occupancy problem.
Examples
x <- rocc(10, 2, 2)
p <- pocc(x, 2, 2)
stopifnot(x == qocc(p, 2, 2))
docc.all(2,2)