Discriminant analysis
Finds linear combinations of numeric predictors that best separate known groups, and classifies cases into groups.
Menu: Analyze → Classify → Discriminant…
When should I use it?
- Which test scores best distinguish students who choose science, arts or business?
- Classify loan applicants as likely to repay or default.
What are the assumptions?
- Groups known in advance; numeric predictors.
- Multivariate normality within groups and equal covariance matrices (Box's M, judged at .001).
- Smallest group larger than the number of predictors.
How do I run it in StatLab?
- Move the group variable to Grouping variable (optionally restrict its range).
- Move the predictors to Independents.
- Keep univariate ANOVAs, Box's M and leave-one-out classification.
- Use group-size priors when the groups differ in size in the population.
- Choose the stepwise method to let Wilks' lambda pick the predictors: at each step the variable that most reduces lambda enters (F to enter 3.84) and a variable leaves if its F to remove drops below 2.71.
How do I read the output?
| Output | Meaning |
|---|---|
| Tests of Equality of Group Means | Which predictors differ between groups on their own. |
| Eigenvalues | Variance and canonical correlation of each discriminant function. |
| Wilks' Lambda | Whether the functions separate the groups. |
| Standardized Coefficients and Structure Matrix | Which predictors drive each function. |
| Functions at Group Centroids | Where each group sits on the functions. |
| Classification Results | Percentage correctly classified, also with leave-one-out cross-validation. |
| Variables Entered/Removed, Variables in / Not in the Analysis | The stepwise path with Wilks' lambda, F to enter / remove and tolerances at every step. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC glmDiscriminant /group=group /vars=(score age) /uni=YES /boxm=YES /fisher=YES /unstd=YES /method=enter /fin=3.84 /fout=2.71 /priors=equal /cv=YES /save=NO.
Output tables: Analysis Case Processing Summary · Group Statistics · Tests of Equality of Group Means · Log Determinants · Test Results · Eigenvalues · Wilks' Lambda · Standardized Canonical Discriminant Function Coefficients · Structure Matrix · Canonical Discriminant Function Coefficients · Functions at Group Centroids · Prior Probabilities for Groups · Classification Function Coefficients · Classification Results.
How would I report it in APA style?
A linear discriminant analysis with 2 predictors distinguished 3 groups of Programme group (N = 150). Functions 1 to 2: Λ = .892, χ²(4) = 16.80, p = .002; Functions 2: Λ = .999, χ²(1) = 0.13, p = .721. The first function had canonical correlation .328 (99.3% of discriminating variance). 41.3% of cases were classified correctly (39.3% with leave-one-out cross-validation).
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Judging accuracy only on the original cases — the cross-validated rate is more honest.
- Ignoring a very significant Box's M with very unequal group sizes.