skewness {PerformanceAnalytics} | R Documentation |
Skewness
Description
compute skewness of a univariate distribution.
Usage
skewness(x, na.rm = FALSE, method = c("moment", "fisher", "sample"), ...)
Arguments
x |
a numeric vector or object. |
na.rm |
a logical. Should missing values be removed? |
method |
a character string which specifies the method of computation.
These are either |
... |
arguments to be passed. |
Details
This function was ported from the RMetrics package fUtilities to eliminate a
dependency on fUtiltiies being loaded every time. The function is identical
except for the addition of checkData and column support.
where is the number of return,
is the mean of the return
distribution,
is its standard deviation and
is its
sample standard deviation
Author(s)
Diethelm Wuertz, Matthieu Lestel
References
Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.83-84
See Also
Examples
## mean -
## var -
# Mean, Variance:
r = rnorm(100)
mean(r)
var(r)
## skewness -
skewness(r)
data(managers)
skewness(managers)