cf_LogRV_ChiSquare: Characteristic function of a linear combination of...

View source: R/cf_LogRV_ChiSquare.R

cf_LogRV_ChiSquareR Documentation

Characteristic function of a linear combination of independent LOG-TRANSFORMED CHI-SQUARE random variables

Description

cf_LogRV_ChiSquare(t, df, coef, niid) evaluates characteristic function of a linear combination (resp. convolution) of independent LOG-TRANSFORMED CHI-SQUARE random variables (RVs) log(X), where X ~ ChiSquare(df) is central CHI-SQUARE distributed RV with df degrees of freedom.

That is, cf_LogRV_ChiSquare evaluates the characteristic function cf(t) of Y = coef_1*log(X_1) +...+ coef_N*log(X_N), where X_i ~ ChiSquare(df_i), with df_i > 0 degrees of freedom, for i = 1,...,N.

The characteristic function of Y = log(X), with X ~ ChiSquare(df) is defined by

cf_Y(t) = E(exp(1i*t*Y)) = E(exp(1i*t*log(X))) = E(X^(1i*t)).

That is, the characteristic function can be derived from expression for the r-th moment of X, E(X^r) by using (1i*t) instead of r. In particular, the characteristic function of Y = log(X) is

cf_Y(t) = 2^(1i*t) * gamma(df/2 + 1i*t) / gamma(df/2).

Hence,the characteristic function of Y = coef_1*X_1 +...+ coef_N*X_N is

cf_Y(t) = cf_1(coef_1*t) *...* cf_N(coef_N*t),

where cf_i(t) is the characteristic function of the ChiSquare distribution with df_i degrees of freedom.

Usage

cf_LogRV_ChiSquare(t, df, coef, niid)

Arguments

t

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

df

vector of the degrees of freedom df > 0. If empty, default value is df = 1.

coef

vector of the coefficients of the linear combination of the logGamma 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 niid, such that Z = Y + ... + Y is sum of niid iid random variables Y, where each Y = sum_{i=1}^N coef(i) * log(X_i) is independently and identically distributed random variable. If empty, default value is niid = 1.

Value

Characteristic function cf(t) of a linear combination of independent LOG-TRANSFORMED CHI-SQUARE random variables.

Note

Ver.: 16-Sep-2018 18:34:40 (consistent with Matlab CharFunTool v1.3.0, 02-Jun-2017 12:08:24).

References

[1] PHILLIPS, P.C.B. The true characteristic function of the F distribution. Biometrika (1982), 261-264.

[2] WITKOVSKY, V.: On the exact computation of the density and of the quantiles of linear combinations of t and F random variables. Journal of Statistical Planning and Inference 94 (2001), 1–13.

See Also

For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Chi-squared_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_InverseGamma(), 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_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 a weighted linear combination of independent log-ChiSquare RVs
coef <- c(1, 2, 3, 4, 5)
weight <- coef / sum(coef)
df <- c(1, 2, 3, 4, 5)
t <- seq(from = -20,
         to = 20,
         length.out = 1001)
plotReIm(function(t)
        cf_LogRV_ChiSquare(t, df, weight),
        t,
        title = 'CF of a linear combination of minus log-ChiSquare RVs')

## EXAMPLE 2
# PDF/CDF of a linear combination of independent log-ChiSquare RVs
coef <- c(1, 2, 3, 4, 5)
weight <- coef / sum(coef)
df <- c(1, 2, 3, 4, 5)
cf <- function(t)
        cf_LogRV_ChiSquare(t, df, weight)
options <- list()
options$N <- 2 ^ 12
prob <- c(0.9, 0.95, 0.99)
result <- cf2DistGP(cf = cf, prob = prob, options = options)
str(result)

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