I have constructed some box-plots in R and have several outliers. I know that the def开发者_开发问答ault criteria to set outlier limits are:
- Q3 + 1.5*IQR
- Q1 - 1.5* IQR
However, I would like outliers classified as values that fall outside of the boundaries:
- Q3 + 3*IQR
- Q1 - 3* IQR
Is it possible to set this in R?
From ?boxplot
range: this determines how far the plot whiskers extend out from the box. If ‘range’ is positive, the whiskers extend to the most extreme data point which is no more than ‘range’ times the interquartile range from the box. A value of zero causes the whiskers to extend to the data extremes.
So set range=3
I'd encourage you not to do this without a lot of thought - people expect that the whiskers extend 1.5 IQRs. Changing the range will violate these assumptions and make it easy for people to draw incorrect conclusions from your graphic.
精彩评论