Lmoments              package:Lmoments              R Documentation

_L-_m_o_m_e_n_t_s

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

     Calculates sample L-moments, L-coefficients and covariance matrix
     of L-moments.

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

     Lmoments(data,rmax=4,na.rm=FALSE,returnobject=FALSE,trim=c(0,0))
     Lcoefs(data,rmax=4,na.rm=FALSE,trim=c(0,0))
     Lmomcov(data,rmax=4,na.rm=FALSE)
     Lmoments_calc(data,rmax=4)
     Lmomcov_calc(data,rmax=4)

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

    data: matrix or data frame.

    rmax: maximum order of L-moments.

   na.rm: a logical value indicating whether 'NA' values should be
          removed before the computation proceeds.

returnobject: a logical value indicating whether a list object should
          be returned instead of an array of L-moments.

    trim: c(0,0) for ordinary L-moments and c(1,1) for trimmed (t=1)
          L-moments

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

Lmoments: returns an array of L-moments containing a row for each
          variable in data, or if returnobject=TRUE,  a list containing 

     _l_a_m_b_d_a_s an array of L-moments 

     _r_a_t_i_o_s an array of mean, L-scale and L-moment ratios

     _t_r_i_m the value of the parameter 'trim'

     _s_o_u_r_c_e a string with value "Lmoments" or "t1lmoments".

  Lcoefs: returns an array of L-coefficients (mean, L-scale,
          L-skewness, L-kurtosis, ...)  containing a row for each
          variable in data.

 Lmomcov: returns the covariance matrix of L-moments or a list of
          covariance matrices if the input has multiple columns.

Lmoments_calc: is internal function.

Lmomcov_calc: is internal function.

_N_o_t_e:

     Functions 'Lmoments' and 'Lcoefs' calculate trimmed L-moments if
     you specify 'trim=c(1,1)'.

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

     Juha Karvanen <juha.karvanen@ktl.fi>

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

     Karvanen, J. 2005. Estimation of quantile mixtures via L-moments
     and trimmed L-moments,  _Computational Statistics & Data
     Analysis_, in press,  <URL:
     http://www.bsp.brain.riken.jp/publications/2005/karvanen_quantile_
     mixtures.pdf>.

     Elamir, E. A., Seheult, A. H. 2004. Exact variance structure of
     sample L-moments, _Journal of  Statistical Planning and Inference_
     *124* (2) 337-359.

     Hosking, J. 1990. L-moments: Analysis and estimation distributions
     using linear combinations of order statistics,  _Journal of Royal
     Statistical Society B_ *52*, 105-124.

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

     't1lmoments' for trimmed L-moments, 'dnormpoly', 'lmom2normpoly4'
     and 'covnormpoly4' for the normal-polynomial quantile mixture and
     package 'lmomco' for additional L-moment functions

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

     #Generates a sample 500 observations from the normal-polynomial quantile mixture, 
     #calculates the L-moments and their covariance matrix,
     #estimates parameters via L-moments and 
     #plots the true pdf and the estimated pdf together with the histogram of the data.
     true_params<-lmom2normpoly4(c(0,1,0.2,0.05));
     x<-rnormpoly(500,true_params);
     lmoments<-Lmoments(x);
     lmomcov<-Lmomcov(x);
     estim_params<-lmom2normpoly4(lmoments);
     hist(x,30,freq=FALSE)
     plotpoints<-seq(min(x)-1,max(x)+1,by=0.01);
     lines(plotpoints,dnormpoly(plotpoints,estim_params),col='red');
     lines(plotpoints,dnormpoly(plotpoints,true_params),col='blue');

