par2qua2 {lmomco} | R Documentation |
Equivalent Quantile Function of Two Distributions
Description
This function computes the nonexceedance probability of a given quantile from a linear weighted combination of two quantile functions—a mixed distribution:
where is a quantile function for nonexceedance probability
, the distributions have parameters
and
, and
is a weight factor.
The distributions are specified by the two parameter object arguments in usual lmomco style. When proration by the nonexceedance probability is desired (weight=
NULL
, default), the left-tail parameter object (para1
) is the distribution obviously governing the left tail; the right-tail parameter object (para2
) is of course governs the right tail. The quantile function algebra is
where is the mixed quantile for nonexceedance probability
.
is the first or left-tail quantile function;
is the second or right-tail quantile function. In otherwords, if
weight = NULL
, then
f
and the weight between the two quantile functions thus continuously varies from left to right. This is a probability proration from one to the other. A word of caution in this regard. The resulting weighted- or mixed-quantile function is not rigorously checked for monotonic increase with , which is a required property of quantile functions. However, a first-order difference on the mixed quantiles with the probabilities is computed and a warning issued if not monotonic increasing.
If the optional weight
argument is provided with length 1, then equals that weight. If
weight = 0
, then only the quantiles for are returned, and if
weight = 1
, then only the quantiles for the left tail are returned.
If the optional weight
argument is provided with length 2, then is replaced by the first weight and
is replaced by the second weight. These are internally rescaled to sum to unity before use and a warning is issued that this was done. Finally, the
par2cdf2
function inverses the above equation for .
Usage
par2qua2(f, para1, para2, wfunc=NULL, weight=NULL, as.list=FALSE, ...)
Arguments
f |
Nonexceedance probability ( |
para1 |
|
para2 |
The second or right-tail parameters from |
wfunc |
A function taking the argument |
weight |
An optional weighting argument to use in lieu of |
as.list |
A logical to control whether an R |
... |
The additional arguments are passed to the quantile function. |
Value
The weighted quantile value for from the two distributions.
Author(s)
W.H. Asquith
See Also
Examples
lmr <- lmoms(rnorm(20)); left <- parnor(lmr); right <- pargev(lmr)
mixed.median <- par2qua2(0.5, left, right)
# Bigger example--using Kappa fit to whole sample for the right tail and
# Normal fit to whole sample for the left tail
D <- c(123, 523, 345, 356, 2134, 345, 2365, 235, 12, 235, 61, 432, 843)
lmr <- lmoms(D); KAP <- parkap(lmr); NOR <- parnor(lmr); PP <- pp(D)
plot( PP, sort(D), ylim=c(-500, 2300))
lines(PP, par2qua( PP, KAP), col=2)
lines(PP, par2qua( PP, NOR), col=3)
lines(PP, par2qua2(PP, NOR, KAP), col=4)