StatLabStudent EditionUser guideGalleryFeaturesAbout

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?

What are the assumptions?

How do I run it in StatLab?

  1. Move the group variable to Grouping variable (optionally restrict its range).
  2. Move the predictors to Independents.
  3. Keep univariate ANOVAs, Box's M and leave-one-out classification.
  4. Use group-size priors when the groups differ in size in the population.
  5. 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?

OutputMeaning
Tests of Equality of Group MeansWhich predictors differ between groups on their own.
EigenvaluesVariance and canonical correlation of each discriminant function.
Wilks' LambdaWhether the functions separate the groups.
Standardized Coefficients and Structure MatrixWhich predictors drive each function.
Functions at Group CentroidsWhere each group sits on the functions.
Classification ResultsPercentage correctly classified, also with leave-one-out cross-validation.
Variables Entered/Removed, Variables in / Not in the AnalysisThe 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?

Open StatLab   All guide topics