I have read and reread the boxplot and the boxplot stats page, and I still cannot understand how and what boxplot shows. I realize that this might be due to me not knowing enough statistics, but anyway... First, how does boxplot determine the size of the box? And is the line inside the box the mean or the median (or something completely different?) And how does it determine how long out the whiskers should go? Also, the boxplot.stats page talks about "hinges", what are those? "The two "hinges" are versions of the first and third quartile, i.e., close to 'quantile(x, c(1,3)/4)'." Thankyou very much. Karin -- Karin Lagesen, PhD student karin.lagesen at medisin.uio.no http://www.cmbn.no/rognes/
Hi Try to find some textbook about statistics. You can get many explanations just by finding "boxplot" by e.g. Google and reading whot you found. And of course you can get some information from help pages you mentioned. coef: this determines how far the plot "whiskers" extend out from the box. If 'coef' is positive, the whiskers extend to the ^^^^^^^^^^^^^^^^^ most extreme data point which is no more than 'coef' times ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the length of the box away from the box. A value of zero ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ causes the whiskers to extend to the data extremes (and no outliers be returned). HTH Petr On 4 Oct 2005 at 11:24, Karin Lagesen wrote: To: r-help at r-project.org From: Karin Lagesen <karin.lagesen at medisin.uio.no> Date sent: Tue, 04 Oct 2005 11:24:04 +0200 Subject: [R] boxplot statistics> > I have read and reread the boxplot and the boxplot stats page, and I > still cannot understand how and what boxplot shows. I realize that > this might be due to me not knowing enough statistics, but anyway... > > First, how does boxplot determine the size of the box? And is the line > inside the box the mean or the median (or something completely > different?) And how does it determine how long out the whiskers should > go? > > Also, the boxplot.stats page talks about "hinges", what are those? > "The two "hinges" are versions of the first and third quartile, i.e., > close to 'quantile(x, c(1,3)/4)'." > > Thankyou very much. > > Karin > -- > Karin Lagesen, PhD student > karin.lagesen at medisin.uio.no > http://www.cmbn.no/rognes/ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.htmlPetr Pikal petr.pikal at precheza.cz
On Tue, 4 Oct 2005, Karin Lagesen wrote:> > I have read and reread the boxplot and the boxplot stats page, and I > still cannot understand how and what boxplot shows. I realize that > this might be due to me not knowing enough statistics, but anyway... > > First, how does boxplot determine the size of the box? And is the line > inside the box the mean or the median (or something completely > different?) And how does it determine how long out the whiskers should > go? > > Also, the boxplot.stats page talks about "hinges", what are those? > "The two "hinges" are versions of the first and third quartile, i.e., > close to 'quantile(x, c(1,3)/4)'." > > Thankyou very much.The reference on the help page is: Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A. (1983) _Graphical Methods for Data Analysis._ Wadsworth & Brooks/Cole. and a search in BIBSYS suggests that a copy is in your university library: author = Chambers and title word = Graphical and material type = Books The references are there to suggest where to look for the information you asked for.> > Karin >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no
Received Tue 04 Oct 2005 7:26pm +1000 from Karin Lagesen:> > I have read and reread the boxplot and the boxplot stats page, and I > still cannot understand how and what boxplot shows. I realize that > this might be due to me not knowing enough statistics, but anyway... > > First, how does boxplot determine the size of the box? And is the line > inside the box the mean or the median (or something completely > different?) And how does it determine how long out the whiskers should > go? > > Also, the boxplot.stats page talks about "hinges", what are those? > "The two "hinges" are versions of the first and third quartile, i.e., > close to 'quantile(x, c(1,3)/4)'."Wikipedia has a reasonable description http://en.wikipedia.org/wiki/Boxplot Regards
On Tue, 4 Oct 2005, Karin Lagesen wrote:> > First, how does boxplot determine the size of the box? And is the line > inside the box the mean or the median (or something completely > different?) And how does it determine how long out the whiskers should > go?Part of the problem is that there are lots of different definitions of the quartiles (quantile() has 9 of them). If the number of observations is one more than a multiple of 4 then all the definitions agree, otherwise they are slightly different. For the case where the number of observations is one more than a multiple of 4 the line in the middle is the median, the ends of the box are the upper and lower quartiles, and the whiskers extend to the furthest point that is within 1.5 box lengths from the end of the box. When the number of observations is not one more than a multiple of four this is all still true, but you have to be careful about which definition of "quartile" you mean, for which you can read either the book referenced on the help page, or the code. -thomas
> From: Graham Williams > > Received Tue 04 Oct 2005 7:26pm +1000 from Karin Lagesen: > > > > I have read and reread the boxplot and the boxplot stats page, and I > > still cannot understand how and what boxplot shows. I realize that > > this might be due to me not knowing enough statistics, but anyway... > > > > First, how does boxplot determine the size of the box? And > is the line > > inside the box the mean or the median (or something completely > > different?) And how does it determine how long out the > whiskers should > > go? > > > > Also, the boxplot.stats page talks about "hinges", what are those? > > "The two "hinges" are versions of the first and third > quartile, i.e., > > close to 'quantile(x, c(1,3)/4)'." > > Wikipedia has a reasonable description > > http://en.wikipedia.org/wiki/Boxplot... but not quite accurate. If I'm not mistaken, boxplots are based on Tukey's letter values. Here's one description of what they are: http://www.math.yorku.ca/SCS/Courses/eda/eda1.html#H2_32:1.2 Andy
A related comment - don't rely (too much) on boxplots. They show only a few things, which may be limiting in many cases and completely misleading in others. Here are a couple of suggestions for plots which you may find more useful than the standard box plots: - figure 3.27 from http://www.stat.auckland.ac.nz/~paul/RGraphics/chapter3.html - violin plots (see package vioplot) - density plots - histograms - box-percentile plots (bpplot from Hmisc) - quantile plots - if comparing 2 distributions, qq plots, quantile-difference plots, mean-difference plots etc.> -----Original Message----- > From: Karin Lagesen [mailto:karin.lagesen at medisin.uio.no] > Sent: Tuesday, October 04, 2005 5:24 AM > To: r-help at r-project.org > Subject: [R] boxplot statistics > > > > I have read and reread the boxplot and the boxplot stats page, and I > still cannot understand how and what boxplot shows. I realize that > this might be due to me not knowing enough statistics, but anyway... > > First, how does boxplot determine the size of the box? And is the line > inside the box the mean or the median (or something completely > different?) And how does it determine how long out the whiskers should > go? > > Also, the boxplot.stats page talks about "hinges", what are those? > "The two "hinges" are versions of the first and third quartile, i.e., > close to 'quantile(x, c(1,3)/4)'." > > Thankyou very much. > > Karin > -- > Karin Lagesen, PhD student > karin.lagesen at medisin.uio.no > http://www.cmbn.no/rognes/ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >