I'm unsure on how to remove or winsorize outliers. Let's say I have 2 groups, treated and control. And I measure feature1 and feature2 for both.

How should I handle outliers? For each group and each feature separately? Meaning: Feature 1 group 1, feature 1 group 2, feature 2 group 1 and feature 2 group 2

Or as a whole group?

  • $\begingroup$ What analysis are you planning to do with these data? Sounds like you are planning some kind of regression, but I wanted to check. $\endgroup$
    – Peter Flom
    Dec 22, 2023 at 13:41
  • $\begingroup$ An ANOVA test. Actually I have 3 groups. Just mentioned 2 for simplicity. 3 groups and 2 variables. $\endgroup$
    – Caterina
    Dec 22, 2023 at 13:45

1 Answer 1


First, you shouldn't remove or winsorize outliers unless they are data entry errors. Data entry errors should be corrected (if possible) or removed.

Second, you can try to identify data entry errors by feature; it doesn't make sense to combine the features into one. However, you may look for bivariate outliers. I would do this graphically using boxplots, quantile normal plots, density plots, and so on. I would do this by group, as what is an outlier in one group may not be in another. (Just as an extreme example, if one feature is height and the groups are jockeys and basketball players).

You can also look at the output from your ANOVA. The major packages provide plots for examining problems (certainly R and SAS do, but I can't imagine that SPSS etc. don't do this).

Third, if you do identify outliers or influential points, then change your method, not your data. Two ideas are robust regression (there are several varieties) or quantile regression. Some people will recommend transforming your data, but I think this is only a good idea when the transformation makes substantive sense (opinions differ on this).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.