# Equivalent Cumulative Distribution Function of Two Distributions

### Description

This function computes the nonexceedance probability of a given quantile from a linear weighted combination of two quantile functions but accomplishes this from the perspective of cumulative distribitution functions (see par2qua2). However, for the current implementation simply uniroot'ing of a internally declared function and par2qua2 is made.

The distributions are specified by the two parameter object arguments in usual lmomco style. The left-tail parameter object is the distribution obviously governing the left tail; the right-tail parameter object is of course governs the right tail. The quantile function algebra is

Q(F) = (1-F) \times Q_{\triangleleft}(F) + F \times Q_{\triangleright}(F)\mbox{,}

where Q(F) is the equivalent quantile for nonexceedance probability F computed by the tail weigthing. Q_{\triangleleft}(F) is the left-tail quantile function; Q_{\triangleright}(F) is the right-tail quantile function. The par2cdf2 function inverses the above equation for F. Parameter objects are discussed in lmom2par and vec2par. If the optional weight argument is provided, then the multiplication of 1-F or F is replaced by 1-weight or weight, respectively. If weight=0, then the quantiles for the right tail are returned, and if weight=1, then the quantiles for the left tail are returned. The biggest feature on this function is that a vector of real values is used as the primary argument and not a vector of F.

A word of caution. The resulting weighted quantile function is not checked for monotonic increase with F. This is a required property of quantile functions.

### Usage

 1 par2cdf2(x, leftpara, rightpara, weight=NULL, ...) 

### Arguments

 x A real value vector. leftpara The left-tail parameters from lmom2par or vec2par. rightpara The right-tail parameters from lmom2par or vec2par. weight An optional weighting argument to use in lieu of the F. Consult the documentation for par2qua2 for the implementation details when weight is NULL. ... The additional arguments are passed to the cumulative distribution function such as paracheck=FALSE for the Generalized Lambda distribution (cdfgld).

### Value

Nonexceedance probabilities (0 ≤ F ≤ 1) for x from the two distributions.

### Author(s)

W.H. Asquith

par2cdf, lmom2par, par2qua2

### Examples

 1 2 3 4 5 # Contrived example lmr <- lmoms(rnorm(20)) leftpara <- parnor(lmr); rightpara <- pargev(lmr) combined.median <- par2qua2(0.5,leftpara,rightpara) combined.nonexceed <- par2cdf2(combined.median,leftpara,rightpara) 

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.