Learn R Programming

lmomco (version 1.3.3)

quarice: Quantile Function of the Rice Distribution

Description

This function computes the quantiles of the Rice distribution given parameters ($\nu$ and $\alpha$) of the distribution computed by parrice. The quantile function of the distribution is complex and numerical rooting of the cumulative distribution function is used. $$x(F,\nu,\alpha)$$ where $x(F)$ is the quantile for nonexceedance probability $F$, $\nu$ is a parameter, and $\nu/\alpha$ is a form of signal-to-noise ratio $\mathrm{SNR}$. If $\nu=0$, then the Rayleigh distribution results and quaray is used.

Usage

quarice(f, para, xmax=NULL)

Arguments

f
Nonexceedance probability ($0 \le F \le 1$).
para
The parameters from parrice or similar.
xmax
The maximum x value used for integeration.

Value

  • Quantile value for nonexceedance probability $F$.

See Also

cdfrice, parrice

Examples

Run this code
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().
"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 <- 500; # suggest making it about 10,000
nu <- 100; alpha <- 10
lmoms(rrice(n, nu, alpha))
lmoms(rlmomco(n, vec2par(c(nu,alpha), type='rice')))

Run the code above in your browser using DataLab