This function identifies outliers in a numeric vector using Median Absolute Deviation (MAD) method, with specialized handling for very small samples. Returns results in htest format for consistency with statistical tests.
Value
An object of class "htest" containing:
- statistic
The test statistic (MAD-based z-score of most extreme outlier)
- parameter
Named vector with: n, median, mad, threshold
- p.value
Approximate p-value based on outlier probability
- method
Description of the method used
- data.name
Name of the data vector
- alternative
Character string describing the alternative hypothesis
- outlier.indices
Indices of detected outliers (as additional element)