Learn R Programming

ncg (version 0.1.1)

ncg: Computes the noncentral gamma functions: pdf, cdf, quantiles and noncentrality parameter.

Description

Computes the noncentral gamma functions: pdf, cdf, quantiles and noncentrality parameter. This functions uses the mixture of incomplete gamma variable with Poisson weights.

Arguments

Details

given x: vector of positive quantiles; alpha > 0 noncentral gamma parameter; and delta: noncentrality parameter

dgammanc(x, alpha, delta) - computes the pdf of the noncetral gamma function pgammanc(x, alpha, delta) - computes the cdf of the noncetral gamma function

given p: vector of cumulative probabilities and alpha>0 and delta >0

qgammanc(p, alpha, delta) - computes quantiles of the noncetral gamma function

given x: vector of positive quantiles; alpha > 0 noncentral gamma parameter; and 0 < p < 1.

deltagammanc(x, alpha, p) - computes the noncentrality parameter of the noncetral gamma function

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(1.5, 1.1, 0.8) 
delta <- 2
pgammanc(x, alpha, delta)
dgammanc(x, alpha, delta)
p <- 0.30
delta <- deltagammanc(x, alpha, p)
delta
p <- c(0.80, 0.98, 0.24)
delta <- 0.2
qgammanc(p, alpha, delta)

Run the code above in your browser using DataLab