quarice | R Documentation |
This function computes the quantiles of the Rice distribution given parameters (\nu
and \alpha
) computed by parrice
. The quantile function is complex and numerical rooting of the cumulative distribution function cdfrice
is used.
quarice(f, para, xmax=NULL, paracheck=TRUE)
f |
Nonexceedance probability ( |
para |
The parameters from |
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. |
Quantile value for nonexceedance probability F
.
W.H. Asquith
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.
cdfrice
, pdfrice
, lmomrice
, parrice
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.