Skip to contents

The inverse of the digamma function, i.e. the derivative of the log-gamma function.

Usage

idigamma(x, ...)

Arguments

x

numeric. The point to evaluate the function.

...

extra arguments passed to optim().

Value

numeric. The evaluated function.

Details

The idigamma() function implements the inverse of the digamma function \(\psi\). It is a numerical approximation based on the Brent optimization algorithm. Specifically, idigamma() makes a call to optim() in order to solve the equation \(\psi(x) = y\); more accurately, to find the minimum of \(f(x) = \log\Gamma(x) - xy\), whose derivative is \(f'(x) = \psi(x) - y\). The optimization is restricted within the tight bounds derived by Batir (2017). The function is vectorized.

References

Necdet Batir (2017), INEQUALITIES FOR THE INVERSES OF THE POLYGAMMA FUNCTIONS https://arxiv.org/pdf/1705.06547

Oikonomidis, I. & Trevezas, S. (2023), Moment-Type Estimators for the Dirichlet and the Multivariate Gamma Distributions, arXiv, https://arxiv.org/abs/2311.15025

See also

Examples

# \donttest{
idigamma(2)
#> [1] 7.883429
# }