Calculate the excess kurtosis of a set of data
Usage
kurtosis(x, na.rm = FALSE, excess = TRUE)
Arguments
- x
a vector of observations
- na.rm
remove NAs?
- excess
if false calculates raw kurtosis rather than excess
Value
the excess kurtosis
Examples
kurtosis(stats::rnorm(1000))
#> [1] 0.02239198
kurtosis(stats::rpois(1000, 2)) # leptokurtic > 0 (usually)
#> [1] 0.552971
kurtosis(stats::runif(1000)) # platykurtic: < 0
#> [1] -1.220232
kurtosis(stats::rlnorm(1000))
#> [1] 14.2738