How to use Outlier Tests in R Code

PaulHurleyuk picture PaulHurleyuk · Sep 18, 2009 · Viewed 43.6k times · Source

As part of my data analysis workflow, I want to test for outliers, and then do my further calculation with and without those outliers.

I've found the outlier package, which has various tests, but I'm not sure how best to use them for my workflow.

Answer

hadley picture hadley · Sep 18, 2009

If you're worried about outliers, instead on throwing them out, use a robust method. For example, instead of lm, use rlm.