doccgap: The Occupancy-Gap Distribution

Description Usage Arguments Details Value References Note Examples

View source: R/doccgap.R

Description

Density, distribution function, quantile function and random generation for the Occupancy-Gap Distribution with size and scale parameters (see note).

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
doccgap(
  x,
  size,
  space = NULL,
  occupancy = size,
  prob = NULL,
  scale = NULL,
  log = FALSE
)

doccgap.all(
  size,
  space = NULL,
  max.occupancy = size,
  prob = NULL,
  scale = NULL,
  log = FALSE
)

poccgap(
  x,
  size,
  space = NULL,
  occupancy = size,
  prob = NULL,
  scale = NULL,
  log.p = FALSE,
  lower.tail = TRUE
)

qoccgap(
  p,
  size,
  space = NULL,
  occupancy = size,
  prob = NULL,
  scale = NULL,
  log.p = FALSE,
  lower.tail = TRUE
)

roccgap(n, size, space = NULL, occupancy = size, prob = NULL, scale = NULL)

Arguments

x

vector of quantiles.

size

The size parameter for the occupancy-gap distribution (number of balls)

space

The space parameter for the occupancy-gap distribution (number of bins)

occupancy

The occupancy parameter for the occupancy-gap distribution (number of occupied bins)

prob

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

scale

The scale parameter for the occupancy-gap distribution

log

logical; if TRUE, probabilities p are given as log(p).

max.occupancy

The maximum occupancy parameter for the occupancy-gap 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[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.

This function computes probabilities or log-probabilities from the mass function of the occupancy-gap distribution. The computation method uses a recursive algorithm from the following paper:

Value

If all inputs are correctly specified (i.e., parameters are in allowable range) then the output will be a matrix of probabilities/log-probabilities

References

O'Neill, B. (forthcoming) An examination of the occupancy-gap distribution.

Note

The distribution is parameterised by a scale parameter, but in applied problems in the context of the extended occupancy problem this parameter is a function of space and prob parameters. The function allows either parameterisation (i.e., the user can either specify the scale paramater or both the space and prob parameters).

Examples

1
2
3
4
x <- roccgap(10, 20, 2, 2, .5)
p <- poccgap(x, 20, 2, 2, .5)
stopifnot(x == qoccgap(p, 20, 2, 2, .5))
doccgap.all(20, 2, 2, .5)

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

Related to doccgap in occupancy...