Compute the mean/median absolute deviation of x.
The mean absolute deviation is computed asmean (abs (x - mean (x)))
and the median absolute deviation is computed asmedian (abs (x - median (x)))
Elements of x containing NaN or NA values are ignored during computations.
If flag is 0, the absolute mean deviation is computed, and if flag is 1, the absolute median deviation is computed. By default flag is 0.
This is done along the dimension dim of x. If this variable is not given, the mean/median absolute deviation s computed along the smallest dimension of x.See also: std