moment: Sample Moments

View source: R/ci_skew_and_kurtosis.R

momentR Documentation

Sample Moments

Description

Calculates central or non-central sample moments.

Usage

moment(z, p = 1, central = TRUE, na.rm = TRUE)

Arguments

z

A numeric vector.

p

Order of moment.

central

Should central moment be calculated? Default is TRUE.

na.rm

Logical flag indicating whether to remove missing values or not. Default is TRUE.

Value

Numeric vector of length 1.

See Also

skewness(), kurtosis()

Examples

moment(1:10, p = 1)
moment(1:10, p = 1, central = FALSE)
moment(1:10, p = 2) / stats::var(1:10)

confintr documentation built on June 7, 2023, 6:24 p.m.