kurtosis {e1071} | R Documentation |
Kurtosis
Description
Computes the kurtosis.
Usage
kurtosis(x, na.rm = FALSE, type = 3)
Arguments
x |
a numeric vector containing the values whose kurtosis is to be computed. |
na.rm |
a logical value indicating whether |
type |
an integer between 1 and 3 selecting one of the algorithms for computing kurtosis detailed below. |
Details
If x
contains missings and these are not removed, the kurtosis
is NA
.
Otherwise, write for the non-missing elements of
x
,
for their number,
for their mean,
for
their standard deviation, and
for the sample moments of order
.
Joanes and Gill (1998) discuss three methods for estimating kurtosis:
- Type 1:
-
. This is the typical definition used in many older textbooks.
- Type 2:
-
. Used in SAS and SPSS.
- Type 3:
-
. Used in MINITAB and BMDP.
Only (corresponding to
type = 2
) is unbiased under
normality.
Value
The estimated kurtosis of x
.
References
D. N. Joanes and C. A. Gill (1998), Comparing measures of sample skewness and kurtosis. The Statistician, 47, 183–189.
Examples
x <- rnorm(100)
kurtosis(x)