Description
Functions to calculate moments, skewness, and Pearson's measure of kurtosis. The latter is defined as the ratio of the 4th central moment and the squared second central moment. For a theoretical normal distribution, the kurtosis equals 3.
Usage
moment(z, p = 1, central = TRUE, na.rm = TRUE)skewness(z, na.rm = TRUE)
kurtosis(z, na.rm = TRUE)
Arguments
central
Should central moment be calculated? Default is TRUE
.
na.rm
Should missing values be removed? Default is TRUE
. Otherwise, the result will be NA
if missing values are present.
Value
A numeric vector of length one.
Examples
Run this code# NOT RUN {
x <- 1:100
moment(x, 4)
skewness(x)
kurtosis(x)
# }
Run the code above in your browser using DataLab