Learn R Programming

PerformanceAnalytics (version 0.9.7.1)

skewness: Skewness

Description

compute skewness of a univariate distribution.

Usage

skewness(x, na.rm = FALSE, method = c("moment", "fisher"), ...)

Arguments

na.rm
a logical. Should missing values be removed?
method
a character string which specifies the method of computation. These are either "moment" or "fisher" The "moment" method is based on the definitions of skewnessfor distributions; these forms sh
x
a numeric vector or object.
...
arguments to be passed.

Value

  • skewness returns the value of the statistics, a numeric value. An attribute which reports the used method is added.

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

See Also

kurtosis.

Examples

Run this code
## mean -
## var -
   # Mean, Variance:
   r = rnorm(100)
   mean(r)
   var(r)

## skewness -
   skewness(r)

Run the code above in your browser using DataLab