theoTLmoms              package:lmomco              R Documentation

_T_h_e _T_h_e_o_r_e_t_i_c_a_l _T_r_i_m_m_e_d _L-_m_o_m_e_n_t_s _a_n_d _T_L-_m_o_m_e_n_t _R_a_t_i_o_s _u_s_i_n_g _I_n_t_e_g_r_a_t_i_o_n _o_f _t_h_e _Q_u_a_n_t_i_l_e _F_u_n_c_t_i_o_n

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

     Compute the theoretrical trimmed L-moments (TL-moments) for a
     vector. The level of symmetrical or asymmetrical trimming is
     specified. A theoretrical TL-moment in integral form is 


 lambda^{(t_1,t_2)}_r = underbrace{frac{1}{r}}_{stackrel{mbox{average}}{mbox{of terms}}} sum^{r-1}_{k=0} overbrace{(-1)^k}^{mbox{differences}} underbrace{ r-1 choose k }_{mbox{combinations}} frac{overbrace{(r+t_1+t_2)!}^{mbox{sample size}}: I^{(t_1,t_2)}_r} {underbrace{(r+t_1-k-1)!}_{mbox{left tail}} underbrace{(t_2+k)!}_{mbox{right tail}}} mbox{, in which }



 I^{(t_1,t_2)}_r = int^1_0  underbrace{X(F)}_{stackrel{mbox{quantile}}{mbox{function}}} times  overbrace{F^{r+t_1-k-1}}^{mbox{left tail}} overbrace{(1-F)^{t_2+k}}^{mbox{right tail}} ,mathrm{d}F mbox{,}


     where X(F) is the quantile function of the random variable X for
     nonexceedance probability F, t_1 represents the trimming level of
     the t_1-smallest, t_2 represents the trimming level of the
     t_2-largest  values, r represents the order of the L-moments. This
     function loops across the above equation for each 'nmom' set in 
     the argument list. The function X(F) is computed through the
     'par2qua' function. The distribution type is determined using the
     'type' attribute of the 'para' argument-the parameter object.

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

     theoTLmoms(para,nmom=5,trim=NULL,leftrim=NULL, 
     rightrim=NULL,verbose=FALSE)

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

    para: A distribution parameter object of this package 'vec2par'.

    nmom: The number of moments to compute. Default is 5.

    trim: Level of symmetrical trimming to use in the computations. 
          Although 'NULL' in the argument list, the default is 0-the
          usual L-moment is returned.

 leftrim: Level of trimming of the left-tail of the sample.

rightrim: Level of trimming of the right-tail of the sample.

 verbose: Toggle verbose output. Because the R function 'integrate' is
          used to perform the numerical integration, it might be useful
          to see selected messages regarding the numerical integration.

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

     An R 'list' is returned.

 lambdas: Vector of the TL-moments. First element is
          lambda^{(t_1,t_2)}_1, second element is lambda^{(t_1,t_2)}_2,
          and so on.

  ratios: Vector of the L-moment ratios. Second element is 
          tau^{(t_1,t_2)}, third element is tau^{(t_1,t_2)}_3 and so
          on.

    trim: Level of symmetrical trimming used in the computation, which
          will equal 'NULL' if asymmetrical trimming was used.

 leftrim: Level of left-tail trimming used in the computation.

rightrim: Level of right-tail trimming used in the computation.

  source: An attribute identifying the computational source of the
          L-moments: "theoTLmoms".

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

     Elamir, E.A.H., and Seheult, A.H., 2003, Trimmed L-moments:
     Computational Statistics and Data Analysis, vol. 43, pp. 299-314.

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

     'theoLmoms', 'par2qua', 'TLmoms', 'lmom.ub'

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

     para <- vec2par(c(0,1),type='nor') # standard normal
     TL00 <- theoTLmoms(para) # compute ordinary L-moments
     TL30 <- theoTLmoms(para,leftrim=3,rightrim=0) # trim 3 smallest samples

     # Lets look at the difference from simulation to theoretrical using
     # L-kurtosis and asymmetrical trimming for generalized Lambda dist.
     P <- vec2par(c(10000,10000,6,.4),type='gld')
     Lkurt <- TLmoms(quagld(runif(100),P),rightrim=3,leftrim=0)$ratios[4]
     theoLkurt <- theoTLmoms(P,rightrim=3,leftrim=0)$ratios[4]
     Lkurt - theoLkurt # as the number for runif goes up, this 
                       # difference goes to zero

     # Example using the Generalized Pareto Distribution
     # to verify computations from theoretical and sample stand point.
     n      <- 100 # really a much larger sample should be used---for speed
     P      <- vec2par(c(12,34,4),type='gpa')
     theoTL <- theoTLmoms(P,rightrim=2,leftrim=4)
     samTL  <- TLmoms(quagpa(runif(n),P),rightrim=2,leftrim=4)
     del    <- samTL$ratios[3] - theoTL$ratios[3] # if n is large difference
                                                  # is small
     str(del)

