StationaryGammaCount: The Stationary Gamma-Count Distribution

Description Usage Arguments Details Value

Description

Density, distribution function, quantile function, and random number generation for the stationary gamma-count distribution with time parameter lambda and gamma distribution parameters alpha and beta.

Usage

1
2
3
4
5
6
7
dsgc(x, lambda, alpha = 1, beta = alpha, log = FALSE)

psgc(q, lambda, alpha = 1, beta = alpha, lower.tail = TRUE, log.p = FALSE)

qsgc(p, lambda, alpha = 1, beta = alpha, lower.tail = TRUE, log.p = FALSE)

rsgc(n, lambda, alpha = 1, beta = alpha)

Arguments

x

vector of (non-negative integer) quantiles

lambda

vector of (positive) time length parameters

alpha

vector of (positive) dispersion parameters

beta

vector of (positive) rate parameters. By default, beta = alpha so that arrival times have mean 1.

log, log.p

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

q

vector of quantiles

lower.tail

logical; if TRUE, probabilities are P[X <= x], otherwise P[X > x]

p

vector of probabilities

n

number of random values to return

Details

The stationary gamma-count distribution models the count of events arriving in the interval (0,lambda] when the times between successive events follow a gamma(alpha, beta) distribution. The process (i.e. the arrivals) are assumed to have begun in the infinite past. This is a stationary renewal process with gamma renewal times. lambda * beta / alpha is exactly the mean. This distribution has the Poisson distribution as a special case when alpha = beta = 1.

Note that lambda and beta have the same effect on the count distribution. The distribution of counts only depends on either through the product lambda * beta, so only one needs to be set. Therefore by default, beta = alpha. This way arrival times have mean 1 and lambda can be used to model the mean of the count distribution.

Value

dsgc gives the (log) density, psgc gives the (log) distribution function, qsgc gives the quantile function, and rsgc generates random counts.

Invalid lambda, alpha, or beta will result in return value NaN.

The length of the result is determined by n for rsgc, and the length of the longest numeric argument for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.


ianmtaylor1/gammacount documentation built on April 2, 2021, 8:31 p.m.