How to detect regression outliers when many residuals are zero I have a situation that when I fit a robust regression line (least trimmed squares) to a set of data a lot of the residuals are in fact zero.
This occurs mainly in the situation where the slope is zero and the y values are integers. When the line is fitted it runs right through the majority of the values. I am happy with this fit as a traditional least squares line is incorrect due to a few errors in the data.
However now I've fitted the line I want to analyze the residuals and detect the outliers (possibly automatically). I intended to compute a 'score' perhaps based on Tukey's technique of using the upper and lower quartile plus 1.5 times the inter-quartile range. However this approach won't work if many of the residuals are zero because the IQR is also zero.
What should I do? Just base the score on something like the number of standard deviations from the mean? Thanks.
 A: Various thoughts: 


*

*You say that problem is mostly when the slope is zero. But whenever the regression is flat, the problem is the same as that of flagging univariate outliers for the response variable. 

*More generally, a sensible criterion may depend on the particular kind of robust regression you use, which you have now named as least trimmed squares.  (There are many flavours: few seem to sustain any popularity for more than a few years except for the oldest, L1 or more generally quantile regression.) 

*Why not just use the values of the residuals and plot them? Converting to residual/scale of residuals isn't always needed, even when you are using different response variables. 

*Much depends on quite why and how much you want or need to automate. If you are doing this hundreds, thousands… of times, then understood. If only a few times, you can waste more time worrying how best to do it than just looking at some plots. It's the transition between those situations that's tricky.
A: I had a similar problem where many of the residuals were zero and the IQR would not be usable because it was either zero or close to zero. A practical solution I found worked reasonably was to use the interdecile range instead of the IQR. I then used the upper decile and lower decile and made the outer fences a multiple of the IDR away from these.
