Learn R Programming

VGAM (version 0.8-7)

explink: Exponential Link Function

Description

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

Usage

explink(theta, earg = list(), inverse = FALSE, deriv = 0, short = TRUE, tag = FALSE)

Arguments

theta
Numeric or character. See below for further details.
earg
Optional list. See Links for general information about earg.
inverse
Logical. If TRUE the inverse function is computed. The inverse function is the loge function.
deriv
Order of the derivative. Integer with value 0, 1 or 2.
short
Used for labelling the blurb slot of a vglmff-class object.
tag
Used for labelling the linear/additive predictor in the initialize slot of a vglmff-class object. Contains a little more information if TRUE.

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 theta / d eta 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.

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.

The arguments short and tag are used only if theta is character.

See Also

Links, loge, rcam, Qvar, normal1.

Examples

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

Run the code above in your browser using DataLab