estimate_kurtosis: Estimate kurtosis

View source: R/analyze_data.R

estimate_kurtosisR Documentation

Estimate kurtosis

Description

Estimate the kurtosis of a numeric distribution.

Usage

estimate_kurtosis(x, na_rm = TRUE)

Arguments

x

Numeric vector.

na_rm

Logical value. If TRUE, missing values are removed before estimation.

Details

The function computes the moment-based kurtosis

\frac{n \sum_i (x_i - \bar{x})^4} {\left(\sum_i (x_i - \bar{x})^2\right)^2}

Missing values are removed by default.

This returns the usual kurtosis, not excess kurtosis. A normal distribution has kurtosis close to 3.

Value

A numeric value giving the estimated kurtosis.

See Also

Other data analysis: acf_vec(), estimate_acf(), estimate_mode(), estimate_pacf(), estimate_skewness(), pacf_vec(), summarise_data(), summarise_split(), summarise_stats()

Examples

x <- c(1, 2, 3, 4, 5, NA)

estimate_kurtosis(x)
estimate_kurtosis(x, na_rm = TRUE)

set.seed(123)
y <- rnorm(100)
estimate_kurtosis(y)

tscv documentation built on May 13, 2026, 9:07 a.m.