更改箱图中的异常值规则 [英] Changing the outlier rule in a boxplot
问题描述
我在R中构造了一些箱形图,并且有多个异常值。我知道设置异常值限制的默认条件是:
I have constructed some box-plots in R and have several outliers. I know that the default 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
是否可以在R中设置它?
Is it possible to set this in R?
推荐答案
来自?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.
因此,设置 range = 3
(您本可以更仔细地阅读文档...)
(You could have looked a little harder at the documentation ...)
这篇关于更改箱图中的异常值规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!