Cond.KL.Weib.Gamma: Kullback-Leibler divergence between the (parametrized with...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Cond.KL.Weib.Gamma.R

Description

The function returns the Kullback-Leibler divergence (minus a constant) between the (parametrized with respect to shape and mean or variance) underlying Weibull or gamma distribution and its (assumed) maximum likelihood estimates.

Usage

1
Cond.KL.Weib.Gamma(par,nullvalue,hata,hatb,type,dist)

Arguments

par

The (actual) shape parameter α of the distribution.

nullvalue

The (actual) distribution mean or variance.

hata

Maximum likelihood estimate of the shape parameter of the distribution.

hatb

Maximum likelihood estimate of the scale parameter of the distribution.

type

Numeric switch, enables the choice of mean or variance: type: 1 for mean, 2 (or any other value != 1) for variance.

dist

Character switch, enables the choice of distribution: type "weib" for the Weibull or "gamma" for the gamma distribution.

Details

The Kullback-Leibler divergence between the Weibull(α, β) or the gamma(α, β) and its maximum likelihood estimate Gamma(\hat α, \hat β) is given by

D_{KL} = (\hat α -1)Ψ(\hat α) - \log\hat β - \hat α - \log Γ(\hat α) + \logΓ( α) + α \log β - (α -1)(Ψ(\hat α) + \log \hat β) + \frac{ \hat β \hat α}{λ}.

Since D_{KL} is used to determine the closest distribution - given its mean or variance - to the estimated gamma p.d.f., the first four terms are omitted from the function outcome, i.e. the function returns the result of the following quantity:

\logΓ( α) + α \log β - (α -1)(Ψ(\hat α) + \log \hat β) + \frac{ \hat β \hat α}{λ}.

For the Weibull distribution the corresponding formulas are

D_{KL} = \log \frac{\hat α}{{\hat β}^{\hat α}} - \log \frac{α}{{β}^{α}} + (\hat α - α) ≤ft ( \log \hat β - \frac{γ}{\hat α} \right ) + ≤ft (\frac{\hat β}{β} \right )^α Γ≤ft ( \frac{α}{\hat α} +1 \right ) -1

and since D_{KL} is used to determine the closest distribution - given its mean or variance - to the estimated gamma p.d.f., the first term is omitted from the function outcome, i.e. the function returns the result of the following quantity:

- \log \frac{α}{{β}^{α}} + (\hat α - α) ≤ft ( \log \hat β - \frac{γ}{\hat α} \right ) + ≤ft (\frac{\hat β}{β} \right )^α Γ≤ft ( \frac{α}{\hat α} +1 \right ) -1

Value

A scalar, the value of the Kullback-Leibler divergence (minus a constant).

Author(s)

Polychronis Economou

R implementation and documentation: Polychronis Economou <peconom@upatras.gr>

References

Economou et. al. (2021). Hypothesis testing for the population mean and variance based on r-size biased samples, under review.

Examples

1
2
3
4
5
6
#K-L divergence for the Gamma distribution for shape=2
#and variance=3 and their assumed MLE=(1,1):
 Cond.KL.Weib.Gamma(2,3,1,1,2, "gamma")
#K-L divergence for the Weibull distribution for shape=2
#and variance=3 and their assumed MLE=(1,1):
 Cond.KL.Weib.Gamma(2,3,1,1,2, "weib")

RSizeBiased documentation built on March 29, 2021, 9:11 a.m.