skewness and kurtosis | R Documentation |
This uses the S+ version directly.
skewness(x, na.rm = FALSE, method = "fisher")
kurtosis(x, na.rm = FALSE, method = "fisher")
x |
Any numerical object. Missing values |
na.rm |
Logical flag: if na.rm=TRUE, missing values are removed from x
before doing the computations. If |
method |
Character string specifying the computation method. The two
possible values are |
The moment
forms are based on the definitions of skewness and kurtosis
for distributions; these forms should be used when resampling (bootstrap or
jackknife). The "fisher" forms correspond to the usual "unbiased" definition of
sample variance, though in the case of skewness and kurtosis exact unbiasedness
is not possible.
A single value of skewness or kurtotis.
If y = x - mean(x), then the "moment" method computes the skewness value as
mean(y\mbox{\textasciitilde}
3)/mean(y\mbox{\textasciitilde}
2)
\mbox{\textasciitilde}
1.5
and the kurtosis value as mean(y\mbox{\textasciitilde}
4)/mean(y
\mbox{\textasciitilde}
2)\mbox{\textasciitilde}
2 - 3.
To see the "fisher" calculations, print out the functions.
Splus
var
x <- runif(30)
skewness(x)
skewness(x, method="moment")
kurtosis(x)
kurtosis(x, method="moment")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.