Looking at the components of a correlation matrix can be an important diagnostic tool. Simply looking at a table of numbers isn't practical for a matrix larger than say, 4x4, so graphical visualization tools come into play. Various methods have been proposed in the past, from heat maps to correlation ellipses. Taiyun Wei offers an alternative: correlation circles. Positive correlations are illustrated with a filled black circle; negative ones with a white circle outlined in black:
I think this could be a promising approach when there's a natural ordering amongst the variables in the matrix, as it does pick up patterns in the correlations well, highlighting the distinction between positive and negative correlations. On the other hand, I think it downplays the negative correlations too much -- perhaps a filled gray circle rather than the white outlined circle would alleviate that problem.
Now, I think a game of Othello is in order...
UPDATE March 27: Here's an alternate version with a
grey background. I think this does solve the problem of overemphasizing the positive correlations over the negative ones.
How about changing the background colour to something neutral? e.g. bg="grey50" looks better to my eyes.
Posted by: Bob O'H | March 23, 2009 at 09:06
At the always useful Quick-R website ( http://www.statmethods.net/advgraphs/correlograms.html ) you can find several examples of correlograms, i.e. "techniques to display the pattern of correlations in terms of their signs and magnitudes using visual thinning and correlation-based variable ordering."
Posted by: Paolo | March 24, 2009 at 01:47
Thanks for your good advices. And I made some changes about my code, now we can change the fill color and background color freely. See code here.
And see four graphs of correlation matrix in my Picasa here.
Posted by: Taiyun Wei | March 24, 2009 at 06:50
Andrew Gelman adds some comments on his blog. I agree that the circles on the diagonal are distracting -- might be best just to leave those cells blank in the graphic.
Posted by: David Smith | March 24, 2009 at 11:37
I think instead of black and gray circles on a white background as you suggest, it would be better to have black and white circles on a gray background.
Posted by: Mike Lawrence | March 31, 2009 at 18:22
To make easier reading can you restrict the correlogram to the lower part of the matrix & leave out the diagonal (which is 1, by definition) ?
Posted by: Frank | August 24, 2011 at 02:05