Compute the ‘medcouple’, a robust concept and estimator
of skewness. The medcouple is defined as a scaled median difference
of the left and right half of distribution, and hence not based
on the third moment as the classical skewness.
logical indicating how missing values (NAs)
should be dealt with.
doReflect
logical indicating if the internal MC should also be
computed on the reflected sample -x, with final result
(mc.(x) - mc.(-x))/2. This makes sense since the internal
MC, mc.() computes the himedian() which can differ slightly from
the median.
eps1,eps2
tolerance in the algorithm; only change with care!
maxit
maximul number of iterations; typically a few should be
sufficient.
trace.lev
integer specifying how much diagnostic output the
algorithm (in C) should produce. No output by default, most output
for trace.lev = 5.
full.result
logical indicating if the full return values (from
C) should be returned as a list via attr(*, "mcComp").
Value
a number between -1 and 1, which is the medcouple, MC(x).
For r <- mc(x, full.result = TRUE, ....), then
attr(r, "mcComp") is a list with components
medc
the medcouple mc.(x).
medc2
the medcouple mc.(-x) if doReflect=TRUE.
eps
tolerances used.
iter,iter2
number of iterations used.
converged,converged2
logical specifying “convergence”.
Author(s)
Guy Brys; modifications by Tobias Verbeke and bug fixes and
extensions by Manuel Koller and Martin Maechler.
References
Guy Brys, Mia Hubert and Anja Struyf (2004)
A Robust Measure of Skewness;
JCGS13 (4), 996–1017.
Hubert, M. and Vandervieren, E. (2008).
An adjusted boxplot for skewed distributions,
Computational Statistics and Data Analysis52, 5186–5201.
See Also
Qn for a robust measure of scale (aka
“dispersion”), ....