Learn R Programming

MAnorm2 (version 1.2.2)

util.trigamma: Utility Trigamma Function

Description

util.trigamma is essentially the same as the trigamma function but is for being consistent with the inv.trigamma function at very small or very large input values.

Usage

util.trigamma(y)

Value

A positive numeric scalar, which is essentially the same as

trigamma(y) but could be a little different at very small or very large y values.

Arguments

y

A positive numeric scalar. Inf is allowed.

See Also

inv.trigamma for an implementation of the inversion of the trigamma function.

Examples

Run this code
trigamma(1:6)
vapply(1:6, util.trigamma, numeric(1))

trigamma(1e-4)
util.trigamma(1e-4)

trigamma(1e8)
util.trigamma(1e8)

trigamma(Inf)
util.trigamma(Inf)

Run the code above in your browser using DataLab