e1071_skewness: Skewness

e1071_skewnessR Documentation

Skewness

Description

stolen from e1071::skewness

Usage

e1071_skewness(x, na.rm = FALSE, type = 3)

Arguments

x

x a numeric vector containing the values whose skewness is to be computed.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

type

an integer between 1 and 3 selecting one of the algorithms for computing skewness detailed below.

Details

Type 1: g_1 = m_3 / m_2^(3/2) This is the typical definition used in many older textbooks.

Type 2: G_1 = g_1 sqrt(n(n-1)) / (n-2) Used in SAS and SPSS.

Type 3: b_1 = m_3 / s^3 = g_1 ((n-1)/n)^(3/2) Used in MINITAB and BMDP.

Examples

x <- rnorm(100)
e1071::skewness(x)

stp4/stp25tools documentation built on Feb. 27, 2025, 11:14 p.m.