R: Skewness and (excess) Kurtosis of a vector of values

moments {propagate} | R Documentation

## Skewness and (excess) Kurtosis of a vector of values

### Description

These functions calculate skewness and excess kurtosis of a vector of values. They were taken from the package 'moments'.

### Usage

    skewness(x, na.rm = FALSE)
    kurtosis(x, na.rm = FALSE)

### Arguments

`x` | a numeric vector, matrix or data frame.
`na.rm` | logical. Should missing values be removed?

### Details

Skewness:

\frac{\frac{1}{n} ∑_{i=1}^n (x_i-\overline{x})^3}{≤ft(\frac{1}{n} ∑_{i=1}^n (x_i-\overline{x})^2\right)^{3/2}}

(excess) Kurtosis:

\frac{\frac{1}{n} ∑_{i=1}^n (x_i - \overline{x})^4}{≤ft(\frac{1}{n} ∑_{i=1}^n (x_i - \overline{x})^2\right)^2} - 3

### Value

The skewness/kurtosis values.

### Author(s)

Andrej-Nikolai Spiess

### Examples

    X <- rnorm(100, 20, 2)
    skewness(X)
    kurtosis(X)

[Package propagate version 1.0-6 Index]