Learn R Programming

healthyR.ai (version 0.1.0)

hai_skewness_vec: Compute Skewness of a Vector

Description

This function takes in a vector as it's input and will return the skewness of that vector. The length of this vector must be at least four numbers. The skewness explains the 'tailedness' of the distribution of data.

((1/n) * sum(x - mu})^3) / ((()1/n) * sum(x - mu)^2)^(3/2)

Usage

hai_skewness_vec(.x)

Value

The skewness of a vector

Arguments

.x

A numeric vector of length four or more.

Author

Steven P. Sanderson II, MPH

Details

A function to return the skewness of a vector.

See Also

https://en.wikipedia.org/wiki/Skewness

Other Vector Function: hai_fourier_discrete_vec(), hai_fourier_vec(), hai_hyperbolic_vec(), hai_kurtosis_vec(), hai_scale_zero_one_vec(), hai_scale_zscore_vec(), hai_winsorized_move_vec(), hai_winsorized_truncate_vec()

Examples

Run this code
hai_skewness_vec(rnorm(100, 3, 2))

Run the code above in your browser using DataLab