A log-linear model explains the counts in a multi-way table of categorical variables, and the way to read it is the opposite of almost every other test in the app: here a large p is good. Magic Stat fits the model by iterative proportional fitting and reports the same quantities as R's loglm.
There is no response variable in a log-linear model. Every variable is categorical, the numbers being modelled are the cell counts of their cross-table, and the model describes how those counts depend on the margins. A model containing the right interaction terms reproduces the table closely; the test compares your chosen model against the saturated model, so a non-significant result — a large p — means the terms you specified are enough. A small p means the counts need a higher-order interaction.
Magic Stat fits the model by iterative proportional fitting, the same algorithm as stats::loglin, and reports G² (likelihood ratio) and Pearson's X² against the saturated model, with the degrees of freedom and both p-values. Coefficients follow the sum-to-zero convention of MASS::loglm, and the fitted values with their deviance residuals are shown cell by cell.
This is the right tool for counts in a table of three or more categorical variables. If one variable is really a response and the others are predictors, a Poisson GLM is the honest framing; if you have only two variables, the contingency-table analysis already answers the independence question.
Input: categorical factors only, plus an optional count column (or one row per observation).
Model presets: independence · all two-way · all three-way · saturated · custom terms by checkbox.
Fit: iterative proportional fitting; the convergence tolerance and iteration limit follow the loglm defaults.
Reported: G² and Pearson X² with df and p · sum-to-zero coefficients · fitted values and deviance residuals.
Because the test compares your model against the saturated one. A large p means the simpler model is not significantly worse — the terms you chose already reproduce the table. This is the opposite of an ANOVA or a t-test, and it is the single most common way to misread a log-linear result.
The model explains counts of a categorical cross-table, so the factors must be categorical. A continuous predictor changes the question into a Poisson regression, which is a different model with a response. The app keeps the two separate.
The contingency-table analysis tests independence between two variables. A log-linear model generalises that to three or more variables and lets you specify which interactions to include, rather than only testing the all-independent model.
They follow MASS::loglm: sum-to-zero constraints per index, on the log scale, with the intercept the mean of the log expected counts. exp(coefficient) is the multiplicative effect on the expected count. A Poisson GLM would fit the same cells but parameterise the coefficients differently (treatment contrasts), so the coefficients are not directly comparable to a GLM summary.
Here, locally, by iterative proportional fitting. The only automatic signal is an anonymous installation counter.
Contingency tables → Goodness-of-fit test → Poisson regression →