par2qua2               package:lmomco               R Documentation

_E_q_u_i_v_a_l_e_n_t _Q_u_a_n_t_i_l_e _F_u_n_c_t_i_o_n _o_f _T_w_o _D_i_s_t_r_i_b_u_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     This function combines two distributions into one by weighting of
     the two quantile functions by the nonexceedance probability. The
     distributions are specified by the parameter arguments. The
     left-tail parameter object is the distribution governing the left
     tail; the right-tail parameter object is the distribution
     governing the right tail. The quantile function algebra is


    Q(F) = (1-F) times Q_{lefttail}(F) + F times Q_{righttail}(F)


     where Q(F) is the equivalent quantile for nonexceedance
     probability F computed by the tail weigthing. Q_{lefttail}(F) is
     the left-tail quantile function; Q_{righttail} is the right-tail
     quantile function.  Parameter objects are discussed in 'vec2par'
     and 'lmom2par' functions. 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.

     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.

_U_s_a_g_e:

     par2qua2(f,leftpara,rightpara,weight=NULL,...)

_A_r_g_u_m_e_n_t_s:

       f: Nonexceedance probability (0 <= F <= 1).

leftpara: The left-tail parameters from 'lmom2par' or similar.

rightpara: The right-tail parameters from 'lmom2par' or similar.

  weight: An optional weighting argument to use in lieu of 'F'.

     ...: The additional arguments are passed to the quantile function
          such as 'paracheck = FALSE' for the generalized Lambda
          distribution ('quagld').

_V_a_l_u_e:

     Quantile value for F from the two distributions.

_A_u_t_h_o_r(_s):

     W.H. Asquith

_S_e_e _A_l_s_o:

     'par2qua', 'lmom2par', and 'par2cdf2'

_E_x_a_m_p_l_e_s:

     # Contrived example
     lmr       <- lmom.ub(rnorm(20))
     leftpara  <- parnor(lmr)
     rightpara <- pargev(lmr)
     combined.median <- par2qua2(0.5,leftpara,rightpara)

     # 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)
     LM  <- lmom.ub(D)
     KAP <- parkap(LM)
     NOR <- parnor(LM)
     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))

