Boxplot主要矩形分隔符,哪个数据点百分比?

时间:2013-10-09 10:03:59

标签: r boxplot

我使用了命令:

boxplot(V15~Class,data=trainData, main="V15 value depending on Class", xlab="Class", ylab="V15")

我想了解哪个是矩形中点的百分比?

enter image description here

我的意思是:如果我将所有样本都放在主矩形内,那么样本总数的百分比是多少?

我找到了documentation,但无法弄清楚这个答案。

1 个答案:

答案 0 :(得分:2)

您提到的help text for boxplot表示您应该“另请参阅 boxplot.stats进行计算”。从“详细信息”部分:

The two ‘hinges’ are versions of the first and third quartile, i.e., close to quantile(x, c(1,3)/4).
The hinges equal the quartiles for odd n (where n <- length(x)) and differ for even n.
Whereas the quartiles only equal observations for n %% 4 == 1 (n = 1 mod 4),
the hinges do so additionally for n %% 4 == 2 (n = 2 mod 4), and are in the middle of two observations otherwise. 

所以是的,基本上中间50%的值落在框内,但计算的细节取决于数据的性质。