Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

explink

Exponential Link Function


Description

Computes the exponential transformation, including its inverse and the first two derivatives.

Usage

explink(theta, bvalue = NULL, inverse = FALSE, deriv = 0, short = TRUE, tag = FALSE)

Arguments

theta

Numeric or character. See below for further details.

bvalue

See clogloglink.

inverse, deriv, short, tag

Details at Links.

Details

The exponential link function is potentially suitable for parameters that are positive. Numerical values of theta close to negative or positive infinity may result in 0, Inf, -Inf, NA or NaN.

Value

For explink with deriv = 0, the exponential of theta, i.e., exp(theta) when inverse = FALSE. And if inverse = TRUE then log(theta); if theta is not positive then it will return NaN.

For deriv = 1, then the function returns d eta / d theta as a function of theta if inverse = FALSE, else if inverse = TRUE then it returns the reciprocal.

Here, all logarithms are natural logarithms, i.e., to base e.

Note

This function has particular use for computing quasi-variances when used with rcim and uninormal.

Numerical instability may occur when theta is close to negative or positive infinity. One way of overcoming this (one day) is to use bvalue.

Author(s)

Thomas W. Yee

See Also

Examples

theta <- rnorm(30)
explink(theta)
max(abs(explink(explink(theta), inverse = TRUE) - theta))  # Should be 0

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.