MeanAD: Mean Absolute Deviation From a Center Point
Description
Calculates the mean absolute deviation from a center point, typically the sample mean or the median.
Usage
MeanAD(x, FUN = mean, na.rm = FALSE)
Arguments
x
a vector containing the observations.
FUN
the name of a function to be used as center. Can as well be a self defined function.
Default is mean.
na.rm
a logical value indicating whether or not missing values should be removed. Defaults to FALSE.
Value
Numeric value.
Details
The MeanAD function calculates the mean absolute deviation from the mean value (or from another
supplied center point) of
x, after having removed NA values (if requested).
It exists primarily to simplify the discussion of
descriptive statistics during an introductory stats class.