cfX_InverseGamma: Characteristic function of the INVERSE GAMMA distribution

View source: R/cfX_InverseGamma.R

cfX_InverseGammaR Documentation

Characteristic function of the INVERSE GAMMA distribution

Description

cfX_InverseGamma(t, alpha, beta, coef, niid) evaluates the characteristic function cf(t) of the INVERSE GAMMA distribution with the shape parameter alpha > 0 and the rate parameter beta > 0.

cfX_InverseGamma is an ALIAS NAME of the more general function cf_InverseGamma, used to evaluate the characteristic function of a linear combination of independent INVERSE GAMMA distributed random variables.

The characteristic function of the GAMMA distribution is defined by

cf(t) = 2 / gamma(\alpha) * (-1i*\beta*t).^(\alpha/2) * besselk(\alpha,sqrt(-4i*\beta*t)).

Usage

cfX_InverseGamma(t, alpha, beta, coef, niid)

Arguments

t

vector or array of real values, where the CF is evaluated.

alpha

the shape parameter alpha > 0. If empty, default value is alpha = 1.

beta

the rate (1/scale) parameter beta > 0. If empty, default value is beta = 1.

coef

vector of coefficients of the linear combination of Inverse Gamma distributed random variables. If coef is scalar, it is assumed that all coefficients are equal. If empty, default value is coef = 1.

niid

scalar convolution coeficient.

Value

Characteristic function cf(t) of the INVERSE GAMMA distribution.

Note

Ver.: 16-Sep-2018 19:25:22 (consistent with Matlab CharFunTool v1.3.0, 15-Nov-2016 13:36:26).

References

WITKOVSKY, V.: Computing the distribution of a linear combination of inverted gamma variables, Kybernetika 37 (2001), 79-90.

See Also

For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Inverse-gamma_distribution.

Other Continuous Probability Distribution: cfS_Arcsine(), cfS_Beta(), cfS_Gaussian(), cfS_Laplace(), cfS_Rectangular(), cfS_Student(), cfS_TSP(), cfS_Trapezoidal(), cfS_Triangular(), cfS_Wigner(), cfX_ChiSquare(), cfX_Exponential(), cfX_FisherSnedecor(), cfX_Gamma(), cfX_LogNormal(), cf_ArcsineSymmetric(), cf_BetaNC(), cf_BetaSymmetric(), cf_Beta(), cf_ChiSquare(), cf_Exponential(), cf_FisherSnedecorNC(), cf_FisherSnedecor(), cf_Gamma(), cf_InverseGamma(), cf_Laplace(), cf_LogRV_BetaNC(), cf_LogRV_Beta(), cf_LogRV_ChiSquareNC(), cf_LogRV_ChiSquare(), cf_LogRV_FisherSnedecorNC(), cf_LogRV_FisherSnedecor(), cf_LogRV_MeansRatioW(), cf_LogRV_MeansRatio(), cf_LogRV_WilksLambdaNC(), cf_LogRV_WilksLambda(), cf_Normal(), cf_RectangularSymmetric(), cf_Student(), cf_TSPSymmetric(), cf_TrapezoidalSymmetric(), cf_TriangularSymmetric(), cf_vonMises()

Examples

## EXAMPLE 1
# CF of the InverseGamma distribution with alpha = 2, beta = 2
alpha <- 2
beta <- 2
t <- seq(-20, 20, length.out = 501)
plotReIm(function(t)
        cfX_InverseGamma(t, alpha, beta), t,
        title = "CF of the InverseGamma distribution with alpha = 2, beta = 2")

## EXAMPLE 2
# PDF/CDF of the InverseGamma distribution with alpha = 2, beta = 2
alpha <- 2
beta <- 2
cf <- function(t)
        cfX_InverseGamma(t, alpha, beta)
x <- seq(0, 15, length.out = 101)
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$xMin <- 0
options$SixSigmaRule <- 10
options$N <- 2 ^ 14
result <- cf2DistGP(cf, x, prob, options)

## EXAMPLE 3
# PDF/CDF of the compound Binomial-InverseGamma distribution
p <- 0.3
n <- 25
alpha <- 2
beta <- 2
cfX <- function(t)
        cfX_InverseGamma(t, alpha, beta)
cf <- function(t)
        cfN_Binomial(t, n, p, cfX)
x <- seq(0, 70, length.out = 101)
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$isCompound <- TRUE
result <- cf2DistGP(cf, x, prob, options)

gajdosandrej/CharFunToolR documentation built on June 3, 2024, 7:46 p.m.