moments                package:nsRFA                R Documentation

_S_a_m_p_l_e _m_o_m_e_n_t_s

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

     'moments' provides the estimate of the first 4 moment-statistics
     of a sample.

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

      moments (x)
      CV (x)
      skew (x)
      kurt (x)

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

       x: vector representing a data-sample

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

     Skewness and kurtosis are defined as:

           skew = n^(-1) sd(x)^(-3) sum_i (x_i - mean(x))^3


         kurt = n^(-1) sd(x)^(-4) sum_i (x_i - mean(x))^4 - 3

     where n is the size of 'x'. See <URL:
     http://en.wikipedia.org/wiki/Skewness> and <URL:
     http://en.wikipedia.org/wiki/Kurtosis> for additional
     informations.

_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', 'Lmoments'.

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

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

     data(hydroSIMN)
     x <- annualflows["dato"][,]
     cod <- annualflows["cod"][,]
     sapply(split(x,cod),moments)

