skew.misc {univOutl}R Documentation

Calculates some skewness measures.

Description

The function calculates some skewness measures for the input vector data.

Usage

skew.misc(x, weights=NULL)

Arguments

x

Input vector containing data for which skewness will be calculated.

weights

Optional vector with eventual non-negative weights associated to the units in x

Details

This function calculates Pearson's skewness coefficient, the MedCouple measure of skewness and the non-parametric Bowley's measure of symmetry. The Bowley's skewness measure uses quartiles:

b = \frac{(Q_3 - Q_2) - (Q_2 - Q_1) }{Q_3 - Q_1}

It ranges between -1 and +1, where positive (negative) values denote right (left) skewness. A value equal to 0 indicates symmetry. A crude measure of skewness can be obtained with a monotonic increasing function of b:

g=\frac{1+b}{1-b}

It ranges from 0 to Inf, g=1 indicates symmetry.

A measure of skewness similar to the Bowley's one is achieved by replacing Q3 and Q1 with respectively P90 and P10 percentiles:

b_P = \frac{(P_{90} - P_{50}) - (P_{50} - P_{10}) }{P_{90} - P_{10}}

Similarly

g_P=\frac{1+b_P}{1-b_P}

For major details see Kotz at al. (2006, vol. 12, pp. 7771-7772).

The medCouple measure of skewness, M, ranges from -1 to +1 and is equal to 0 in case of symmetry, while M > 0 indicates positive skewness. For major details see mc.

Note that eventual weights, passed through the argument weights, are used ONLY in the calculation of the Bowley's type measures.

Value

A vector with the estimated measures of skewness.

Author(s)

Marcello D'Orazio mdo.statmatch@gmail.com

References

Kotz S. et al. (2006) Encyclopedia of Statistical Sciences, Volume 12. John Wiley and Sons.

See Also

mc

Examples


set.seed(112233)
y <- rnorm(n = 30, mean = 50, sd = 10)
y[20] <- 100

skew.misc(x = y, weights=NULL)

# use weights
ww <- runif(n = 30, min = 1, max = 10)
skew.misc(x = y, weights=ww)


[Package univOutl version 0.4 Index]