Last chance! 50% off unlimited learning
Sale ends in
If the message Error in integrate(XofF, 0, 1) : the integral is probably divergent occurs then careful adjustment of the shape parameter $\beta$ parameter range is very likely required. Remember that TL-moments with nonzero trimming permit computation of TL-moments into parameter ranges beyond those recognized for the usual L-moments.
The function uses numerical integration of the quantile function of the distribution through the theoTLmoms
function.
tlmrpe3(trim=NULL, leftrim=NULL, rightrim=NULL,
xi=0, beta=1, abeg=-.99, aend=0.99, by=.1)
NULL
in the argument list, the default is 0---the usual L-moment ratios are returned.seq()
between abeg
and aend
.list
is returned.quape3
, theoTLmoms
tlmrpe3(leftrim=2, rightrim=4, xi=0, beta=2)
tlmrpe3(leftrim=2, rightrim=4, xi=100, beta=20)
# Plot and L-moment ratio diagram of Tau3 and Tau4
# with exclusive focus on the PE3 distribution.
plotlmrdia(lmrdia(), autolegend=TRUE, xleg=-.1, yleg=.6,
xlim=c(-.8, .7), ylim=c(-.1, .8),
nolimits=TRUE, nogev=TRUE, nogpa=TRUE, noglo=TRUE,
nogno=TRUE, nocau=TRUE, noexp=TRUE, nonor=TRUE,
nogum=TRUE, noray=TRUE, nouni=TRUE)
# Compute the TL-moment ratios for trimming of one
# value on the left and four on the right. Notice the
# expansion of the alpha parameter space from
# -1 < a < -1 to something larger based on manual
# adjustments until blue curve encompassed the plot.
J <- tlmrpe3(abeg=-15, aend=6, leftrim=1, rightrim=4)
lines(J$tau3, J$tau4, lwd=2, col=2) # RED CURVE
# Compute the TL-moment ratios for trimming of four
# values on the left and one on the right.
J <- tlmrpe3(abeg=-6, aend=10, leftrim=4, rightrim=1)
lines(J$tau3, J$tau4, lwd=2, col=4) # BLUE CURVE
# The abeg and aend can be manually changed to see how
# the resultant curve expands or contracts on the
# extent of the L-moment ratio diagram.
# Following up, let us plot the two quantile functions
LM <- vec2par(c(0,1,0.99), type='pe3', paracheck=FALSE)
TLM <- vec2par(c(0,1,3.00), type='pe3', paracheck=FALSE)
F <- nonexceeds()
plot(qnorm(F), quape3(F, LM), type="l")
lines(qnorm(F), quape3(F, TLM, paracheck=FALSE), col=2)
# Notice how the TLM parameterization runs off towards
# infinity much much earlier than the conventional
# near limits of the PE3.
Run the code above in your browser using DataLab