Producing Repeated-Measures Graphs in SPSS


Versions 9 and 10 of SPSS for Windows provide an easy way of producing repeated-measures graphs, which were impossible to produce in earlier versions of SPSS without re-orienting the data. 

As an example, we have pre-test, post-test and delayed post-test scores for subjects in five different groups.  The data in the spreadsheet look like this:

wpe1.jpg (37485 bytes)

To produce the graph, pull down the Graphs menu, select Interactive, then Line:

wpe2.jpg (19453 bytes)


This leads to the display shown below.  Click on one of the repeated-measure variables, hold

wpe3.jpg (26156 bytes)

down the Ctrl key, then click on the remaining repeated-measures variables.  Drag the three variables across to the x-axis box:    wpe4.jpg (2414 bytes) until the little closed-fist-shaped cursor is in the box, and release the mouse-button.  The following display will appear:

wpe6.jpg (36440 bytes)

The Values box allows you to label the y-axis.  We'll use 'Test score'.  The Categories box is for the x-axis; we'll call it 'Time'.   In the Category Labels box, we can specify the order in which the variables will appear on the x-axis, and specify the labels which will be used in the graph.   To reorder the variables, click and hold on a variable which you want to place in front of another variable, and drag it into place: wpe7.jpg (5905 bytes) To change the names which the variables will have in the chart, click once on the label, pause (i.e., don't use a double-click), then click again.  A box will open around the label, and you can edit it:

wpe8.jpg (4703 bytes)

The display now looks like this:

wpe17.jpg (8849 bytes)

Click on OK, then drag the variable group to one of the boxes under Legend Variables.  We'll use Style to differentiate the groups:

wpe18.jpg (5520 bytes)

Finally, click on OK to produce the graph:wpe19.jpg (25008 bytes)

You can double-click on the graph to make changes to the styles, line thicknesses, axes, etc. 

Notice that the graph says that the Dots/Lines Show Means.  One of the nice things about this procedure is that you can choose another summary, such as the median.  This can be done before clicking on OK to produce the graph.  There is a small window at the bottom of the display:

wpe1A.jpg (5011 bytes)

Pull this window open to select other summaries:

wpe1B.jpg (7935 bytes)

 


This technique of specifying multiple variables also works with bar graphs, and you can ask for error bars, although SPSS has a slightly idiosyncratic way of dealing with error bars in multiple-line graphs, probably aimed at avoiding the problem of overlapping error bars -- see what you think.




Alan Taylor
Department of Psychology
22nd February 2000