Both box-and-whisker plot and bar chart are appropriate graphics for ANOVA according to The R Book (Crawley, 2013), but which is more appropriate? I suppose it depends on situation... can anybody help me?
-
5$\begingroup$ "Although one problem could be solved by several alternative tests - there is always only one test which is the most appropriate to use" -- I'd disagree with that sentence; I don't think it's always true. $\endgroup$– Glen_bCommented Feb 4, 2014 at 10:41
-
5$\begingroup$ I agree with @Glen_b here and suggest that even this wording misses the key point. Identifying the most appropriate test depends minimally on knowing the exact generating process for the data, which is, shall we say, unusual. It is more common that there are several possible tests with differing advantages and disadvantages. $\endgroup$– Nick CoxCommented Feb 4, 2014 at 11:32
-
1$\begingroup$ I don't think that I would even mention (hypothesis or significance) tests in any brief characterisation of good statistical thinking... I think this is a side issue, however. Your question is clear enough without it. $\endgroup$– Nick CoxCommented Feb 4, 2014 at 16:49
2 Answers
Specifically for graphical illustration of ANOVA:
A box plot or bar chart is much better than nothing graphically for ANOVA, but as commonly plotted, both are indirect or incomplete as a graphical summary.
ANOVA is about comparisons of means in a context of variations of one or more kinds, so the most appropriate graphic would show, minimally, means as well as the raw data. Group standard deviations (SDs) or related quantities would do no harm.
Although some varieties of box plots show means as well as medians, the standard kind shows medians, quartiles and some information in the tails of the distribution. The most common variant seems to be that in which individual data points are shown if and only if they lie more than 1.5 IQR away from the nearer quartile. That is: interquartile range IQR $=$ upper quartile $-$ lower quartile, so plot as points values greater than upper quartile $+$ 1.5 IQR or less than lower quartile $-$ 1.5 IQR. Such a convention can be helpful at showing gross outliers which may be problematic for ANOVA, but neither medians nor quartiles play any part in ANOVA and whether medians approximate means is a point to be checked, not assumed. Commonly, experienced data analysts take e.g. pronounced marked outliers and/or asymmetry of distribution as a sign of a problem that needs action, such as transformation of the data or need for a generalized linear model with a non-identity link function. Nevertheless it is surprising how many textbook and other accounts show box plots when an ANOVA is being presented but don't mention the elephants not in the room, the means that are not plotted.
Conversely, the most common kind of bar chart in this context summarizes data by means and SDs or standard errors, but omits any display of individual data points otherwise. So, for example, outliers or marked asymmetry can only be inferred from out-of-line means or inflated variability within individual groups.
Generally, there are many suggestions of which kinds of graphs are useful but little consensus about which are best. I'd suggest as criteria that a good graph shows
The complete pattern of variation in the data, at least as backdrop or context
Relevant summaries of the data, specifically those relevant to the model being entertained or the descriptors being considered
Indications of possible problems with the data that cast doubt on assumptions being made.
There are several designs that help with ANOVA, such as dot or strip plots with added means and SEs.
This paper by John Tukey explains the difference between propaganda graphs and analytical graphs that is pertinent here. Too many graphical illustrations of ANOVA are propaganda graphs (look! the groups are very different) without much analysis (and what else can we learn about the data or the limitations of the technique in this application?).
-
$\begingroup$ So how about violin plots with, ideally with mean, sd and outliers drawn? $\endgroup$ Commented Feb 4, 2014 at 11:10
-
$\begingroup$ Violin plots can be helpful. Personally I prefer something closer to the raw data, so that I can see modality and granularity too. $\endgroup$– Nick CoxCommented Feb 4, 2014 at 11:41
Please do not be confused between bar charts (one bar is used to show each quantity of interest) and dynamite plots (one bar shows the average of each group, plus error bars). Dynamite plots are NEVER acceptable because they hide the distribution of the data for no reason at all.
Yes I realize that this is by far the most common type of plot. It is a big problem that reflects the (low) importance that researchers place on the shape of their data. If you were a detective looking for a murder weapon, would it be better if a witness told you 1) only the location and size of the weapon? or 2) the location, size, and shape?
http://biostat.mc.vanderbilt.edu/wiki/pub/Main/TatsukiRcode/Poster3.pdf
-
$\begingroup$ Do you have other resources on why dynamite plots are not ideal? $\endgroup$– mguzmannCommented Mar 11, 2015 at 16:52
-
$\begingroup$ @mguzmann Sorry, I do not. I also wondered who came up with the idea, its adoption over time, etc and could not find an anything on that. I imagine it evolved from reporting tables of means +/- error in the days before computers. I have seen papers from the 1930s that manage to publish tables of the complete dataset so I am not sure that practice was ever really justified either. For example: Hedrich AW. Monthly estimates of the child population "susceptible" to measles, 1900–1931, Baltimore, Maryland. Am J Hyg 1933;17:613-636. $\endgroup$– LividCommented Mar 20, 2015 at 5:10