This function takes in a vector as it's input and will return the kurtosis of that vector. The length of this vector must be at least four numbers. The kurtosis explains the sharpness of the peak of a distribution of data.
((1/n) * sum(x - mu})^4) / ((()1/n) * sum(x - mu)^2)^2
See also
https://en.wikipedia.org/wiki/Kurtosis
Other Vector Function:
hai_fourier_discrete_vec()
,
hai_fourier_vec()
,
hai_hyperbolic_vec()
,
hai_scale_zero_one_vec()
,
hai_scale_zscore_vec()
,
hai_skewness_vec()
,
hai_winsorized_move_vec()
,
hai_winsorized_truncate_vec()
Examples
hai_kurtosis_vec(rnorm(100, 3, 2))
#> [1] 3.171581