parrice | R Documentation |
This function estimates the parameters (\nu
and \alpha
) of the Rice distribution given the L-moments of the data in an L-moment object such as that returned by lmoms
. 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 (LaguerreHalf
).
The \lambda_1
(mean) is most straightforward
\lambda_1 = \alpha \times \sqrt{\pi/2} \times L_{1/2}(-\nu^2/[2\alpha^2])\mbox{,}
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 ‘SysDataBuilder01.R’ provides additional technical details.
parrice(lmom, checklmom=TRUE, ...)
lmom |
An L-moment object created by |
checklmom |
Should the |
... |
Other arguments to pass. |
An R list
is returned.
type |
The type of distribution: |
para |
The parameters of the distribution. |
source |
The source of the parameters: “parrice”. |
ifail |
A numeric failure mode. |
ifailtext |
A helpful message on the failure. |
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.
lmomrice
, cdfrice
, pdfrice
, quarice
## Not run:
parrice(lmomrice(vec2par(c(10,50), type="rice"))) # Within Rician limits
parrice(lmomrice(vec2par(c(100,0.1), type="rice"))) # Beyond Rician limits
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 package 0.8-1 reports
# vee sigma
# 7.344560 2.805877
# lmomco 1.2.2 reports
# nu alpha
# 7.348784 2.797651
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.