Loglinear analysis
Model the counts in a contingency table.
When to use it
Use loglinear analysis when you have two or more categorical variables and you want a model of the cell counts, not a single chi-square. A saturated model fits every cell. An independence model says the variables are unrelated.
Assumptions
Cells should not be mostly empty. Tensr stores sparse_cell_fraction. The saturated model has no residual degrees of freedom, so its likelihood-ratio chi-square is 0 and its comparison p is empty.
Running it in Tensr
Options
Prop
Type
Reading the output
Teaching method and time of day. The independence model. Time was balanced inside each method, so the two factors were not built to be associated.
| Cell | Observed | Expected |
|---|---|---|
| Lecture, Afternoon | 16 | 16 |
| Lecture, Morning | 16 | 16 |
| Online, Afternoon | 16 | 16 |
| Online, Morning | 16 | 16 |
| Workshop, Afternoon | 16 | 16 |
| Workshop, Morning | 16 | 16 |
Every teaching method × time cell has the same count, and the independence model expects that same count. Goodness-of-fit p = > .999. Method and time of day are not associated. The coefficient rows for this balanced table are numerical zeros, so use the cell table and the fit p.
Reporting (APA 7)
An independence loglinear model fit the method × time table, p = > .999, N = 96. Teaching method and time of day were not associated.
Coming from SPSS
Analyze → Loglinear → General. The route is on the Analyze menu.