Overview

Use discriminant analysis to find the combinations of variables that best separate groups that are already known, and to assign cases to those groups: for example, telling male and female birds apart from their wing length and bill depth, then sexing new birds from the same measurements.

Grouping finds the discriminant functions, shows how much of the difference between the groups each one explains and which variables contribute most, and tests each function with Wilks’ lambda. Classification builds a function for each group and assigns each case to the group with the highest score. It can classify the original cases, check the error rate by holding out each case in turn, or classify a new dataset.

Unlike cluster analysis, which looks for groups in the data, discriminant analysis starts from groups that are already known. Principal components and factor analysis also combine variables, but they summarise the variation without reference to any groups.

A scatter plot of two groups of points, blue Group 1 and orange Group 2, which overlap on both Variable 1 and Variable 2. A green arrow labelled Function 1 crosses both groups, and a dashed line at right angles to it divides the two groups cleanly.
Two groups that overlap on each variable but separate along the discriminant function. The dashed line divides the cases that would be classified into each group.

Methods

  • Grouping, which finds the discriminant functions that best separate two or more known groups
  • Classification of the original cases, or of a new dataset, into those groups, including holdout (leave-one-out) classification

Running the analysis

The data needs one column giving each case's group and adjacent columns of numeric variables, with no missing values. Click Discriminant Analysis on the statistiXL ribbon and choose Grouping or Classification. In the dialog, select the factor (grouping) range, the variable range and the output location, and choose the optional output. The Tolerance page sets the minimum allowed tolerance, which checks for multicollinearity, and what happens when a variable falls below it. The Plots page (Grouping only) sets the discriminant score plots.

The Discriminant Analysis button on the statistiXL ribbon with its menu open, listing Grouping (highlighted) and Classification.
The Discriminant Analysis menu on the statistiXL ribbon.
The General page of the Discriminant Analysis dialog, with a factor range, a variable range, a Labels in First Row option, an output range, options for descriptive statistics, the covariance matrix and casewise scores (with an option to standardise them), Tolerance and Plots tabs, and the QuickHelp pane on the right.
The Discriminant Analysis dialog, with QuickHelp on the right.

What the output includes

Grouping

  • Descriptive statistics for each variable in each group, and the pooled covariance matrix (optional)
  • Tolerance values for each variable, which show multicollinearity (optional)
  • Eigenvalues, with the percentage and cumulative percentage of variance and the canonical correlation, for each discriminant function
  • Wilks' lambda for each function, tested with chi-square, with degrees of freedom and P values
  • Unstandardised and standardised discriminant function coefficients
  • Group centroids
  • Casewise discriminant scores, optionally standardised (optional)
  • Scatter plots of the discriminant scores, with lines showing each variable's coefficients (optional)
Output from a grouping discriminant analysis, with a plot of the discriminant scores.
Discriminant analysis output in Excel for six variables in three groups. Tables give the eigenvalues of the two discriminant functions (1.918 and 0.116, explaining 94.3% and 5.7% of the variance), Wilks' lambda with chi-square tests (P of 0.000 for both functions together and 0.099 for function 2), the standardised discriminant function coefficients and the group centroids, beside a scatter plot of the cases on the two functions.

Classification

  • Descriptive statistics, the pooled covariance matrix and tolerance values, as for grouping (optional)
  • Classification function coefficients and a constant for each group
  • A classification table of actual and predicted groups, with the correct classification rate for each group and overall
  • The actual and predicted group and the classification scores for each case (optional)
  • Holdout (leave-one-out) classification of each case (optional)
  • The predicted group and classification scores for each case in a new dataset (optional)