Lmoments                package:nsRFA                R Documentation

_H_o_s_k_i_n_g _a_n_d _W_a_l_l_i_s _s_a_m_p_l_e _L-_m_o_m_e_n_t_s

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

     'Lmoments' provides the estimate of L-moments of a sample or
     regional L-moments of a region.

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

      Lmoments (x)
      regionalLmoments (x,cod)
      LCV (x)
      LCA (x)
      Lkur (x)

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

       x: vector representing a data-sample (or data from many samples
          defined with 'cod' in the case of 'regionalLmoments')

     cod: array that defines the data subdivision among sites

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

     The estimation of L-moments is based on a sample of size n,
     arranged in ascending order. Let x(1:n) <= x(2:n) <= ... <= x(n:n)
     be the ordered sample. An unbiased estimator of the probability
     weighted moments betar is:

 br = 1/n sum[j from r+1 to n](x(j:n) (j-1)(j-2)...(j-r)/(n-1)/(n-2)/.../(n-r))


     The sample L-moments are defined by:

                               l1 = b0


                            l2 = 2b1 - b0


                         l3 = 6b2 - 6b1 + b0


                     l4 = 20b3 - 30b2 + 12b1 - b0

     and in general

 l(r+1) = sum[k from 0 to r](b_k (-1)^(r-k) (r+k)! / (k!)^2 / (r-k)!)

     where r=0, 1, ..., n-1.

     The sample L-moment ratios are defined by

                             tr = lr / l2

     and the sample L-CV by

                             t = l2 / l1


     Sample regional L-CV, L-skewness and L-kurtosis coefficients are
     defined as

     t^R = sum[i from 1 to k](ni t^(i)) / sum[i from 1 to k](ni)


    t3^R = sum[i from 1 to k](ni t3^(i)) / sum[i from 1 to k](ni)


    t4^R = sum[i from 1 to k](ni t4^(i)) / sum[i from 1 to k](ni)

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

     'Lmoments' gives the L-moments (l_1, l_2, t, t_3, t_4),
     'regionalLmoments' gives the regional weighted L-moments (l_1^R,
     l_2^R, t^R, t_3^R, t_4^R), 'LCV' gives the coefficient of
     L-variation, 'LCA' gives the L-skewness and 'Lkur' gives the
     L-kurtosis of 'x'.

_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:

     'mean', 'var', 'sd', 'HOMTESTS'.

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

     x <- rnorm(30,10,2)
     Lmoments(x)

     data(hydroSIMN)
     annualflows
     summary(annualflows)
     x <- annualflows["dato"][,]
     cod <- annualflows["cod"][,]
     split(x,cod)
     camp <- split(x,cod)$"45"
     Lmoments(camp)
     sapply(split(x,cod),Lmoments)

     regionalLmoments(x,cod)

