# Graphing effect size for coefficient of determination

If I have a significant correlation coefficient of r=.80 between Variable A and B, I can work out the effect size (coefficient of determination) by squaring it, which is 64%.

I want to graph this in the simplest way possibe (given my non-statistical target audience). Can I use a 100% stacked bar graph for this purpose. This will show Variable B as 100% and on top of it would be Variable A which would be 64%. I can then graphically say that 64% of variance in Variable B can be attributed to Variable A. (Conversely, I can also graphically say that I am unsure of the remaining 36% of Variable B)

The appeal of this approach for me is that I can show the effect size between A and B on a number of variables (e.g. gender, age, education) in one graph. This will also make a colourful presentation (which is good for a non statistical target audience!).

I have seen some textbooks showing two circles, each representing a variable (e.g. A and B). The part of the circles that overlaps illustrates the effect size. I thought doing a 100% stacked bar graph was a better way.

From the discussion below, it appears that the scatterplot is the way to go on this matter. However, how do I show 64% on a scatterplot?

I think the point is being missed in the discussion below. It is easy to illustrate the relationship through the scatterplot but how is the effect size illustrated i.e. the actual perecentage as above. I can't see this percentage figure in any of the diagrams below.

• In response to your edit, you can try the scatterplot matrix approach, but show $R^2$'s in the upper or lower diagonal.
– chl
Sep 8, 2011 at 19:23
• @chi thanks. Can you please explain your comment a bit more. Sep 9, 2011 at 22:41
• E.g., Exploratory Visualization of Correlation Matrices (p. 5 ff.).
– chl
Sep 10, 2011 at 9:29

I agree with the person who suggested a scatterplot. An R-square gives the proportion of variance statistically explained by A. It doesn't give the effect size in the way I think you mean. If you just want to illustrate a proportion, any figure would do, but very little information is conveyed. The "effect" of the explanatory variable is shown in a scatterplot by the closeness of the points to a regression line (or one drawn "by hand" if need be).

• I have seen some textbooks showing two circles, each representing a variable (e.g. A and B). The part of the circles that overlaps illustrates the effect size. I thought doing a 100% stacked bar graph was a better way. Sep 6, 2011 at 8:46

You could do some sort of graphical correlation matrix. In R:

#Get the correlations from the data frame
#(The fifth column in the iris dataset is a factor, so we're not using it.)
r2<-cor(iris[-5])^2

#Plot them
plot(rep(1:nrow(r2),each=ncol(r2)),rep(1:ncol(r2),nrow(r2)),
main='Relationships among properties of Irises',
sub='Larger circles indicate stronger relationships',
#The next line just makes it less cluttered.
bg=1,pch=21,cex=r2*5,axes=F,xlab='',ylab=''
)

sapply(1:2,axis,at=1:ncol(r2),labels=colnames(r2),tick=F)


I have to note that I'm somewhat skeptical that that's the best way to present your data.

A scatterplot will show the strength of a relationship. Among other things, the ratio of the longest length to the smallest width of the convex hull of the points on the plot will be one graphical indication of the variability. And you can use color or a scatterplot matrix to present more than two variables.

And if you wanted to display many more than you can in a scatterplot matrix, I'd suggest that you try to group the relationships in order to present fewer variables at once. You could also combine variables with something like principal components analysis if that's appropriate.

• +1 A scatterplot matrix would occupy the same amount of space, take the same amount of ink, and hugely increase the data-ink ratio.
– whuber
Sep 6, 2011 at 22:27
• I actually think you'd need more space for a scatterplot matrix because you need to be able to see the many small dots clearly. But I still think a scatterplot matrix is better. Sep 7, 2011 at 1:06

Such bar plots are almost completely devoid of content. I would instead show scatterplots of B vs each A, which will really illustrate the relationships. You can fit a surprising number of scatterplots into a small space.

• Thanks. A scatterplot shows relationship. I want to show effect size. Remember, I am presenting to a non-statistical audience. Sep 4, 2011 at 12:47
• Maybe I'm being too idealistic, but I think the effect size is apparent in the scatterplot in a way that it can be actually understood, while the coefficient of determination values on their own would have no real meaning to non-statisticians.
– Karl
Sep 4, 2011 at 12:51
• But how do I show 64% on a scatterplot. Sep 5, 2011 at 13:55
• +1 for Karl's answers. I think that scatter plots are more informative and more easily understood than coefficients of determination and alike. This is even more true for non-statistical audiences, which probably do not know what a coefficient of determination is.
– user5644
Sep 5, 2011 at 14:49
• @Adesh I agree that $r^2$ is useful, I would just rather see a bunch of scatterplots in place of a bar chart of $r^2$ values, and personally I will internally translate a given $r^2$ to the corresponding prototypical scatterplot.
– Karl
Sep 5, 2011 at 18:27

@Karl Broman's reply suggested one might create a scatterplot matrix to good effect. As an example, here are the famous iris data, ridiculously scaled down to press the point that you don't need lots of ink or space on the page to be able to present far more information than a mere table of numbers or simple bar chart or correlation plot would reveal. For instance, none of those would indicate the separation into distinct populations that is so clear here:

(The variables, left to right and top to bottom, are sepal length, sepal width, petal length, and petal width, all expressed in centimeters. Colors indicate species: i. setosa is blue, i. versicolor is red, and i. virginica is green.)

Some statistical software (such as Systat), as an option, will superimpose ellipses on the scatterplots to approximate contours of the fitted bivariate Normal distribution. This visual aid is a nice graphical way to indicate correlation coefficients.

• The contours don't indicate the actual correlation coefficient do they? Sep 7, 2011 at 14:53
• @Andy Provided the scales on the axes are standardized to 1 SD for each variable, the contours correspond to correlation coefficients $\rho$. Circular contours correspond to $\rho\sim 0$; skinny contours sloping up correspond to $\rho\sim 1$; and skinny contours sloping down correspond to $\rho\sim -1$.
– whuber
Sep 7, 2011 at 16:00