我使用了命令:
boxplot(V15~Class,data=trainData, main="V15 value depending on Class", xlab="Class", ylab="V15")
我想了解哪个是矩形中点的百分比?
我的意思是:如果我将所有样本都放在主矩形内,那么样本总数的百分比是多少?
我找到了documentation,但无法弄清楚这个答案。
答案 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%的值落在框内,但计算的细节取决于数据的性质。