Description Usage Arguments Details Note Author(s) References See Also Examples
Evaluates explicit formulae for the lower and upper
incomplete gamma functions in terms of complementary
error function by calling CalIncLapInt
.
1 | gamma_inc_err(x, lambda, bit, lower = FALSE)
|
x |
Argument, |
lambda |
Argument, λ = \pm(j + \frac{1}{2}) with j = 0, 1, 2, …. |
lower |
Logical. Lower incomplete gamma function is
calculated if |
bit |
Precision bit. A positive integer greater or equal 100. |
The lower incomplete gamma function is given by
γ(x, λ) = \int_0^x e^{-t}\,t^{λ - 1}\, dt.
This function evaluates formulae in terms of complementary error function for γ(x, λ) and its upper counterpart when λ = \pm(j + \frac{1}{2}). Currently, such formulae are only available when λ = \pm\frac{1}{2}.
Thanh T. Tran frmqa.package@gmail.com
Olver, F.W.J., Lozier, D.W., Boisver, R.F. and Clark, C.W (2010) Handbook of Mathematical Functions. New York: National Institute of Standards and Technology, and Cambridge University Press.
Tran, T. T (2011) Some Problems Concerning the Generalized Hyperbolic and Related Distributions. Ph.D Thesis. The University of Auckland, New Zealand.
Tran, T. T., Yee, W.T. and Tee, J.G (2012) Formulae for the Extended Laplace Integral and Their Statistical Applications. Working Paper.
Watson, G.N (1931) A Treatise on the Theory of Bessel Functions and Their Applications to Physics. London: MacMillan and Co.
CalIncLapInt
, besselK_inc_clo
, pgig
1 2 3 4 5 6 7 8 9 10 11 12 | ## Accuracy tests
x <- 3
lambda <- 3/2
lower <- sapply(lambda, function(w.)
gamma_inc_err(x, lambda = w., 200, lower = TRUE))
upper <- sapply(lambda, function(w.)
gamma_inc_err(x, lambda = w., 200, lower = FALSE))
## sum of two parts
(lower + upper)
## equals the whole function
(gamma(lambda))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.