Skip to contents

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

Usage

hai_kurtosis_vec(.x)

Arguments

.x

A numeric vector of length four or more.

Value

The kurtosis of a vector

Details

A function to return the kurtosis of a vector.

Author

Steven P. Sanderson II, MPH

Examples

hai_kurtosis_vec(rnorm(100, 3, 2))
#> [1] 3.171581