quaaep4kapmix {lmomco} | R Documentation |
Quantile Function Mixture Between the 4-Parameter Asymmetric Exponential Power and Kappa Distributions
Description
This function computes the quantiles of a mixture as needed between the 4-parameter Asymmetric Exponential Power (AEP4) and Kappa distributions given L-moments (lmoms
). The quantile function of a two-distribution mixture is supported by par2qua2
and is
where is the mixture for nonexceedance probability
,
is the AEP4 quantile function (
quaaep4
), is the Kappa quantile function (
quakap
), and is a weight factor.
Now, the above mixture is only applied if the for the given
is within the overlapping region of the AEP4 and Kappa distributions. For this condition, the
is computed by proration between the upper Kappa distribution bound (same as the
and
of the Generalized Logistic distribution, see
lmrdia
) and the lower bounds of the AEP4. For above the Kappa, then the AEP4 is exclusive and conversely, for
below the AEP4, then the Kappa is exclusive.
The therefore is the proration
where is the sample L-kurtosis,
is the upper bounds of the Kappa and
is the lower bounds of the AEP4 for the sample L-skew (
).
The parameter estimation for the AEP4 by paraep4
can fall back to pure Kappa if argument kapapproved=TRUE
is set. Such a fall back is unrelated to the mixture described here.
Usage
quaaep4kapmix(f, lmom, checklmom=TRUE)
Arguments
f |
Nonexceedance probability ( |
lmom |
A L-moment object created by |
checklmom |
Should the |
Value
Quantile value for nonexceedance probability .
Author(s)
W.H. Asquith
References
Asquith, W.H., 2014, Parameter estimation for the 4-parameter asymmetric exponential power distribution by the method of L-moments using R: Computational Statistics and Data Analysis, v. 71, pp. 955–970.
See Also
par2qua2
, quaaep4
, quakap
, paraep4
, parkap
Examples
## Not run:
FF <- c(0.0001, 0.0005, 0.001, seq(0.01,0.99, by=0.01), 0.999,
0.9995, 0.9999); Z <- qnorm(FF)
t3s <- seq(0, 0.5, by=0.1); T4step <- 0.02
pdf("mixture_test.pdf")
for(t3 in t3s) {
T4low <- (5*t3^2 - 1)/4; T4kapup <- (5*t3^2 + 1)/6
t4s <- seq(T4low+T4step, T4kapup+2*T4step, by=T4step)
for(t4 in t4s) {
lmr <- vec2lmom(c(0,1,t3,t4)) # make L-moments for lmomco
if(! are.lmom.valid(lmr)) next # for general protection
kap <- parkap(lmr)
if(kap$ifail == 5) next # avoid further work if numeric problems
aep4 <- paraep4(lmr, method="A")
X <- quaaep4kapmix(FF, lmr)
if(is.null(X)) next # one last protection
plot(Z, X, type="l", lwd=5, col=1, ylim=c(-15,15),
xlab="STANDARD NORMAL VARIATE",
ylab="VARIABLE VALUE")
mtext(paste("L-skew =",lmr$ratios[3],
" L-kurtosis = ",lmr$ratios[4]))
# Now add two more quantile functions for reference and review
# of the mixture. These of course would not be done in practice
# only quaaep4kapmix() would suffice.
if(! as.logical(aep4$ifail)) {
lines(Z, qlmomco(F,aep4), lwd=2, col=2)
}
if(! as.logical(kap$ifail)) {
lines(Z, qlmomco(F,kap), lwd=2, col=3)
}
message("t3=",t3," t4=",t4) # stout for a log file
}
}
dev.off()
## End(Not run)