rice <- vec2par(c(65,34), type="rice")
lmomrice(rice)
# Use the additional arguments to show how to avoid
# unnecessary overhead when using the Rice, which only
# has two parameters.
rice <- vec2par(c(15,14), type="rice")
system.time(lmomrice(rice, nmom=2))
system.time(lmomrice(rice, nmom=6))
lcvs <- vector(mode="numeric"); i <- 0
SNR <- c(seq(7,0.25, by=-0.25), 0.1)
for(snr in SNR) {
i <- i + 1
rice <- vec2par(c(10,10/snr), type="rice")
lcvs[i] <- lmomrice(rice, nmom=2)$ratios[2]
}
plot(lcvs, SNR,
xlab="COEFFICIENT OF L-VARIATION",
ylab="LOCAL SIGNAL TO NOISE RATIO (NU/ALPHA)")
lines(.lmomcohash$RiceTable$LCV,
.lmomcohash$RiceTable$SNR)
abline(1,0, lty=2)
mtext("Rice Distribution")
text(0.15,0.5, "More noise than signal")
text(0.15,1.5, "More signal than noise")
Run the code above in your browser using DataLab