# Re: st: Graphing Quadratic Interactions

 From Ronan Conroy To "statalist@hsphsun2.harvard.edu" 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
```views.
```
```
```
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
```
http://www.dartmouth.edu/~chance/chance_news/recent_news/chance_news_13.03.html#item10

```
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
=================================

rconroy@rcsi.ie
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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```