[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Graphing Quadratic Interactions

From   Ronan Conroy <>
To   "" <>
Subject   Re: st: Graphing Quadratic Interactions
Date   Tue, 16 Dec 2008 14:42:06 +0000

On 16 Noll 2008, at 12:42, Nick Cox wrote:

It wasn't very clear what she wants. My guess was that she wants a plot of predicted response in terms of X4 and X5, adjusting for X1 ... X3. As
mentioned on this list very frequently, Stata isn't serious at 3-D
graphics that might meet this need, whether contour plots or perspective

What are often called 3D graphics are a small, and very poor, subset of the ways in which higher dimensional data can be displayed on a flat surface.

Their immediate drawback is that of point of view. They represent a two-dimensional view of a three-dimensional object. Thus, the point of view must be carefully chosen if it is not to result in some interesting features being obscured, and there is no guarantee that any single view will show you all the features of your data.

However, it is possible to display data in many dimensions on a flat surface, and we do this all the time. Use of -by- and -over- to display different groups in the same chart increases the number of dimensions while keeping all the data visible at once.

. sysuse auto
. stripplot mpg, by(foreign) over(rep78) bar

This shows domestic and foreign cars as two graphs within the chart, allowing us to see a third dimension easily.

You can, with a little ingenuity, increase the number of dimensions by using what Tufte calls 'small multiples' - a tiled arrangement of smaller graphs which follows a logical order.

My own contribution to the field was making a chart that displayed age, sex, smoking, cholesterol, blood pressure and cardiovascular risk on a flat surface. The resulting chart is also technically a table, since it displays risk numerically as well as using a traffic-light colour system. You can see the thing in various places on the net, including Chance News

I mention this because people assume that you need "3D" to show more than two dimensions. This is not true, and all of the good high- dimensional charts I can think of use only two dimensions to display the data.

Ronan Conroy
Royal College of Surgeons in Ireland
Epidemiology Department,
Beaux Lane House, Dublin 2, Ireland
+353 (0)1 402 2431
+353 (0)87 799 97 95
+353 (0)1 402 2764 (Fax - remember them?)

P    Before printing, think about the environment

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index