If qua != NULL
, then the first order-statistic expectation equation above is used, and any function that might have been set in cdf
and pdf
is ignored. If the limits are infinite (default), then the limits of the integration will be set to \(F\!\downarrow = 0\) and \(F\!\uparrow = 1\). The user can replace these by setting the limits to something “near” zero and(or) “near” 1. Please consult the Note below concerning more information about the limits of integration.
If qua == NULL
, then the second order-statistic expectation equation above is used and cdf
and pdf
must be set. The default \(\pm\infty\) limits are used unless the user knows otherwise for the distribution or through supervision provides their meaning of small and large.
This function requires the user to provide either the qua
or the cdf
and pdf
functions, which is somewhat divergent from the typical flow of logic of lmomco. This has been done so that expect.max.ostat
can be used readily for experimental distribution functions. It is suggested that the parameter object be left in the lmomco style (see vec2par
) even if the user is providing their own distribution functions.
Last comments: This function is built around the idea that either (1) the cdf
and pdf
ensemble or (2) qua
exist in some clean analytical form and therefore the qua=NULL
is the trigger on which order statistic expectation integral is used. This precludes an attempt to compute the support of the distribution internally, and thus providing possibly superior (more refined) lower
and upper
limits. Here is a suggested re-implementation using the support of the Generalized Extreme Value distribution:
para <- vec2par(c(100, 23, -0.5), type="gev")
lo <- quagev(0, para) # The value 54
hi <- quagev(1, para) # Infinity
E22 <- expect.max.ostat(2, para=para,cdf=cdfgev,pdf=pdfgev,
lower=lo, upper=hi)
E21 <- expect.min.ostat(2, para=para,cdf=cdfgev,pdf=pdfgev,
lower=lo, upper=hi)
L2 <- (E22 - E21)/2 # definition of L-scale
cat("L-scale: ",L2,"(integration)",
lmomgev(para)$lambdas[2], "(theory)\n")
# The results show 33.77202 as L-scale.
The design intent makes it possible for some arbitrary and(or) new quantile function with difficult cdf
and pdf
expressions (or numerical approximations) to not be needed as the L-moments are explored. Contrarily, perhaps some new pdf
exists and simple integration of it is made to get the cdf
but the qua
would need more elaborate numerics to invert the cdf
. The user could then still explore the L-moments with supervision on the integration limits or foreknowledge of the support of the distribution.