First time using mad() Median Absolute Deviation on a vector, mostly 4 and 5, some NA.
Am I mistaken, but why would the mad function not return a positive value for
mad(c(4,5,5,5))
? Instead, I get a 0. I would only expect 0 if all values in the vector are the same, not if there is variation in value.
Please enlighten me. I am using R version 4.05.