kurtosis calculates the degree of kurtosis in a numerical distribution. Implements the same functionality as the kurtosis functions in the psych and e1071 packages for convenience so that those packages are not required as dependencies for elucidate. Unlike the e1071 and psych packages, the elucidate version uses the type 2 calculation as a default since this incorporates a correction for sample size that also matches what is used in SPSS and SAS.

kurtosis(y, na.rm = TRUE, type = 2)

Arguments

y

a numeric vector/variable.

na.rm

should missing values be removed before attempting to calculate kurtosis? Default is TRUE.

type

the calculation method you wish to use. See kurtosis and Joanes & Gill (1998) for details.

References

D. N. Joanes and C. A. Gill (1998), Comparing measures of sample skewness and kurtosis. The Statistician, 47, 183–189.

See also

kurtosis, kurtosi

Author

Craig P. Hutton, Craig.Hutton@gov.bc.ca

Examples

y <- rnorm(1:1000, 100, 15)
kurtosis(y)
#> [1] -0.2256022