Dear R-Experts,

Is there an all-ready function to calculate the Double MAD (Median absolute 
deviation) as there is an easy function to calculate the MAD "mad function". Or 
I have to write my own function for Double MAD ?

To calculate the double MAD, the idea is the following : for the obtained 
median value, we should calculate two median absolution deviations. One 
deviation should be calculated for the numbers below the median and one for the 
numbers above the median:

Here is the very easy reproducible example :

x<-c(2.5,4.4,3.2,2.1,1.3,2.6,5,6.6,5,5,6.1,7.2,9.4,6.9)
mad(x)

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to