Thread View: sci.math.stat
2 messages
2 total messages
Started by Toufik Zoubeidi
Tue, 17 Nov 1992 16:00
Quartiles in S-plus
Author: Toufik Zoubeidi
Date: Tue, 17 Nov 1992 16:00
Date: Tue, 17 Nov 1992 16:00
43 lines
1358 bytes
1358 bytes
Hello,
In preparing a class example we found out that in computing quartiles
S-plus uses different methods under different commands. The method
used in the commands "summary" or "quantile" is different from the
one used to compute quartiles for a boxplot in the command "boxplot".
We know which method is used in each case. Does anyone know the reason
for this difference.
Below is the illustration of this
>X (The data)
24 11 107 18 29 49 94 12 16 22 141 18 21 13 11
>summary(X)
Min. 1st Qu. Median Mean 3rd Qu. Max.
11 14.5 21 39.07 39 141
>A <- boxplot(X, plot=F)
>A
$stats:
[,1]
[1,] 94
[2,] 49 <-- 3rd Qu.
[3,] 21
[4,] 13 <-- 1st Qu.
[5,] 11
$n:
[1] 15
$out:
[1] 107 141 <-- If the quartiles computed in "summary" were used
then 94 will also be out.
$group:
[1] 1 1
Bye, Toufik.
Re: Quartiles in S-plus
Author: Patrick J. Fleury
Date: Thu, 19 Nov 1992 04:19
Date: Thu, 19 Nov 1992 04:19
19 lines
1399 bytes
1399 bytes
In article <1992Nov17.170005@masg1.epfl.ch> zoubeidi@masg1.epfl.ch (Toufik Zoubeidi) writes: >Hello, > >In preparing a class example we found out that in computing quartiles >S-plus uses different methods under different commands. The method >used in the commands "summary" or "quantile" is different from the >one used to compute quartiles for a boxplot in the command "boxplot". >We know which method is used in each case. Does anyone know the reason >for this difference. > There was an informative article a couple of years ago in _The Americna _Statistician_ which might shed some light on this. I think it was called _Some implementations of the boxplot_ and two of its authors were Iglewicz and Hoaglin. I think the year was 1989 but I am not absolutely sure. As I remember it, the authors point out that there are eight different definitions of the sample quartile which are used in different circumstances. It is worth looking at.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads