Learn R Programming

lmomco (version 1.4.3)

parrice: Estimate the Parameters of the Rice Distribution

Description

This function estimates the parameters ($\nu$ and $\alpha$) of the Rice distribution giventhe L-moments of the data in an L-moment object such as that returned bylmom.ub. The relations between distribution parameters and L-moments are complex and tabular lookup is made using a relation between $\tau$ and a form of signal-to-noise ratio $\mathrm{SNR}$ defined as $\nu/\alpha$ and a relation between $\tau$ and precomputed Laguerre polynomial, which in turn requires modified Bessel functions of the first kind. The Laguerre polynomial is $$L_{1/2}(x) = \mathrm{e}^{x/2}\times[(1-x)I_0(-x/2) - xI_1(-x/2)]$$ where the modified Bessel function of the first kind is $I_k(x)$.

The $\lambda_1$ (mean) is most straightforward $$\lambda_1 = \alpha \times \sqrt{\pi/2} L_{1/2}(-\nu^2/[2\alpha^2])$$ for which the terms to the right of the multiplication symbol are uniquely a function of $\tau$ and precomputed for tabular lookup and interpolation from sysdata.rdb (.lmomcohash$RiceTable). Parameter estimation also relies directly on tabular lookup and interpolation to convert $\tau$ to $\mathrm{SNR}$. The file SysDataBuilder.R provides additional technical details.

Usage

parrice(lmom, checklmom=TRUE)

Arguments

lmom
A L-moment object created by lmom.ub or pwm2lmom.
checklmom
Should the lmom be checked for validity using the are.lmom.valid function. Normally this should be left as the default and it is very unlikely that the L-moments will not be viable (particularly in the $\tau_4$ and $\tau_3$ inequ

Value

  • An R list is returned.
  • typeThe type of distribution: rice.
  • paraThe parameters of the distribution.
  • sourceThe source of the parameters: parrice.
  • ifailA numeric failure mode.
  • ifailtextA helpful message on the failure.

See Also

lmom.ub, lmomrice, cdfrice, quarice

Examples

Run this code
parrice(lmomrice(vec2par(c(100,11), type="rice")))
parrice(lmomrice(vec2par(c(10,50), type="rice")))

# Beyond limits of the Rice
  parrice(lmomrice(vec2par(c(100,0.1), type="rice")))

plotlmrdia(lmrdia(), xlim=c(0,0.2), ylim=c(-0.1,0.22),
           autolegend=TRUE, xleg=0.05, yleg=0.05)
lines(.lmomcohash$RiceTable$TAU3, .lmomcohash$RiceTable$TAU4,
      lwd=5, col=8)
legend(0.1,0, "RICE DISTRIBUTION", lwd=5, col=8, bty="n")
text(0.14,-0.04, "Normal distribution limit on left end point")
text(0.14,-0.055, "Rayleigh distribution limit on right end point")


# check parrice against a Maximum Likelihood method in VGAM
set.seed(1)
library(VGAM) # now example from riceff() of VGAM
vee <- exp(2); sigma <- exp(1); y <- rrice(n <- 1000, vee, sigma) 
fit <- vglm(y ~ 1, riceff, trace=TRUE, crit="c") 
Coef(fit) 
# NOW THE MOMENT OF TRUTH, USING L-MOMENTS
parrice(lmoms(y))
# VGAM 0.8-1 reports
#     vee    sigma 
# 7.344560 2.805877
# lmomco 1.2.2 reports
#      nu    alpha 
# 7.348784 2.797651

Run the code above in your browser using DataLab