Density, distribution function, quantile function and random generation for the extended occupancy distribution with size and shape parameters.
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)
vector of quantiles.
The size parameter for the occupancy distribution (number of balls)
The space parameter for the occupancy distribution (number of bins)
The probability parameter for the occupancy distribution (probability of ball occupying its bin)
A logical value specifying whether to use the normal approximation to the occupancy distribution
logical; if TRUE, probabilities p are given as log(p).
The maximum size parameter for the occupancy distribution (number of balls)
logical; if TRUE, probabilities p are given as log(p).
logical; if TRUE (default), probabilities are \(P[X \le x]\) otherwise, \(P[X > x]\).
vector of probabilities.
number of observations. If length(n) > 1, the length is taken to be the number required.
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
docc.all returns the entire PMF.
O'Neill, B. (2021) Three distributions in the extended occupancy problem.
# NOT RUN {
x <- rocc(10, 2, 2)
p <- pocc(x, 2, 2)
stopifnot(x == qocc(p, 2, 2))
docc.all(2,2)
# }
Run the code above in your browser using DataLab