Using Wikipedia’s definition of standardized moments, I obtained the same results:
> y <- x - mean(x)
> sum(y^3)/10000 / (sum(y^2)/10000)^1.5
[1] 0.00500129
> sum(y^4)/10000 / (sum(y^2)/10000)^2 - 3
[1] 0.02223541
So indeed 0.02223541 is the excess kurtosis. OnlineStat’s kurtosis is approx. 3 apart so your observation is likely correct.
I still don’t understand what algorithm OnlineStats uses, however. Same question for skewness as there’s no excess in skewness… I may just dive into the source code when I have time…
(Meyer et al. 2017) which by default uses type = 3.
Similarly, for kurtosis the difference is that e1071 uses type = 3 by default and StatsBase computes type = 1.
I am unfamiliar with OnlineStats, but you can probably read the documentation to find out.
The following comment in the code gives a hint that it does not represent the central moment. It seems to be keeping tracking of moment about the origin (as opposed to moment about the mean.)
I found that OnlineStats provides skewness and kurtosis functions that take Moments as an argument, hence: