SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only

Some example corrgrams in SPSS base graphics

By Archive User posted Wed December 21, 2011 09:08 PM

  
I was first introduced to corrgrams in this post by Tal Gallil on the Cross Validated site. Corrgrams are visualization examples developed by Michael Friendly used to visualize large correlation matrices. I have developed a few examples using SPSS base graphics to mimic some of the corrgrams Friendly presents, in particular a heat-map and proportional sized dot plot. I've posted the syntax to produce these graphics at the SPSS developer forum in this thread.



Some other extensions could be made in base graphics fairly easily, such as the diagonal hashings in the heat-map, but some others would take more thought (such as plotting different graphics in the lower and upper diagonal, or sorting the elements in the matrix by some other criterion). I think this is a good start though, and I particularly like the ability to super-impose the actual correlations as labels on the chart, like how it is done in this example on Cross Validated. It should satisfy both the graph people and the table people! See this other brief article by Michael Friendly and Ernest Kwan (2011) (which is initially in response to Gelman, 2011) and this post by Stephen Few to see what I am talking about.

One of the limitations of these visualizations is that it simply plots the bi-variate correlation. Friendly has one obvious extension in in the corrgram paper when he plots the bi-variate ellipses and loess smoother line. Other potential readings of interest that go beyond correlations may be examining scagnostic characteristics of distributions (Wilkinson & Wills, 2008) or utilizing other metrics that capture non-linear associations, such as the recent MIC statistic proposed in Reshef et al. (2011). All of these are only applicable to bi-variate associations.

Citations:







#crossvalidated
#datavisualization
#SPSS
#SPSSStatistics
#Visualization
4 comments
8 views

Permalink

Comments

Wed January 15, 2014 03:24 PM

Hi Bruce - thanks for the comment,

With those examples you wouldn't be able to do that (currently) in SPSS. The simplest way to build the little pies would be to build custom glyphs that corresponded to certain pie shapes (e.g. they would be similar to choosing whether to use a circle or a square symbol for a scatterplot). See Funny Faces: Visualizing Many Variables for an example of making custom glyphs. I don't expect such customization to be available for SPSS graphs though anytime soon.

If I changed the examples to use small multiple graphics, then it would be possible to build up the geometries to make the pies, but it would be a chore. I've developed some code to do the ellipses, but I think maybe a better way to simplify the plots would be to make a line and error bands.

I think I have mixed feelings though whether error bands are useful for these types of charts. Since the correlation matrix is typically made from the same dataset, the standard error of the intervals should be pretty similar for all of the estimates (ignoring the most extreme correlations). So it basically ends up being redundant info with displaying the correlation itself.

One way to incorporate a confidence interval in the example on the right would be to make two circles, one for the lower and one for the upper - although that adds a layer of complexity to a plot that can get a bit complicated already.

Wed January 15, 2014 02:24 PM

Neat stuff, Andy. Have you figured out a way to make a corrgram with pac-man figures (as in the Friendly article)? With pac-man figures, one could potentially add a couple of radii (perhaps as dashed lines) to display the confidence interval for rho.

Cheers!
Bruce

Thu January 09, 2014 09:36 AM

This message was posted by a user wishing to remain anonymous
[…] an answer and an example macro to accomplish this (FYI such things would be useful for producing corrgrams or a network diagram of correlations). The output in that example though still produces the […]

Sun June 17, 2012 10:18 AM

This message was posted by a user wishing to remain anonymous
[...] if it can be effectively done in scatterplot matrices. I would like to extend some of the example corrgrams I previously made to plot the loess smoother and bivariate confidence ellipses, and you can be sure [...]