skewness: Skewness

Description Usage Arguments Details Value Author(s) Examples

View source: R/skewness.R

Description

Computes the skewness of the data

Usage

1
skewness(x, na.rm = FALSE)

Arguments

x

data

na.rm

logical variable, if true, missing values are excluded from analysis

Details

Given data x_1,x_2,…, x_n, the sample skewness is defined by the formula:

\frac{∑_{i=1}^n (x_i-\bar{x})^3/n}{(∑_{i=1}^n (x_i-\bar{x})^2/n)^{3/2}}.

Value

The function returns the skewness of the data.

Author(s)

Kung-Sik Chan

Examples

1
2
3
data(CREF)
r.cref=diff(log(CREF))*100
skewness(r.cref)

TSA documentation built on July 2, 2018, 1:04 a.m.