Quantile Function of the Rice Distribution

Description

This function computes the quantiles of the Rice distribution given parameters (ν and α) computed by parrice. The quantile function is complex and numerical rooting of the cumulative distribution function cdfrice is used.

Usage

1
quarice(f, para, xmax=NULL, paracheck=TRUE)

Arguments

f

Nonexceedance probability (0 ≤ F ≤ 1).

para

The parameters from parrice or vec2par.

xmax

The maximum x value used for integeration.

paracheck

A logical controlling whether the parameters are checked for validity. Overriding of this check might be extremely important and needed for use of the quantile function in the context of TL-moments with nonzero trimming.

Value

Quantile value for nonexceedance probability F.

Author(s)

W.H. Asquith

References

Asquith, W.H., 2011, Distributional analysis with L-moment statistics using the R environment for statistical computing: Createspace Independent Publishing Platform, ISBN 978–146350841–8.

See Also

cdfrice, pdfrice, lmomrice, parrice

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
lmr <- vec2lmom(c(125,0.20), lscale=FALSE)
quarice(0.75,parrice(lmr))
# The quantile function of the Rice as implemented in lmomco
# is slow because of rooting the CDF, which is created by
# integration of the PDF. Rician random variates are easily created.
# Thus, in speed applications the rlmomco() with a Rice parameter
# object could be bypassed by the following function, rrice().
## Not run: 
"rrice" = function(n, nu, alpha) { # from the VGAM package
    theta = 1 # any number
    X = rnorm(n, mean=nu * cos(theta), sd=alpha)
    Y = rnorm(n, mean=nu * sin(theta), sd=alpha)
    return(sqrt(X^2 + Y^2))
}
n <- 5000; # suggest making it about 10,000
nu <- 100; alpha <- 10
set.seed(501); lmoms(rrice(n, nu, alpha))
set.seed(501); lmoms(rlmomco(n, vec2par(c(nu,alpha), type='rice')))
# There are slight numerical differences between the two?

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.