Various asymmetry and kurtosis results from timDate and Moments packages

let a = c(1:9,1) , in library(timeDate) (which is also imported into library(fBasics) ), skewness(a) = 0.10901 and kurtosis(a) = -1.634 ,.

in library(moments) , skewness(a) = 0.1277 and kurtosis(a) - 3 = -1.313, which correspond to the results from Matlab.

Is this a bug in one of these packages?

+4
source share
1 answer

There are several ways to evaluate population moments. You can compare these different methods using the asymmetry and excess functions in the e1071 package.

 > library(e1071) > skewness(a,,1) [1] 0.1277249 > skewness(a,,2) [1] 0.1514631 > skewness(a,,3) [1] 0.1090534 > kurtosis(a,,1) [1] -1.313042 > kurtosis(a,,2) [1] -1.356985 > kurtosis(a,,3) [1] -1.633564 

All these measures are valid and impartial (at least in the case of normality). according to DN Joanes and CA Gill (1998) (Comparing sample asymmetry and kurtosis. Statistics 47, 183-189.), type 3 works best in abnormal populations, while type 2 works best for normal populations. Type 1 is an earlier definition.

In large samples, the difference between these estimates becomes negligible. see "asymmetry" for the formulas used.

+9
source

Source: https://habr.com/ru/post/1339775/


All Articles