moments                 package:emu                 R Documentation

_F_u_n_c_t_i_o_n _t_o _c_a_l_c_u_l_a_t_e _s_t_a_t_i_s_t_i_c_a_l _m_o_m_e_n_t_s

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

     The function calculates the first 4 moments, i.e. the mean,
     variance,  skew, kurtosis.

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

     moments(count, x, minval = FALSE)

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

   count: A vector of the observed instances per class 

       x: A vector of the same length as count defining the class. If
          missing, and if count is of class spectral, then x is equal
          to trackfreq(count). If x is missing and is not of class
          spectral, then x default to 0:(length(count)-1) 

  minval: If T, subtract min(count) from count so that the minimum
          value of count is zero. This is principally used in
          calculating spectral moments where count is in decibels, and
          more generally if count contains negative values.

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

     The units of the first moment are the same as x, the units of the
     second moment are x^2, and the third and fourth moments are
     dimensionless.

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

     Jonathan Harrington

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

     Snedecor, G & Cochran, W. 'Statistical Methods' Iowa State Press.
     Wuensch,K., 2005

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

     # first four moments of a vector
     mom <- moments(bridge[,2])
     # the above is the same as moments(bridge[,2], 0:12)
     # first four moments of a spectral vector with the dB values
     # reset so that the minimum dB value is 0. The d.c. offset is also
     # excluded in the calculation
     mom <- moments(e.dft[-1], minval=TRUE)
     # the temporal skew of F1 for the 10th segment. Use
     m <- moments(vowlax.fdat[10,1]$data)[3]

