Description Usage Arguments Details Value
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.
1 2 3 4 5 6 7 |
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 |
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.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.