skewness
calculates the degree of skewness in a numerical
distribution. Implements the same functionality as the skewness functions in
the psych and e1071 packages for convenience so that those packages are not
required as dependencies for elucidate. Unlike the e1071 and psych packages,
the elucidate version uses the type 2 calculation as a default since this
incorporates a correction for sample size that also matches what is used in
SPSS and SAS.
skewness(y, na.rm = TRUE, type = 2)
a numeric vector/variable.
should missing values be removed before attempting to calculate skewness? Default is TRUE.
the calculation method you wish to use. See
skewness
and Joanes & Gill (1998) for details.
D. N. Joanes and C. A. Gill (1998), Comparing measures of sample skewness and kurtosis. The Statistician, 47, 183–189.
skewness
, skew
y <- rnorm(1:1000, 100, 15)
skewness(y)
#> [1] -0.1070297