Are there groups with similar answers? (latent classes, latent class analysis)
In brief
Latent classes (latent class analysis) are the sister of latent profiles for answers that are categories, for example yes/no or answer steps. The assumption: each person belongs, unknown, to one of K classes, and in each class the questions have their own answer probabilities. Within a class the answers are no longer to be related (local independence). Statable calculates the solutions for 1 to K classes and shows BIC, AIC and entropy for each. The number of classes is chosen by the human.
An example with real data
Seven pathologists rate 118 tissue slides, each as cancer yes or no (Agresti 2002; example "carcinoma" from poLCA). The BIC (smaller is better):
| Classes | BIC | Entropy | Parameters |
|---|---|---|---|
| 1 | 1082.3 | - | 7 |
| 2 | 706.1 | 0.986 | 15 |
| 3 | 697.1 | 0.926 | 23 |
| 4 | 726.5 | 0.902 | 31 |
- The BIC is smallest at 3 classes, but only 8.9 smaller than at 2 classes; at 4 classes it rises again (by 29.3 above the value of 3). The distance between 2 and 3 is small; the solution with 2 classes is simpler and assigned more clearly. The BIC alone therefore does not decide; entropy, size of the smallest class and the meaning of the classes belong to it.
- The parameters: with yes/no only one probability per class and question is free, and the class shares are added (one fewer than classes). With 3 classes and 7 questions that is 2 + 3 · 7 = 23 parameters.
- With 2 classes (50.1% and 49.9% of the slides) pathologist A judged all slides in class 1 as cancer (100%), in class 2 only 11.7%; pathologist F in class 1 42.3%, in class 2 0.0%. The classes are therefore groups of slides in which the judgements fall together in a pattern. Whether a slide really has cancer, the calculation does not say.
A second example in which the classes are less sharp: four questions from the General Social Survey 1982 (1202 respondents, opinion about surveys). With 2 classes (80.8% and 19.2%) the entropy is only 0.703; the BIC is smallest at 3 classes (5650.9), only 7.8 below the value at 2 classes. Here the classes are usable for describing, but the assignment of individual respondents stays uncertain.
When do I use it?
When you suspect that people can be divided into a few groups by their pattern of answers to several yes/no or step questions (for example types of use or types of attitude), and want probabilities of membership. For measured numbers you use the latent profiles under cluster analysis.
Requirements
- Three to 15 columns with at most eight values and 30 to 10,000 people with all answers; about ten people per class are needed, otherwise Statable does not calculate that many classes. People with a gap drop out.
- Local independence: within a class the questions are no longer to be related. Questions with almost the same wording violate this and easily create additional classes that only depict this pair.
- Enough people: with few people and many questions the estimates of the probabilities are uncertain; the number of parameters grows quickly with every class (here by 8 per class).
How it works in Statable
- Open a file with at least three columns that contain yes/no or a few answer steps (at most eight values per column).
- Run the question "Do my questions measure the same thing? (scale analysis, Cronbach's alpha)" with these columns.
- Under the result open "Are there groups with similar answers? (latent classes, latent class analysis)", choose the highest number of classes (2 to 6) and "Calculate classes". Ctrl+K: "latent classes".
- In the table of the numbers of classes look at BIC, entropy and smallest class, then choose "Number of classes to look at": the picture and tables show the answer probabilities per class.
- With "As R script with data (.zip)" you take the calculation with you; it needs only base R.
Statable calculates each solution with many random starting values (60, 25 with very large data) and shows the best, because the calculation (EM algorithm, Dempster et al. 1977) can get stuck in a merely locally best solution. The class numbers are only labels, ordered by size. Classes with fewer than 2 people do not count.
Reading and reporting the result
A latent class analysis with seven yes/no judgements (N = 118) compared solutions with 1 to 4 classes. The BIC was smallest at 3 classes (697.1), only 8.9 below the value at 2 classes (706.1); at 2 classes the entropy was 0.986. The solution with 2 classes (50.1% and 49.9%) was chosen because it fits almost as well and assigns more clearly.
Limits
- The classes are groups of answer patterns, not proven types of people and not true states (such as "ill" and "healthy").
- In simulations (Nylund et al. 2007) the BIC is a useful measure for the number of classes, but not a proof. The bootstrap likelihood ratio test that the literature recommends in addition is not built in Statable; in R it works with the package poLCA or tidyLCA. Statable says when the smallest class has less than 5% of the people.
- No covariates that explain membership, no handling of missing values other than leaving the person out, no weights.
What is often misunderstood
Sources
Nylund, K. L., Asparouhov, T. & Muthén, B. O. (2007). Deciding on the number of classes in latent class analysis and growth mixture modeling: A Monte Carlo simulation study. Structural Equation Modeling, 14, 535-569. Weller, B. E., Bowen, N. K. & Faubert, S. J. (2020). Latent class analysis: A guide to best practice. Journal of Black Psychology, 46, 287-311. Linzer, D. A. & Lewis, J. B. (2011). poLCA: An R package for polytomous variable latent class analysis. Journal of Statistical Software, 42(10), 1-29. Dempster, A. P., Laird, N. M. & Rubin, D. B. (1977). Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society B, 39, 1-38. The example data (carcinoma, gss82) come from the R package poLCA (GPL).
Take away
- Latent classes: each person belongs, unknown, to one of K classes, in each the questions have their own answer probabilities; probabilities of membership are calculated.
- Read BIC (smaller is better), entropy (near 1 = clear assignment), smallest class and meaning together; if two numbers of classes are close in the BIC, the simpler and clearer one counts.
- Class numbers are only labels; classes are neither proven types nor true states.
- For measured numbers use latent profiles, for yes/no and answer steps latent classes.