SPSS: How to Create a Scatterplot with Regression Line


Often you may want to create a scatterplot with a regression line in SPSS, such as the following:

SPSS scatterplot with regression line

Fortunately this is easy to do and the following step-by-step example shows how to do so.

Step 1: Enter the Data

First, let’s enter the following dataset into SPSS that contains information about total ad spend and total sales for 12 different retail stores:

We will create a scatterplot that displays ad spend on the x-axis and sales on the y-axis.

We will then add a regression line to the plot that uses ad spend as the predictor variable and sales as the response variable in the model.

Step 2: Insert a Scatterplot

To insert a scatterplot, click the Graphs tab, then click Chart Builder.

In the new window that appears, do the following:

  • Choose Scatter/Dot from the list of charts.
  • Drag the first scatter plot icon into the Chart Builder area.
  • Drag the Ad_Spend variable to the x-axis of the plot.
  • Drag the Sales variable to the y-axis of the plot.
  • Check the box next to Total under Linear Fit Lines

Then click the Y-Axis1 under Edit Properties of, then type 0 as the Minimum value for the Y-axis:

Once you click OK, the following scatterplot will be generated:

Notice that the scatterplot displays a blue regression line overlaid on the points in the plot.

The R2 value of the regression line is also shown in the top right corner outside of the plot.

Related: What is Considered a Good R-squared Value?

Step 3: Add Regression Line Equation

To add the regression line equation to the plot, double click anywhere on the plot to bring up the Chart Editor.

The double click on the regression line in the chart.

In the new window that appears, click the Fit Line tab and then check the box next to Attach label to line:

Once you click Apply, the regression line equation will be added to the regression line:

SPSS scatterplot with regression line

We can see that the fitted regression line equation is:

Sales = 29.63 + 0.76(Ad Spend)

Here is how to interpret the coefficients of the regression equation:

  • When ad spend is zero, expected sales is 29.63.
  • For each additional dollar in ad spend, sales increases by an average of 0.76.

Additional Resources

The following tutorials explain how to perform other common operations in SPSS:

How to Perform a Correlation Test in SPSS
How to Perform a Breusch-Pagan Test in SPSS
How to Calculate Cook’s Distance in SPSS

Leave a Reply

Your email address will not be published. Required fields are marked *