Can the group of a case be recognized from numbers? (discriminant analysis)
In brief
Can students who drop out be recognized by motivation, prior knowledge and study time? Discriminant analysis looks for functions of several numbers that separate groups best, assigns each case to a group and shows with the hit rate how often this is right.
How it works in Statable
- "New analysis" (button after the tabs), then choose the card "Can the group of a case be recognized from numbers?".
- "Which group should be recognized?": the column with the groups. "From which numbers?": at least two number columns.
- The result appears by itself. What counts is the hit rate of the check without the case itself (leave-one-out), not the "learned" one.
What the table looks like
One row per case, one column with the group (2 to 12 groups) and at least two columns with numbers (at most 30). Rows with a gap in one of the numbers are not included; the number is shown in the result. Statable does not calculate if a group has fewer cases than the number of numbers plus 1, if a group has only one case, or if a number column is constant or can be calculated from the others. The reason is then given in a sentence.
Reading the result
- Hit rate: two values stand side by side. "Learned" is too good because the same cases were learned and checked. What counts is the check without the case itself (leave-one-out): each case is checked with a classification that does not know it. Statable also gives the rate that would be possible without any calculation by always predicting the largest group. Only if the check is clearly above that does the calculation help.
- Eigenvalues and canonical correlation: the first function separates the groups most strongly. The share says how much of the separation falls on it; the canonical correlation lies between 0 and 1, higher means more strongly separated.
- Wilks' Λ: it tests whether the functions separate the groups at all. A small Λ with a small p speaks for it. The first row tests all functions together, the next one the remaining ones after the first.
- Standardized coefficients: they show which numbers carry a function most. The sign of a function is arbitrary: Statable sets the first coefficient of each function positive. SPSS may show the opposite sign; the message stays the same.
- Classification table: rows are the true groups, columns the predicted ones. It shows which groups are confused.
Prior probability
Under "More options" you can choose whether the classification treats all groups alike (default, as in SPSS) or by the size of the groups. This changes only the classification and the hit rate, not the functions, the eigenvalues and Wilks' Λ.
Difference from SPSS
Functions, eigenvalues, Wilks' Λ and standardized coefficients are the same (apart from the sign). The classification with equal prior probability and the check without the case itself agree as well.
Requirements and limits
- The calculation assumes equal covariances in the groups and approximately normally distributed numbers. Statable does not check this with a test.
- With fewer than 20 cases per number the result can be unstable. Statable points this out.
- The discriminant analysis describes the data it learns from. How well it classifies new cases is shown only by a check on other cases; leave-one-out comes close to that.
Reporting the result
Wilks' Λ = .023, χ²(8) = 546.12, p < .001; leave-one-out 98.0% correct (largest group 33.3%)
Typical examples
- Students with and without dropout by motivation, prior knowledge and study time.
- Tell three learner types apart by results in several tests.
For specialists
R (MASS::lda) with the default prior probability, so that functions, eigenvalues and Wilks' Λ do not depend on the group sizes (as in SPSS). Eigenvalue = svd² · (k - 1)/(n - k); Λ per step as the product of 1/(1 + eigenvalue); χ² = -(n - 1 - (p + k)/2) · ln Λ. Classification with predict and the chosen prior probability, leave-one-out with lda(CV = TRUE). Checked on iris and biopsy against the hand calculation and SPSS.