Learn R Programming

ncg (version 0.1.1)

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

Description

Computes quantile of the noncentral gamma function: $$I_x(\alpha, \delta) = P(X\le x)= \sum_{i=0}^\infty \frac{e^{-\delta/2}(\delta/2)^i}{i!} I_x(\alpha+i)$$ where $I_x(\alpha)$ is the central incomplete gamma function, $\alpha>0$, $\delta>0$, $x\ge 0$.

Usage

qgammanc(p, alpha, delta)

Arguments

p
a vector of cumulative probability values.
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)
p <- c(0.80, 0.98, 0.24)
alpha <- c(1.5, 1.2, 2.1)
delta <- c(0.2, 0.3, 1.5)
qgammanc(p, alpha, delta)
# single values example
qgammanc(0.98, 1.2, 0.3)

Run the code above in your browser using DataLab