Learn R Programming

MSMU (version 0.1.2)

shape_stats: Computes Sample Skew and Kurtosis

Description

Calculates the skewness of a numeric vector (via skew()). A positive value indicates right skew (long right tail), while a negative value indicates left skew (long left tail). A zero value represents symmetry. Calculates the kurtosis of a numeric vector (via kurt()). A value near 0 suggests normal kurtosis (mesokurtic), positive values indicate heavier tails (leptokurtic), and negative values indicate lighter tails (platykurtic).

Usage

shape_stats(x)

Value

A list with two elements:

skew

Skew of Data from skew()

kurt

Kurtosis of Data from kurt()

Arguments

x

A numeric vector.

Examples

Run this code
# Shape stats of mpg in mtcars
data("mtcars")
shape_stats(mtcars$mpg)


Run the code above in your browser using DataLab