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

The `rayleighMlink`

and the `maxwellMlink`

transformations, their inverse and the first two derivatives.

1 2 3 4 5 |

`theta` |
Numeric or character. It is |

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

`rayleighMlink`

and `maxwellMlink`

are link functions
to model the mean of the Rayleigh distirbution,
(`rayleigh`

),
and the mean of the Maxwell distribution,
(`maxwell`

),
respectively.

Both links are somehow defined as the
* log(theta)*
plus an *offset*. Specifcally,

*
rayleighMlink(b) = log ( b * γ(0.5) / sqrt(2) ),
*

where *b > 0* is a scale parameter as in
`rayleigh`

; and

*
maxwellMlink(b) = log ( a^(-1/2) * sqrt(pi/8) ).
*

Here, *a* is positive as in `maxwell`

.

Non–positive values of *a* and/or *b* will result in
`NaN`

, whereas values too close to zero will return
`Inf`

or `-Inf`

.

For `deriv = 0`

, the corresponding transformation of
`theta`

when `inverse = FALSE`

.
If `inverse = TRUE`

, then `theta`

becomes *η*, and
the inverse transformations

I) `exp(theta) * sqrt`

(2) / `gamma(0.5)`

for `rayleighMlink`

, and

II) *8*` * exp(-2 * theta) `

/ `gamma(0.5)`

*^2* for
`maxwellMlink`

,

are returned.

For `deriv = 1`

,
*d* `eta`

/ *d* `theta`

when `inverse = FALSE`

.
If `inverse = TRUE`

, then
*d* `theta`

/ *d* `eta`

as a function of
`theta`

.

When `deriv = 2`

, the second derivatives in
terms of `theta`

are returned.

Values of *a* or *b* out of range, e.g. when covariates
involved, may cause numerical instability.
Use argument `bvalue`

to replace them before computing any 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 | ```
## The link and its inverse ##
theta <- 0.1 + 1:10
eta <- maxwellMlink(maxwellMlink(theta = theta), inverse =TRUE)
summary(eta - theta) # Zero
eta <- rayleighMlink(rayleighMlink(theta = theta), inverse =TRUE)
summary(eta - theta) # Zero
## Modelling the mean of the Maxwell distribution ##
set.seed(17010401)
rate <- maxwellMlink(theta = 2, inverse = TRUE) # ~ 0.046
mdata <- data.frame(y = rmaxwell(1000, rate = rate ))
fit <- vglm(y ~ 1, maxwell(link = "maxwellMlink"),
data = mdata, trace = TRUE, crit = "coef")
coef(fit, matrix = TRUE)
Coef(fit)
``` |

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.