rayleighQlink {VGAMextra}R Documentation

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

Description

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

Usage

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

Arguments

theta

Numeric or character. It is θ\theta by default, although it may be η\eta. See Links for additional details about this.

p

Numeric. A single value between 0.0 and 1.0. It is the pp–quantile to be modeled by this link function.

bvalue, inverse, deriv, short, tag

See Links.

Details

This link function directly models any pp–quantile of the Rayleigh distribution specified by the argument p. It is called the rayleighQlink transformation defined as

b2log(1p),b \sqrt{-2 \log(1 - p)},

where b>0b > 0 is a scale parameter as in rayleigh.

Numerical values of bb or pp out of range may result in Inf, -Inf, NA or NaN.

If theta is character, then arguments inverse and deriv are discarded.

Value

For deriv = 0, the rayleighQlink transformation of theta, when inverse = FALSE. If inverse = TRUE, then this function returns theta / sqrt(-2 log(1 - p)).

For deriv = 1, then the function returns dd eta / dd theta, if inverse = FALSE. If inverse = TRUE, then dd theta / dd eta as a function of theta.

If deriv = 2, then the second order derivatives in terms of theta.

Note

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

Author(s)

V. Miranda and Thomas W. Yee.

See Also

rayleigh, Links.

Examples

 ## E1. rayleighQlink() and its inverse ##
  p <- 0.50                           ## Modeling the median
  my.b <- seq(0, 5, by = 0.1)[-1]
  max(my.b - rayleighQlink(rayleighQlink(my.b, p = p), p = p, inverse  =TRUE)) ## Zero


 ## E2. Special values ##
  rayleighQlink(theta = c(Inf, -Inf, NA, NaN), p = p)
    
    
 ## E3. Use of argument 'bvalue' ##
  rayleighQlink(theta = seq(-0.2, 1.0, by = 0.1), p = p)  # WARNING: NaNs if theta <= 0
  rayleighQlink(theta = seq(-0.2, 1.0, by = 0.1), p = p, bvalue = .Machine$double.xmin)
    

[Package VGAMextra version 0.0-6 Index]