home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / math / stat / 2368 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.3 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!wupost!gumby!yale!yale.edu!ira.uka.de!chx400!sicsun!masg1.epfl.ch!zoubeidi
  2. From: zoubeidi@masg1.epfl.ch (Toufik Zoubeidi)
  3. Newsgroups: sci.math.stat
  4. Subject: Quartiles in S-plus
  5. Message-ID: <1992Nov17.170005@masg1.epfl.ch>
  6. Date: 17 Nov 92 16:00:05 GMT
  7. Sender: news@sicsun.epfl.ch
  8. Organization: Ecole Polytechnique Federale de Lausanne
  9. Lines: 44
  10.  
  11. Hello, 
  12.  
  13. In preparing a class example we found out that in computing quartiles
  14. S-plus uses different methods under different commands. The method
  15. used in the commands "summary" or "quantile" is different from the 
  16. one used to compute quartiles for a boxplot in the command "boxplot".
  17. We know which method is used in each case. Does anyone know the reason
  18. for this difference.
  19.  
  20. Below is the illustration of this
  21.  
  22. >X      (The data)
  23.  
  24.   24  11 107  18  29  49  94  12  16  22 141  18  21  13  11
  25.  
  26. >summary(X)
  27.  
  28.  Min. 1st Qu. Median  Mean 3rd Qu. Max. 
  29.    11    14.5     21 39.07      39  141
  30.  
  31. >A <- boxplot(X, plot=F)
  32. >A
  33.  
  34. $stats:
  35.      [,1] 
  36. [1,]   94
  37. [2,]   49  <-- 3rd Qu. 
  38. [3,]   21  
  39. [4,]   13  <-- 1st Qu.
  40. [5,]   11
  41.  
  42. $n:
  43. [1] 15
  44.  
  45.  
  46. $out:
  47. [1] 107 141  <-- If the quartiles computed in "summary" were used
  48.                  then 94 will also be out. 
  49.  
  50. $group:
  51. [1] 1 1
  52.  
  53. Bye, Toufik.
  54.  
  55.