dmaxcount: The Maximum-Count Occupancy Distribution

Description Usage Arguments Details Value References Examples

View source: R/dmaxcount.R

Description

Density, distribution function, quantile function and random generation for the maximum count occupancy distribution with size and shape parameters.

Usage

1
2
3
4
5
6
7
8
9
dmaxcount(x, size, space, prob = 1, log = FALSE)

dmaxcount.all(max.x, max.size, space, prob = 1, log = FALSE)

pmaxcount(q, size, space, prob = 1, log.p = FALSE, lower.tail = TRUE)

qmaxcount(p, size, space, prob = 1, log.p = FALSE, lower.tail = TRUE)

rmaxcount(n, size, space, prob = 1)

Arguments

x

vector of quantiles.

size

The size parameter for the maximum-count distribution (number of balls)

space

The space parameter for the maximum-count distribution (number of bins)

prob

The probability parameter for the occupancy distribution (probability of ball occupying its bin)

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 probability mass function

max.size

The maximum size parameter for the maximum-count distribution (number of balls)

q

vector of quantiles.

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].

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

dmaxcount.all returns the entire PMF.

This function computes probabilities or log-probabilities from the probability mass function of the maximum-count distribution, which is the distribution for the maximum of the counts for the number of balls in a bin in the extended occupancy problem. Details of the algorithm in the classical case can be found in the papers below. The extension to include the probability parameter is done using the binomial mixture representation of the extended occupancy problem.

Value

If all inputs are correctly specified (i.e., parameters are in allowable range) then the output will be a vector of probabilities/log-probabilities up to the maximum argument values

References

Bonetti, M., Corillo, P. and Ogay, A. (2019) Computing the exact distributions of some functions of the ordered multinomial counts: maximum, minimum, range and sums of order statistics.

Rappeport, M,A. (1968) Algorithms and computational procedures for the application of order statistics to queuing problems. PhD thesis, New York University.

Examples

1
2
3
4
x <- rmaxcount(10, 2, 2)
p <- pmaxcount(x, 2, 2)
stopifnot(x == qmaxcount(p, 2, 2))
dmaxcount.all(2,2,2)

occupancy documentation built on June 24, 2021, 5:06 p.m.