Computes the probability density function of the noncentral gamma function

Share:

Description

Computes the probability density function of the noncentral gamma function:

f(x; α, δ)=∑_{i=0}^∞ \frac{e^{-δ/2}(δ/2)^{i}}{i!}≤ft[\frac{1}{Γ(α+i)}e^{-x} x^{α + i - 1}\right]

where Γ(α) is the central complete gamma function, α>0, δ>0, x≥ 0.

Usage

1
dgammanc(x, alpha, delta)

Arguments

x

a vector of positive quantiles.

alpha

a vector of the noncentral gamma parameter, alpha > 0.

delta

a vector of the noncentrality parameter, delta > 0.

References

Oliveira, IRC; Ferreira, DF Computing the noncentral gamma distribution, its inverse and the noncentrality parameter. Computational Statistics. Submmited for publications. 2012.

See Also

Package homepage: <www.dex.ufla.br/~danielff/r_rsources.html>

Examples

1
2
3
4
5
6
7
library(ncg)
x     <- c(2, 3, 2)
alpha <- c(2.5, 1.7, 0.9)
delta <- c(0.5, 0.2, 0.01)
dgammanc(x, alpha, delta)
# single values example
dgammanc(3, 1.9, 0.05)