docc: The Extended Occupancy Distribution

Description Usage Arguments Details Value References Examples

View source: R/docc.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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[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

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

1
2
3
4
x <- rocc(10, 2, 2)
p <- pocc(x, 2, 2)
stopifnot(x == qocc(p, 2, 2))
docc.all(2,2)

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

Related to docc in occupancy...