inv.trigamma: Inversion of Trigamma Function

View source: R/meanVarCurve.R

inv.trigammaR Documentation

Inversion of Trigamma Function

Description

inv.trigamma implements the Newton iteration for solving, given x, the equation for y: trigamma(y) = x. See appendix of the limma paper (see "References") for a theoretical deduction of the method.

Usage

inv.trigamma(x, eps = 1e-08)

Arguments

x

A positive numeric scalar.

eps

The required precision of the solution.

Value

The solution, which is also a positive numeric scalar.

References

Smyth, G.K., Linear models and empirical bayes methods for assessing differential expression in microarray experiments. Stat Appl Genet Mol Biol, 2004. 3: p. Article3.

See Also

trigamma for the trigamma function.

Examples

x <- trigamma(1:6)
vapply(x, inv.trigamma, numeric(1))


MAnorm2 documentation built on Oct. 29, 2022, 1:12 a.m.