GC {SpatGC}R Documentation

Gamma-Count (GC) Distribution

Description

Density, distribution function, quantile function and random generation for the GC distribution with parameters \alpha and \gamma.

Usage

G(alpha, gamma)

dGC(y, alpha, gamma)

pGC(q, alpha, gamma, lower.tail = TRUE)

qGC(p, alpha = 1, gamma)

rGC(n = 1, alpha = 1, gamma = gamma, method = "PF")

Arguments

alpha

the dispersion parameter of GC: default is 1; (shape parameter of waiting time variable);

gamma

the rate parameter of GC and waiting time variable;

y

a vector or matrix of observations for which the pdf needs to be computed.

q

a vector or matrix of quantiles for which the cdf needs to be computed.

lower.tail

logical; if TRUE (default), probabilities are P(Y \ge y); otherwise, P(Y > y).

p

a vector or matrix of probabilities for which the quantile needs to be computed.

n

number of random values to be generated.

method

Character string. The method used for generating random variables from the GC distribution in 'rGC'. Options are: - '"PF"': Based on the probability function. - '"IT"': Inverse transformation method based on the quantile function. - '"WT"': Based on the waiting times distribution.

Details

The GC distribution with parameters \alpha and \gamma has the density

P(Y_T=y)=G(y\alpha,\gamma T)-G\left(\left(y+1\right)\alpha,\gamma T\right)

where

G(n\alpha,\gamma T)=\frac{1}{\Gamma(n\alpha)}\int_{0}^{\gamma T} u^{n\alpha-1}\exp(-u)du

for \alpha and \lambda which must be positive values and y \in \{0, 1, 2, \ldots\}.

Value

G gives the G function, pGC gives the distribution function, dGC gives the density, qGC gives the quantile function and rGC generates random variables from the GC Distribution.

References

Winkelmann, R. (1995). Duration dependence and dispersion in count-data models. Journal of Business & Economic Statistics, 13(4):467-474. Nadifar, M., Baghishani, H., and Fallah, A. (2023). A flexible generalized poisson likelihood for spatial counts constructed by renewal theory, motivated by groundwater quality assessment. Journal of Agricultural, Biological, and Environmental Statistics, 28:726-748. Neutrosophic Sets and Systems, 22, 30-38.

Examples

# In a study, the number of disease incidence, we will calculate
# the probability that the number of disease is zero with rate 1
dGC(0, alpha = 1, gamma = 1)

# the probability that the disease will receive at least one
pGC(q = 1, alpha = 1, gamma = 1, lower.tail = FALSE)
# the probability that the disease will receive at most three
pGC(q = 3, alpha = 1, gamma = 1, lower.tail = TRUE)
# Calcaute the quantiles
qGC(p = c(0.25, 0.5, 0.75), alpha = 1, gamma = 1)
# Simulate 10 values from GC(1, 1)
rGC(n = 10, alpha = 1, gamma = 1, method = "PF")

[Package SpatGC version 0.1.0 Index]