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

logitoffsetlink

Logit-with-an-Offset Link Function


Description

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

Usage

logitoffsetlink(theta, offset = 0, inverse = FALSE, deriv = 0,
                short = TRUE, tag = FALSE)

Arguments

theta

Numeric or character. See below for further details.

offset

The offset value(s), which must be non-negative. It is called K below.

inverse, deriv, short, tag

Details at Links.

Details

This link function allows for some asymmetry compared to the ordinary logitlink link. The formula is

log(theta/(1-theta) - K)

and the default value for the offset K is corresponds to the ordinary logitlink link. When inverse = TRUE will mean that the value will lie in the interval (K / (1+K), 1).

Value

For logitoffsetlink with deriv = 0, the logitoffsetlink of theta, i.e., log(theta/(1-theta) - K) when inverse = FALSE, and if inverse = TRUE then (K + exp(theta))/(1 + exp(theta) + K).

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 is numerical less stability than logitlink.

Author(s)

Thomas W. Yee

References

Komori, O. and Eguchi, S. et al., 2016. An asymmetric logistic model for ecological data. Methods in Ecology and Evolution, 7.

See Also

Examples

p <- seq(0.05, 0.99, by = 0.01); myoff <- 0.05
logitoffsetlink(p, myoff)
max(abs(logitoffsetlink(logitoffsetlink(p, myoff),
                        myoff, inverse = TRUE) - p))  # 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.