Scatter diagram

Command:    

Statistics
Next selectCorrelation
Next selectScatter diagram

Description

In a scatter diagram, the relation between two numerical variables is presented graphically. One variable (the variable X) defines the horizontal axis and the other (variable Y) defines the vertical axis. The values of the two variables on the same row in the data spreadsheet, give the points in the diagram.

Required input

Dialog box for scatter diagram

Variables and Selection criterion

Select the 2 variables. You can click the Drop-down button button to obtain a list of variables. Optionally, you may also enter a selection criterion in order to include only a selected subgroup of cases in the graph.

Options

  • You can select a Logarithmic transformation for both variables (in this case the program will use a logarithmic scale for the corresponding axis in the graph).
  • Line of equality: option to draw a line of equality (y=x) line in the graph.
  • Use the Subgroups button if you want to identify subgroups in the scatter diagram. A new dialog box is displayed in which you can select a categorical variable. The graph will use different markers for the different categories in this variable.

Results

After you click the OK button, or press the Enter key you obtain the following graph:

Scatter diagram

This is the same scatter diagram, but the categorical variable "Treatment" has been used to identify different subgroups in the graph.

Scatter diagram with subgroups

Literature

  • Altman DG (1991) Practical statistics for medical research. London: Chapman and Hall.

See also