Calculates kurtosis which is a measure of the "taildness" of a distribution.

kurt(x, type = 2, excess = TRUE)

Arguments

x

Numeric vector. Sample data.

type

Integer. 1, 2, or 3. See details.

excess

Logical. Return excess kurtosis (kurtosis minus 3).

Details

Type 1 $$ g_2 = \frac{m_4}{m_{2}^{2}} %(\#eq:dist-moments-g2) $$

Type 2 $$ G_2 = \frac{K_4}{K_{2}^{2}} %(\#eq:dist-moments-G2) $$

Type 3 $$ b_2 = \frac{m_4}{s^4} %(\#eq:dist-moments-b2) $$

References

Joanes, D., & Gill, C. (1998). Comparing Measures of Sample Skewness and Kurtosis. Journal of the Royal Statistical Society. Series D (The Statistician), 47(1), 183-189. 2988433

Wikipedia: Kurtosis

See also

Other moments functions: cumulant(), moments(), moment(), skew()

Examples

x <- c( 10, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17 ) kurt(x, type = 1)
#> [1] -0.07533431
kurt(x, type = 2)
#> [1] 0.274319
kurt(x, type = 3)
#> [1] -0.3604892
x <- rnorm(n = 1000) kurt(x, type = 1)
#> [1] -0.1959919
kurt(x, type = 2)
#> [1] -0.1909513
kurt(x, type = 3)
#> [1] -0.2015971