Learn R Programming

lmomco (version 2.5.3)

pdfgdd: Probability Density Function of the Gamma Difference Distribution

Description

This function computes the probability density of the Gamma Difference distribution (Klar, 2015) given parameters (\(\alpha_1 > 0\), \(\beta_1 > 0\), \(\alpha_2 > 0\), \(\beta_2 > 0\)) computed by pargdd.

$$f(x, x > 0) = c e^{+\beta_2x}\int_{+x}^\infty z^{\alpha_1-1} (z-x)^{\alpha_2 - 1} e^{-(\beta_1+\beta_2)z}\, \mathrm{d}z\mbox{,}$$

and

$$f(x, x < 0) = c e^{-\beta_1x}\int_{-x}^\infty z^{\alpha_2-1} (z+x)^{\alpha_1 - 1} e^{-(\beta_1+\beta_2)z}\, \mathrm{d}z\mbox{,}$$

where \(c\) is defined as

$$c = \frac{\beta_1^{\alpha_1} \beta_2^{\alpha_2}}{\Gamma(\alpha_1) \Gamma(\alpha_2)}\mbox{,}$$

where \(\Gamma(y)\) is the complete gamma function.

Usage

pdfgdd(x, para, paracheck=TRUE, silent=TRUE, ...)

Value

Probability density (\(f\)) for \(x\).

Arguments

x

A real value vector.

para

The parameters from pargdd or vec2par.

paracheck

A logical controlling whether the parameters are checked for validity.

silent

The argument of silent for the try() operation wrapped on integrate().

...

Additional argument to pass.

Author

W.H. Asquith

References

Klar, B., 2015, A note on gamma difference distributions: Journal of Statistical Computation and Simulation v. 85, no. 18, pp. 1--8, tools:::Rd_expr_doi("10.1080/00949655.2014.996566").

See Also

cdfgdd, quagdd, lmomgdd, pargdd