A practical method to account for outliers in simple linear regression using the median of slopes

Abstract

The ordinary least squares (OLS) can be affected by errors associated with heteroscedasticity and outliers, and extreme points can influence the regression parameters. Methods based on the median rather than on the mean and variance are more resistant to outliers and extreme points. These methods could be used to obtain regression parameter estimates that reflect more accurately the genuine relationship between the Y and X variables, leading to better identification of outliers and extreme points by comparing the slopes and intercepts of both methods. The Theil-Sen (TS) regression computes all possible pairwise slopes and determines the median of slopes as the regression slope. Here, we illustrated the potential use of TS and frequently used robust regression (RR) techniques to single linear regression using synthetic datasets and a practical problem in animal science. Three synthetic datasets were created assuming the normal distribution of Y and X values: one was free of outliers, while the other two had one or two clusters of outliers but the same X values. The TS, OLS, and RR had nearly identical regression parameter estimates for the dataset without synthetic outliers. However, the intercept and slope estimates by the OLS method differed considerably from the TS and RR methods when one or two clusters of outliers were included. The TS approach could be used to indirectly determine the presence of outliers or extreme points by comparing the 95 % confidence interval of the TS and OLS parameter estimates.

Description

© 2024, University of Sao Paolo. All rights reserved. cc-by

Rights

Availability

Keywords

estimation, methods, relationship, robust, statistics

Citation

Tedeschi, L.O., & Galyean, M.L.. 2024. A practical method to account for outliers in simple linear regression using the median of slopes. Scientia Agricola, 81. https://doi.org/10.1590/1678-992X-2022-0209

Collections