ParaMonte Fortran 2.0.0 Parallel Monte Carlo and Machine Learning LibrarySee the latest version documentation.
pm_distExpGamma Module Reference

This module contains classes and procedures for computing various statistical quantities related to the ExpGamma distribution. More...

## Data Types

type  distExpGamma_type
This is the derived type for signifying distributions that are of type ExpGamma as defined in the description of pm_distExpGamma. More...

interface  getExpGammaCDF
Generate and return the Cumulative Distribution Function (CDF) of the ExpGamma distribution for an input x within the support of the distribution $$x \in (-\infty,+\infty)$$. More...

interface  getExpGammaLogPDF
Generate and return the natural logarithm of the Probability Density Function (PDF) of the ExpGamma distribution. More...

interface  getExpGammaLogPDFNF
Generate and return the natural logarithm of the normalization factor of the Probability Density Function (PDF) of the ExpGamma distribution.
More...

interface  setExpGammaCDF
Return the Cumulative Distribution Function (CDF) of the ExpGamma distribution for an input x within the support of the distribution $$x \in (-\infty,+\infty)$$. More...

interface  setExpGammaLogPDF
Return the natural logarithm of the Probability Density Function (PDF) of the ExpGamma distribution. More...

## Variables

character(*, SK), parameter MODULE_NAME = "@pm_distExpGamma"

## Detailed Description

This module contains classes and procedures for computing various statistical quantities related to the ExpGamma distribution.

Specifically, this module contains routines for computing the following quantities of the ExpGamma distribution:

1. the Probability Density Function (PDF)
2. the Cumulative Distribution Function (CDF)
3. the Random Number Generation from the distribution (RNG)
4. the Inverse Cumulative Distribution Function (ICDF) or the Quantile Function

A variable $$X$$ is said to be ExpGamma-distributed if its PDF with location $$0 < \log(\sigma) < +\infty$$, scale (inverse rate) $$> 0$$, and shape $$\kappa > 0$$ parameters is described by the following equation,

$$\large \pi(x | \kappa, \log(\sigma)) = \frac{1}{\Gamma(\kappa)} ~ \exp\Bigg( \kappa\bigg(x - \log(\sigma)\bigg) - \exp\bigg(x - \log(\sigma)\bigg) \Bigg) ~,~ -\infty < x < \infty$$

where $$\eta = \frac{1}{\Gamma(\kappa)}$$ is the normalization factor of the PDF.

When $$\sigma = 1$$, the ExpGamma PDF simplifies to the form,

$$\large \pi(x) = \frac{1}{\Gamma(\kappa)} ~ \exp\Bigg(\kappa x - \exp(x) \Bigg) ~,~ -\infty < x < \infty$$

Setting the shape parameter to $$\kappa = 1$$ further simplifies the PDF to the form,

$$\large \pi(x) = \exp\Bigg(x - \exp(x)\Bigg) ~,~ -\infty < x < \infty$$

The parameter $$\log(\sigma)$$ determines the horizontal location of the mode of this unimodal ExpGamma PDF.
The ExpGamma distribution is mathematically defined to be the distribution of $$\log(X)$$ where $$X$$ follows a Gamma distribution.

The CDF of the ExpGamma distribution over a strictly-positive support $$x \in (0, +\infty)$$ with the two (shape, scale) parameters $$(\kappa > 0, \sigma > 0)$$ is defined by the regularized Lower Incomplete Gamma function as,

\begin{eqnarray} \large \mathrm{CDF}(x | \kappa, \sigma) & = & P\big(\kappa, x - \log(\sigma)\big) \\ & = & \frac{1}{\Gamma(\kappa)} \int_0^{\exp(x - \log(\sigma))} ~ t^{\kappa - 1}{\mathrm e}^{-t} ~ dt ~, \end{eqnarray}

where $$\Gamma(\kappa)$$ represents the Gamma function.

Warning
The ExpGamma distribution is also frequently mistakenly called LogGamma , which is an entirely different distribution.
Note
The relationship between the ExpGamma and Gamma distributions is similar to that of the Normal and LogNormal distributions.
In other words, a more consistent naming for the ExpGamma and Gamma distributions could have been Gamma and LogGamma respectively, similar to Normal and LogNormal distributions.
pm_distGamma
pm_distExpGamma
pm_distGenGamma
pm_distGenExpGamma
Test:
test_pm_distExpGamma

Final Remarks

If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.

1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Oct 16, 2009, 11:14 AM, Michigan

## ◆ MODULE_NAME

 character(*, SK), parameter pm_distExpGamma::MODULE_NAME = "@pm_distExpGamma"

Definition at line 97 of file pm_distExpGamma.F90.