invlink: Transformation from the Link Scale to the Observation Scale

View source: R/invlink.R

invlinkR Documentation

Transformation from the Link Scale to the Observation Scale

Description

The function transforms a variable from the link scale to the observation scale (probability or count).

Usage

invlink(x, type = c("cloglog", "log", "logit", "probit"))

Arguments

x

A vector of real numbers.

type

A character string: “cloglog”, “log”, “logit” or “probit”.

Value

clog-log: 1 - exp(-exp(x))
log: exp(x)
logit: exp(x) / (1 + exp(x))
probit: pnorm(x)

See Also

link

Examples

x <- seq(-5, 5, length = 100)
plot(x, invlink(x, type = "logit"), type = "l", lwd = 2, ylab = "Probability")
lines(x, invlink(x, type = "cloglog"), lty = 2, lwd = 2)
grid(col = "black")
legend(-5, 1, legend = c("alogit(x)", "acloglog(x)"), lty = c(1, 2), bg = "white")

aods3 documentation built on July 8, 2022, 5:06 p.m.

Related to invlink in aods3...