# toppleMeanlink: Link functions for the mean of 1-parameter continuous... In VGAMextra: Additions and Extensions of the 'VGAM' Package

## Description

Computes the `toppleMlink` transformation, its inverse and the first two derivatives.

## Usage

 ```1 2``` ``` toppleMlink(theta, bvalue = NULL, inverse = FALSE, deriv = 0, short = TRUE, tag = FALSE) ```

## Arguments

 `theta` Numeric or character. See `Links` and below for further details. `bvalue, inverse, deriv, short, tag` See `Links`.

## Details

The `toppleMlink` transformation arises as a link function to model the mean of the Topp–Leone distribution, `topple`. It is defined as

η = logit ( (1 - 4^s * Γ(1 + s)^2 / Γ(2 + 2s) ) / sup.tp ).

Here, 0 < s < 1 is a shape parameter as in `topple`, whereas sup.tp is the supremum of

1 - 4^s * Γ(1 + s)^2 / Γ(2 + 2s),

in (0, 1), as a function of s.

For numerical values of s out of (0, 1), this link may result in `Inf`, `-Inf`, `NA` or `NaN`.

## Value

For `deriv = 0`, the `toppleMlink` transformation of `theta` when `inverse = FALSE`. If `inverse = TRUE`, then `theta` becomes η, and the inverse transformation is required. However, it can't be expressed in close form. Therefore, the approximate inverse image of entered `theta` computed by `newtonRaphson.basic` is returned.

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

## Note

Values of s too close to zero or 1.0 may cause numerical instability. 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.

## Author(s)

V. Miranda and Thomas W. Yee.

`topple`, `Links`, `newtonRaphson.basic`.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30``` ``` ## E1. The toppleMlink() and its inverse ## theta <- ppoints(10) eta <- toppleMlink(toppleMlink(theta = theta), inverse =TRUE) summary(eta - theta) # Zero ## E2. Some probability link functions ## my.probs <- ppoints(100) par(lwd = 2) plot(my.probs, logitlink(my.probs), xlim = c(-0.1, 1.1), ylim = c(-5, 8), type = "l", col = "limegreen", ylab = "transformation", las = 1, main = "Some probability link functions") lines(my.probs, geometricffMlink(my.probs), col = "gray50") lines(my.probs, logffMlink(my.probs), col = "blue") lines(my.probs, probitlink(my.probs), col = "purple") lines(my.probs, clogloglink(my.probs), col = "chocolate") lines(my.probs, cauchitlink(my.probs), col = "tan") lines(my.probs, toppleMlink(my.probs), col = "black") abline(v = c(0.5, 1), lty = "dashed") abline(v = 0, h = 0, lty = "dashed") legend(0.1, 8, c( "toppleMlink", "geometricffMlink", "logffMlink", "logitlink", "probitlink", "clogloglink", "cauchitlink"), col = c("black", "gray50", "blue", "limegreen", "purple", "chocolate", "tan"), lwd = 1, cex = 0.5) par(lwd = 1) ```