
Last chance! 50% off unlimited learning
Sale ends in
Scale and center ("standardize") data based on the median absolute deviation (MAD).
scale_mad(x)
A numeric vector of standardized data.
The vector to be scaled.
The function subtracts the median to each observation, and then divides the outcome by the MAD. This is analogous to regular standardization which subtracts the mean to each observaion, and then divides the outcome by the standard deviation.
For the easystats equivalent, use:
datawizard::standardize(x, robust = TRUE)
.
Leys, C., Ley, C., Klein, O., Bernard, P., & Licata, L. (2013). Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median. Journal of Experimental Social Psychology, 49(4), 764–766. https://doi.org/10.1016/j.jesp.2013.03.013