cdfgam                package:lmomco                R Documentation

_C_u_m_u_l_a_t_i_v_e _D_i_s_t_r_i_b_u_t_i_o_n _F_u_n_c_t_i_o_n _o_f _t_h_e _G_a_m_m_a _D_i_s_t_r_i_b_u_t_i_o_n

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

     This function computes the cumulative probability or nonexceedance
     probability of the Gamma distribution given parameters (alpha and
     beta) of the distribution computed by 'pargam'.  The cumulative
     distribution function of the distribution has no explicit form,
     but is expressed as an integral.


 F(x) = frac{beta^{-alpha}}{Gamma(alpha)}int_0^x t^{alpha - 1}  e^{-t/beta} mbox{d}F mbox{,}


     where F(x) is the nonexceedance probability for the quantile x.
     The parameters have the following interpretation in the 'R'
     syntax; alpha is a shape parameter and beta is a scale parameter.

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

     cdfgam(x, para)

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

       x: A real value.

    para: The parameters from 'pargam' or similar.

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

     Nonexceedance probability (F) for x.

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

     W.H. Asquith

_R_e_f_e_r_e_n_c_e_s:

     Hosking, J.R.M., 1990, L-moments-Analysis and estimation of
     distributions using linear combinations of order statistics:
     Journal of the Royal Statistical Society, Series B, vol. 52, p.
     105-124.

     Hosking, J.R.M., 1996, FORTRAN routines for use with the method of
     L-moments: Version 3, IBM Research Report RC20525, T.J. Watson
     Research Center, Yorktown Heights, New York.

     Hosking, J.R.M. and Wallis, J.R., 1997, Regional frequency
     analysis-An approach based on L-moments: Cambridge University
     Press.

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

     'quagam', 'pargam'

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

       lmr <- lmom.ub(c(123,34,4,654,37,78))
       cdfgam(50,pargam(lmr))

       # A manual demonstration of a gamma parent
       G  <- vec2par(c(0.6333,1.579),type='gam') # the parent
       F1 <- 0.25         # nonexceedance probability
       x  <- quagam(F1,G) # the lower quartile (F=0.25)
       a  <- 0.6333       # gamma parameter
       b  <- 1.579        # gamma parameter
       # compute the integral
       xf <- function(t,A,B) { t^(A-1)*exp(-t/B) }
       Q  <- integrate(xf,0,x,A=a,B=b)
       # finish the math
       F2 <- Q$val*b^(-a)/gamma(a)
       # check the result
       if(abs(F1-F2) < 1e-8) print("yes")

