Learn R Programming

e1071 (version 1.3-11)

kurtosis: Kurtosis

Description

Computes the kurtosis.

Usage

kurtosis(x, na.rm=FALSE)

Arguments

x
a numeric vector containing the values whose kurtosis is to be computed.
na.rm
a logical value indicating whether NA values should be stripped before the computation proceeds.

Value

  • The kurtosis of x.

Details

If $N = \mathrm{length}(x)$, then the kurtosis of $x$ is defined as $$N^{-1} \mathrm{sd}(x)^{-4} \sum_i(x_i - \mathrm{mean}(x))^4 - 3.$$

Examples

Run this code
x <- rnorm(100)
kurtosis(x)

Run the code above in your browser using DataLab