I have a sample of 608 subjects and I need to remove outliers for age. In R, the boxplot appears like this:

enter image description here

It shows 74 outliers:

> length(boxplot(mydata)$out)
[1] 74

After I have removed these outliers, should I take a new look at the boxplot with the new data? If I do that, the boxplot still contains other outliers:

enter image description here


1. Is this a problem?

2. Is this method appropriate for removing outliers for age?

EDIT: I will not use age as a variable in a regression model. I want just to remove outliers for age in order to obtain a more uniform sample (this is a students sample). For example, I have one subject 60 years old, while the mean age of my sample is 26.6. For this reason, I was also thinking to remove outliers not by boxplot but by ± 3 standard deviations from the mean. From my sample, I then will select two groups of subjects for further testing.

  • $\begingroup$ Interesting. It would be even better if you could post a small random subsample (say 100 observations) of your data. You can do this with the dput() command in R. $\endgroup$ – user603 May 8 '13 at 23:45
  • $\begingroup$ Note that the default boxplot call in R has the range parameter set to 1.5. This means that the wiskers extend to 1.5 times the interquartile range (see ?boxplot). The out member of the output marks outliers in the sense that it marks values that are outside of the wiskers. Change the wiskers range and you will change the limit for outliers. Remove data points and you will most probably change the outliers (as you are changing the IQR). $\endgroup$ – nico May 9 '13 at 8:43
  • $\begingroup$ But why do you want a "more uniform sample"? There are older students. Your sample reflects that. I still see no reason to remove these outliers. $\endgroup$ – Peter Flom - Reinstate Monica May 9 '13 at 10:31
  • $\begingroup$ Because I subsequently have to test some subjects in a laboratory setting, so they will take part at a behavioral study. I suspect that it is not good to compare a 18 with a 60 years old subject. $\endgroup$ – this.is.not.a.nick May 9 '13 at 11:48
  • $\begingroup$ @this.is.not.a.nick Sadly you didn't post any data. I suspect you're miss-using these boxplots. Have a look at the answers to this question $\endgroup$ – user603 May 9 '13 at 20:09

If you have that many outliers, they aren't outliers; you have a non-normal distribution.

How are you going to be using the age variable? One possibility is that it is to be used as an independent variable in a regression. In this case, this distribution is not necessarily a problem - regression makes assumptions about the error (as measured by the residuals) not about the distribution of the independent variables.

(Also, @Doug 's answer is good, and you should tell us that, too).

  • 3
    $\begingroup$ I once had someone try to tell me that at least 60% of his data where outliers;... I said 'I think your model for the data is wrong'. $\endgroup$ – Glen_b -Reinstate Monica May 8 '13 at 23:59
  • $\begingroup$ Hi @Peter. I uploaded my question. $\endgroup$ – this.is.not.a.nick May 9 '13 at 8:21

Answers 1: maybe, 2: depends. We need a little more information on why you want to remove these outliers. If you could provide a histogram, it might be possible to transform the data and eliminate some of the outliers, but it all depends on the research questions. Please tell us more about 1) your research questions, 2) your participants, and 3O) how you are defining outliers (or are you allowing the boxplots to define them for you).

  • $\begingroup$ Hi @doug.numbers. I have uploaded my question explaining why I want to remove outliers for age. $\endgroup$ – this.is.not.a.nick May 9 '13 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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