Skip to contents

Mirrors the C# Statistics.ProductMoments: the mean, sample standard deviation, and the bias-corrected skewness and excess kurtosis. Requires at least 4 observations (returns NaN otherwise, matching the C# behavior).

Usage

product_moments(x)

Arguments

x

numeric vector.

Value

a named numeric vector with entries mean, sd, skewness, kurtosis.

Examples

product_moments(c(2.1, 3.4, 1.8, 4.9, 3.3, 2.7, 5.1, 3.9))
#>       mean         sd   skewness   kurtosis 
#>  3.4000000  1.2035661  0.1940322 -1.1212107