Diamond Graphs

This page provides the S-plus codes to reproduce the figures published in The American Statstician paper in 2003; 57:193-199. In the paper we introduced a novel approach for depicting three dimensional data on two dimensions. We provide the S-plus codes here so that individuals interested in using the proposed methods can modify the code provided to fit their particular needs.

We will be grateful if individuals using our methods in publications share them with us. Please send them to jvaldez@jhsph.edu.

Diamond Graph Paper (PDF, 1010 K) The American Statistician, 2003, Vol.57, No.3, pp 193-199

S-plus codes : figure1.ssc , figure3.ssc , figure5.ssc , figure7.ssc

A User's Guide to Diamond Graph (PDF, 210 KB)

How to Export Diamond Graphs from S-plus to PowerPoint (PDF, 71 K)

Figures (1, 3, 5, 7) in PowerPoint

Diamond Graph can also be generated by a free download software R . The information for installing and learning R can be found at http://www.ats.ucla.edu/stat/R/ . Our S-plus programs are also available in the plain text format so that you can easily open them, then copy and paste them to R if you do not have S-Plus software (figure1.txt, figure3.txt, figure5.txt, figure7.txt)

If you are unable to use S-plus or R to plot Diamond Graph, you can send your data with a brief description (e.g., proportional data, or incidence rates, or relative risks) to Xiuhong Li , who will create the Diamond Graph (without labels of the categories of two predictors) and email back to you in PowerPoint, in which you can add the labels for the two predictor variables. The data that you send via email should be in the following format:

Line 1: the number of categories of the predictor on the southwest side of Diamond Graph,
Line 2: the number of categories of the predictor on the southeast side of Diamond Graph,
Line 3: the values of outcome, which should be ordered from the value in the cell 1 (at bottom) to cell 2, to cell 3, and finally to cell 4 (at top), as depicted below in the 2x2 graph.

Send comments or questions to Xiuhong Li at xili@jhsph.edu