expQlink: Link functions for the quantiles of several 1-parameter...

View source: R/expQlink.R

expQlinkR Documentation

Link functions for the quantiles of several 1–parameter continuous distributions.


Computes the expQlink transformation, its inverse and the first two derivatives.


  expQlink(theta, p = stop("Argument 'p' must be entered."),
           bvalue = NULL, inverse = FALSE,
           deriv = 0, short = TRUE, tag = FALSE) 



Numeric or character. This is \theta although may be \eta depending on the other parameters. See below for further details.


Numeric. A prespecified number between 0 and 1. The particular p–quantile to be modelled. For example, p = 0.5 means that the median is considered by this link function.

bvalue, inverse, deriv, short, tag

See Links.


This is a link function to model any fixed quantile, say \xi_p, of the exponential distribution. It is called the expQlink transformation and is defined as

\log (1 - p)^{-1/\lambda},

where \lambda is positive as in exponential.

Numerical values of \lambda or p out of range may result in Inf, -Inf, NA or NaN.


With deriv = 0, the expQlink transformation of theta for prespecified p when inverse = FALSE. If inverse = TRUE, then the inverse -log(1 - p)/theta.

For deriv = 1, this link function returns d eta / d theta when inverse = FALSE. If inverse = TRUE, then d theta / d eta as a function of theta.

Similarly, when deriv = 2, the second derivatives in terms of theta are returned.


Numerical instability may occur for values theta too close to zero. Use argument bvalue to replace them before computing the link.

If theta is character, then arguments inverse and deriv are ignored. See Links for further details.


V. Miranda and Thomas W. Yee.

See Also

exponential, Links.


 ## E1. expQlink() and its inverse ##
    p <- 0.25            # Modelling the first quartile.
    my.theta <- seq(0, 5, by = 0.1)[-1]
    my.diff <- my.theta - expQlink(expQlink(my.theta, p = p), p = p, inverse  =TRUE)
    summary(my.diff)     # Zero

  ## E2. Special values ##
    expQlink(theta = c(Inf, -Inf, NA, NaN), p = p)

  ##  E3. Plot of expQlink() for different quantiles  ##
    plot(expQlink(my.theta, p = p) ~ my.theta, 
         type = "l", lty = "dotted", col = "blue", lwd = 2,
         main = "expQink(p) transformation", xlab = "theta", ylab = "expQLink",
         xlim = c(-0.5, 5), ylim = c(-0.5, 5))
    abline(h = 0, v = 0, lwd = 2)
    lines(my.theta, expQlink(my.theta, p = 0.50),  col = "green", lty = "dotted", lwd = 2)
    lines(my.theta, expQlink(my.theta, p = 0.75),  col = "red", lty = "dotted", lwd = 2)
    legend(2, 4,  c("p = 0.25", "p = 0.50", "p = 0.75"), col = c("blue", "green", "red"),
           lwd = c(2, 2, 2), lty = c("dotted", "dotted", "dotted"))

VGAMextra documentation built on Nov. 2, 2023, 5:59 p.m.