Implements the Modified Thompson Tau test for outlier detection.
This is an iterative statistical test that identifies outliers by comparing
each observation's deviation from the mean against a critical value based on
the t-distribution. Particularly effective for small to medium sample sizes.
Usage
compute_mtt_threshold(x, alpha = 0.05, max_iter = 30)
Arguments
- x
Numeric vector of values (anomaly scores)
- alpha
Significance level for the test. Default is 0.05
- max_iter
Maximum number of iterations for outlier removal. Default is 30
Value
A list containing:
threshold: The calculated threshold value
n_outliers: Number of outliers detected
outlier_indices: Indices of detected outliers
References
Thompson, W. R. (1935). "On a Criterion for the Rejection of Observations and
the Distribution of the Ratio of the Deviation to the Sample Standard Deviation."
Annals of Mathematical Statistics, 6(4), 214-219.
Adjusted Grubbs' and generalized extreme studentized deviation methods.