EXP                  package:nsRFA                  R Documentation

_T_w_o _p_a_r_a_m_e_t_e_r _e_x_p_o_n_e_n_t_i_a_l _d_i_s_t_r_i_b_u_t_i_o_n _a_n_d _L-_m_o_m_e_n_t_s

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

     'EXP' provides the link between L-moments of a sample and the two
     parameter exponential distribution.

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

     f.exp (x, xi, alfa)
     F.exp (x, xi, alfa)
     invF.exp (F, xi, alfa)
     Lmom.exp (xi, alfa)
     par.exp (lambda1, lambda2)
     rand.exp (numerosita, xi, alfa)

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

       x: vector of quantiles

      xi: vector of exp location parameters

    alfa: vector of exp scale parameters

       F: vector of probabilities

 lambda1: vector of sample means

 lambda2: vector of L-variances

numerosita: numeric value indicating the length of the vector to be
          generated

_D_e_t_a_i_l_s:

     See <URL: http://en.wikipedia.org/wiki/Exponential_distribution>
     for a brief introduction on the Exponential distribution.

     *Definition*

     Parameters (2): xi (lower endpoint of the distribution), alpha
     (scale).

     Range of x: xi <= x < infty.

     Probability density function:

                 f(x) = alpha^{-1} exp{-(x-xi)/alpha}


     Cumulative distribution function:

                    F(x) = 1 - exp{-(x-xi)/alpha}


     Quantile function:

                      x(F) = xi - alpha log(1-F)


     *L-moments*


                        lambda_1 = xi + alpha


                      lambda_2 = 1/2 cdot alpha


                             tau_3 = 1/3


                             tau_4 = 1/6


     *Parameters*

     If xi is known, alpha is given by alpha = lambda_1 - xi and the
     L-moment, moment, and maximum-likelihood estimators are identical.
     If xi is unknown, the parameters are given by

                          alpha = 2 lambda_2


                        xi = lambda_1 - alpha

     For estimation based on a single sample these estimates are
     inefficient, but in regional frequency analysis they can give
     reasonable estimates of upper-tail quantiles.

     'Lmom.exp' and 'par.exp' accept input as vectors of equal length.
     In 'f.exp', 'F.exp', 'invF.exp' and 'rand.exp' parameters ('xi',
     'alfa') must be atomic.

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

     'f.exp' gives the density f, 'F.exp' gives the distribution
     function F, 'invFexp' gives the quantile function x, 'Lmom.exp'
     gives the L-moments (lambda_1, lambda_2, tau_3, tau_4), 'par.exp'
     gives the parameters ('xi', 'alfa'), and 'rand.exp' generates
     random deviates.

_N_o_t_e:

     For information on the package and the Author, and for all the
     references, see 'nsRFA'.

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

     'rnorm', 'runif', 'GENLOGIS', 'GENPAR', 'GEV', 'GUMBEL', 'KAPPA',
     'LOGNORM', 'P3'; 'DISTPLOTS', 'GOFmontecarlo', 'Lmoments'.

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

     data(hydroSIMN)
     annualflows
     summary(annualflows)
     x <- annualflows["dato"][,]
     fac <- factor(annualflows["cod"][,])
     split(x,fac)

     camp <- split(x,fac)$"45"
     ll <- Lmoments(camp)
     parameters <- par.exp(ll[1],ll[2])
     f.exp(1800,parameters$xi,parameters$alfa)
     F.exp(1800,parameters$xi,parameters$alfa)
     invF.exp(0.7870856,parameters$xi,parameters$alfa)
     Lmom.exp(parameters$xi,parameters$alfa)
     rand.exp(100,parameters$xi,parameters$alfa)

     Rll <- regionalLmoments(x,fac); Rll
     parameters <- par.exp(Rll[1],Rll[2])
     Lmom.exp(parameters$xi,parameters$alfa)

