aad(x, na.rm = TRUE, ...)
na.rm
, default is na.rm=TRUE
.mad
by default computes the "Median Absolute Deviation"; to obtain the "Mean Absolute Deviation" one has to use mad(x, constant = 1)
.
Thus, the function aad
will calculate the "Mean Absolute Deviation"--or "Average Deviation (AD)" as proposed by Garrett, who defines it as "the mean of the deviation of all the separate scores in the series taken from their mean (occasionally from the median or mode)", (1971, p. 481).mad
x <- c(15, 10, 6, 8, 11)
aad(x)
Run the code above in your browser using DataLab