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.
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.


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)
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)
