Learn R Programming

ncg (version 0.1.1)

dgammanc: Computes the probability density function of the noncentral gamma function

Description

Computes the probability density function of the noncentral gamma function: $$f(x; \alpha, \delta)=\sum_{i=0}^\infty \frac{e^{-\delta/2}(\delta/2)^{i}}{i!}\left[\frac{1}{\Gamma(\alpha+i)}e^{-x} x^{\alpha + i - 1}\right]$$ where $\Gamma(\alpha)$ is the central complete gamma function, $\alpha>0$, $\delta>0$, $x\ge 0$.

Usage

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:

Examples

Run this code
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)

Run the code above in your browser using DataLab