How-to Guide for IBM® SPSS® Statistics Software
Introduction

In this guide you will learn how to produce a time series plot for a single variable in IBM® SPSS® Statistical Software (SPSS) using a practical example to illustrate the process. You are provided with links to the example dataset and you are encouraged to replicate this example. An additional practice example is suggested at the end of this guide. The example assumes you have already opened the data file in SPSS.

Contents
• Time Series Plot
• An Example in SPSS: U.S. Corn Production, 1876–2015
• 2.1 The SPSS Procedure
• 2.2 Exploring the SPSS Output
1 Time Series Plot

A time series plot is a particular kind of two-way scatter plot where time is plotted on the horizontal axis and values of the variable in question are plotted on the vertical axis. Such a plot allows researches to explore graphically any trends or other over-time dynamics that might be present in a particular variable. Typically the variable of interest is a continuous variable. Time is generally measured in equidistant units – days, months, years – though that is not required to produce a time series plot.

2 An Example in SPSS: U.S. Corn Production, 1876–2015

This example explores the level of corn production in the United States measured annually from 1876 to 2015. There are 140 observations in the dataset. The two variables we examine are:

• Year (year), measured as a numerical indicator of each year from 1876 to 2015.
• Annual corn production (cornproduction), measured in millions of bushels produced each year.

The corn production variable is a continuous variable measured every year, making this an appropriate variable to plot as a time series.

2.1 The SPSS Procedure

You can produce a two-way scatter plot in SPSS using the Chart Builder menu. Begin by selecting from the menu:

Graphs → Chart Builder

This opens a Chart Builder dialog box. Figure 1 shows what this looks like in SPSS.

(Note: you may get a message asking you to define the level of measurement for variables in your dataset before you can proceed to building the chart. If you get this message, typically you can select “OK” and then “Scan Data” and SPSS will execute this task for you automatically.)

Figure 1: Selecting Chart Builder from the Graphs menu in SPSS.

In the lower half of the Chart Builder dialog box, select from the lower left menu “Line”. Two icons for line plots appear. The one on the left is for a simple line plot. Drag and drop that icon up into the open window in the upper half of this dialog box where the instructions say “Drag a Gallery chart here …”.

Next, drag and drop the variable you want plotted on the x-axis into the text box labeled “X-Axis?” For this example, the variable is year. Next, drag and drop the cornproduction variable into the text box labeled “Y-Axis?” Note that SPSS will display the variable label for the corn production variable (e.g. “Corn Production, Bushels”) and not the actual variable names if such labels are available. Figure 2 shows what this looks like in SPSS.

Figure 2: Building a line plot in the Chart Builder dialog box in SPSS.

Once done, click OK to produce the plot.

Executing the procedure above produces the time series plot shown in Figure 3.

Figure 3: Time series plot of corn production (millions of bushels) in the United States from 1876 to 2015, USDA Database.

Notice that Figure 3 only shows a line moving up and down from year to year. If you want to add markers at each point, you need to click on the chart as produced in SPSS to select it, then follow the menus:

Edit → Edit Content → In Separate Window

This will open the chart in a Chart Editor window, as shown in Figure 4.

Figure 4: Opening a chart in the Chart Editor window in SPSS.

To add markers for each data point, you can either click on the “Elements” menu item and select “Add Markers” or you can click on the fourth icon from the left in the row of icons just above the chart itself. Either way, a Properties dialog box will open as shown in Figure 5. By default, SPSS will select empty circles as markers for the data points. This can be changed by selecting the “Marker” button at the top of the Properties dialog box and making new selections. Figure 5 shows what this looks like.

Figure 5: Selecting Marker in the Properties dialog box from the Chart Editor in SPSS.

Once you have configured the markers as desired, click the “Apply” button in the Properties dialog box and close the Chart Editor window. The graph you originally created will be updated automatically, and in this case will look like Figure 6.

Figure 6: Time series plot of corn production (millions of bushels) in the United States (including point markers) from 1876 to 2015, USDA Database.

2.2 Exploring the SPSS Output

Figure 6 shows a gradual increase in corn production from the start of the time series to about 1910, though there is some volatility from year to year. Beginning just before 1920 there is a gradual decline in production that continues to the end of World War II in 1945. Production then increases first steadily and then more dramatically from that point forward. However, there are some sharp declines in the 1980s and again in the 1990s, with that particular period showing more overall volatility than any other portion of the 140-year series.

Two common statistical measures of correlation – the Pearson correlation coefficient and the Spearman rank-order correlation coefficient – can be computed to measure the association between the level of corn production and time (see the SAGE Research Methods Datasets modules on these methods). The Pearson correlation coefficient assumes a linear relationship between the two variables in question while the Spearman rank-order correlation coefficient only assumes a monotonic relationship. Figure 6 suggests that neither is ideal since the pattern is neither linear nor monotonic. When plotting a single time series, researchers might also explore fitting a trend line or a non-linear curve to the data (see the SAGE Research Methods Datasets module on Time Series Fitted Lines).