Description Usage Arguments Details Value Note Author(s) See Also Examples

Computes the `expMlink`

transformation, its inverse and
the first two derivatives.

1 2 |

`theta` |
Numeric or character. This is |

`location` |
This is a known location parameter.
Same as |

`bvalue, inverse, deriv, short, tag` |
See |

This is a link function to model the mean of the exponential
distribution, `exponential`

.
It is defined as

* η = log (A + rate^(-1)), *

where *rate > 0* is a rate parameter and *A* is a
known location parameter,
same as `exponential`

.

Numerical values of *rate* out of range may
result in `Inf`

, `-Inf`

, `NA`

or `NaN`

.

For `deriv = 0`

, the `expMlink`

transformation of
`theta`

when `inverse = FALSE`

.
If `inverse = TRUE`

, then the inverse `exp(theta - A)^(-1)`

.

For `deriv = 1`

,
*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.

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 | ```
## E1. Modelling the mean of the exponential distribution ##
set.seed(17010402)
nn <- 100
edata <- data.frame(x2 = runif(nn) - 0.5, x3 = runif(nn) - 0.5)
edata <- transform(edata, eta = 0.2 - 0.7 * x2 + 1.9 * x3)
#----- The mean is a function of 'x2' and 'x3' ------#
edata <- transform(edata, rate = expMlink(eta, inverse = TRUE))
edata <- transform(edata, y = rexp(nn, rate = rate))
with(edata, stem(y))
with(edata, hist(y))
exp.fit <- vglm(y ~ x2 + x3, exponential(link = "expMlink"),
data = edata, zero = NULL, trace = TRUE, crit = "log")
coef(exp.fit, matrix = TRUE)
summary(exp.fit)
## E2. expMlink() and its inverse ##
theta <- 0.1 + 1:5
location <- 1.5
my.diff <- theta - expMlink(expMlink(theta = theta,
location = location), location = location, inverse =TRUE)
summary(my.diff) # Zero
## E3. Special values in a matrix ##
theta <- matrix(c(Inf, -Inf, NA, NaN, 1 , 2), ncol = 3, nrow = 2)
expMlink(theta = theta, location = location)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.