kMAD: Asymmetric Median of Absolute Deviations for Skewed...

Description Usage Arguments Details Author(s) References See Also Examples

Description

Function for the computation of asymmetric median absolute deviation (kMAD) It coincides with ordinary median absolute deviation (MAD) for k=1.

Usage

1
2
3
4
5
6
kMAD(x,k,...)
## S4 method for signature 'numeric,numeric'
kMAD(x, k = 1, na.rm = TRUE, 
                eps = .Machine$double.eps, ... )
## S4 method for signature 'UnivariateDistribution,numeric'
kMAD(x, k = 1, up = NULL, ... )

Arguments

x

a numeric vector or a distribution.

k

numeric; tunning parameter for asymmetrical MAD; has to be of length 1 and larger than 1.

na.rm

logical; if TRUE then NA values are stripped from x before computation takes place.

eps

numeric; accuracy up to which to state equality of two numeric values

up

numeric; upper bound for search interval; important in distributions without left/right endpoint.

...

additional arguments for other functions; not used so far;

Details

For kMAD (asymmetrial MAD) is a root of the equation:

kMAD(F,k) = inf{t>0|F(m+kt)-F(m-t)>=1/2}

, where F is the cumulative distribution function, m is the median of F.

Author(s)

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de, Nataliya Horbenko nhorbenko@gmail.com

References

Ruckdeschel, P., Horbenko, N. (2010): Robustness Properties for Generalized Pareto Distributions. ITWM Report 182.

See Also

mad

Examples

1
2
3
x <- rnorm(100)
kMAD(x,k=10)
kMAD(Norm(),k=10)

Example output

Loading required package: distrMod
Loading required package: distr
Loading required package: startupmsg
:startupmsg>  Utilities for Start-Up Messages (version 0.9.6)
:startupmsg> 
:startupmsg>  For more information see ?"startupmsg",
:startupmsg>  NEWS("startupmsg")

Loading required package: sfsmisc
:distr>  Object Oriented Implementation of Distributions (version
:distr>  2.8.0)
:distr> 
:distr>  Attention: Arithmetics on distribution objects are
:distr>  understood as operations on corresponding random variables
:distr>  (r.v.s); see distrARITH().
:distr> 
:distr>  Some functions from package 'stats' are intentionally masked
:distr>  ---see distrMASK().
:distr> 
:distr>  Note that global options are controlled by distroptions()
:distr>  ---c.f. ?"distroptions".
:distr> 
:distr>  For more information see ?"distr", NEWS("distr"), as well as
:distr>    http://distr.r-forge.r-project.org/
:distr>  Package "distrDoc" provides a vignette to this package as
:distr>  well as to several extension packages; try
:distr>  vignette("distr").


Attaching package:distrThe following objects are masked frompackage:stats:

    df, qqplot, sd

Loading required package: distrEx
:distrEx>  Extensions of Package 'distr' (version 2.8.0)
:distrEx> 
:distrEx>  Note: Packages "e1071", "moments", "fBasics" should be
:distrEx>  attached /before/ package "distrEx". See
:distrEx>  distrExMASK().Note: Extreme value distribution
:distrEx>  functionality has been moved to
:distrEx> 
:distrEx>        package "RobExtremes". See distrExMOVED().
:distrEx> 
:distrEx>  For more information see ?"distrEx", NEWS("distrEx"), as
:distrEx>  well as
:distrEx>    http://distr.r-forge.r-project.org/
:distrEx>  Package "distrDoc" provides a vignette to this package
:distrEx>  as well as to several related packages; try
:distrEx>  vignette("distr").


Attaching package:distrExThe following objects are masked frompackage:stats:

    IQR, mad, median, var

Loading required package: RandVar
:RandVar>  Implementation of Random Variables (version 1.2.1)
:RandVar> 
:RandVar>  For more information see ?"RandVar", NEWS("RandVar"), as
:RandVar>  well as
:RandVar>    http://robast.r-forge.r-project.org/
:RandVar>  This package also includes a vignette; try
:RandVar>  vignette("RandVar").

Loading required package: MASS
Loading required package: stats4
:distrMod>  Object Oriented Implementation of Probability Models
:distrMod>  (version 2.8.4)
:distrMod> 
:distrMod>  Some functions from pkg's 'base' and 'stats' are
:distrMod>  intentionally masked ---see distrModMASK().
:distrMod> 
:distrMod>  Note that global options are controlled by
:distrMod>  distrModoptions() ---c.f. ?"distrModoptions".
:distrMod> 
:distrMod>  For more information see ?"distrMod",
:distrMod>  NEWS("distrMod"), as well as
:distrMod>    http://distr.r-forge.r-project.org/
:distrMod>  There is a vignette to this package; try
:distrMod>  vignette("distrMod").
:distrMod>  Package "distrDoc" provides a vignette to the other
:distrMod>  distrXXX packages,
:distrMod>  as well as to several related packages; try
:distrMod>  vignette("distr").


Attaching package: ‘distrMod’

The following object is masked from ‘package:stats4’:

    confint

The following object is masked from ‘package:stats’:

    confint

The following object is masked from ‘package:base’:

    norm

Loading required package: ROptEst
Loading required package: RobAStBase
Loading required package: rrcov
Loading required package: robustbase
Scalable Robust Estimators with High Breakdown Point (version 1.5-5)

:RobAStBase>  Robust Asymptotic Statistics (version 1.2.1)
:RobAStBase> 
:RobAStBase>  Some functions from pkg's 'stats' and 'graphics'
:RobAStBase>  are intentionally masked ---see RobAStBaseMASK().
:RobAStBase> 
:RobAStBase>  Note that global options are controlled by
:RobAStBase>  RobAStBaseoptions() ---c.f. ?"RobAStBaseoptions".
:RobAStBase> 
:RobAStBase>  For more information see ?"RobAStBase",
:RobAStBase>  NEWS("RobAStBase"), as well as
:RobAStBase>    http://robast.r-forge.r-project.org/


Attaching package:RobAStBaseThe following object is masked frompackage:graphics:

    clip

Loading required package: evd
:RobExtremes>  Optimally Robust Estimation for Extreme Value
:RobExtremes>  Distributions (version 1.2.0)
:RobExtremes> 
:RobExtremes> 
:RobExtremes>  For more information see ?"RobExtremes",
:RobExtremes>  NEWS("RobExtremes"), as well as
:RobExtremes>    http://robast.r-forge.r-project.org/


Attaching package:RobExtremesThe following objects are masked frompackage:robustbase:

    Qn, Sn

[1] 0.1528332
[1] 0.1543645

RobExtremes documentation built on May 2, 2019, 3:44 p.m.