glm() Output Interpreter
R's glm() fits logistic, Poisson, and other generalized linear models that handle binary or count outcomes. Paste your summary(glm(...)) block to get plain-English coefficient reads with odds ratios or rate ratios, deviance, AIC, McFadden pseudo-R-squared, and family-aware diagnostic callouts.
New to GLMs? Read the 4-min primer ▾
What glm() does and why link functions exist. Linear regression assumes a continuous, roughly normal outcome. glm() generalizes that to outcomes that are binary (yes / no), counts (calls per day), or strictly positive (wait times). The trick is the link function: it maps a transform of the outcome onto the linear scale so the same b0 + b1*x1 + ... machinery works. Logistic uses logit, Poisson uses log, Gamma uses inverse or log.
Reading logistic vs Poisson coefficients. Coefficients live on the link scale, which is rarely what stakeholders want. For logistic, exponentiate to get an odds ratio: a coefficient of 0.83 means the odds are multiplied by exp(0.83) = 2.29 per 1-unit increase. For Poisson, exponentiate to get a rate ratio: 0.34 means the expected count is multiplied by 1.40. The tool does this for you and writes it in plain English.
Deviance vs sum of squares. Linear regression has total SS, residual SS, and R-squared. GLMs have null deviance, residual deviance, and McFadden pseudo-R-squared = 1 - resid/null. The likelihood-ratio test (chi-squared on null minus residual) plays the role of the overall F-test. AIC compares non-nested models on the same data; lower is better.
Picking a model. Binary outcome? logistic (binomial, logit). Counts where variance is roughly the mean? Poisson (log). Counts where variance is bigger than the mean (overdispersion)? quasi-Poisson or negative binomial. Always-positive continuous (wait times, costs)? Gamma. Identity-link Gaussian glm is just lm(); switch to the lm interpreter for cleaner output.
Try a real-world example to load.
Predict transmission type (am: auto vs manual) from weight and horsepower.
summary(glm(...)) block on the left to get a plain-English interpretation.Read more Anatomy of a GLM (link, deviance, AIC, pseudo-R-squared)
quasipoisson (inflate SEs) or glm.nb() (model the extra variance). Same logic for quasi-binomial when a binomial model shows extra variance.Caveats When this is the wrong tool
- If you have...
- Use instead
lm()output (Gaussian, identity link)- lm() interpreter. Gaussian glm is algebraically identical to lm; the lm tool gives you R-squared and the F-test directly.
- Suspected collinearity (large SEs, sign flips)
- Compute VIFs with
car::vif(fit). The dedicated VIF tool is in scope for batch 5.3. - Residual / influence plots
- Use
plot(fit)in R. The residual diagnostics tool is scoped for batch 8.3. - Extreme estimates and SEs in logistic
- Likely separation. Use
brglm::brglm()orlogistf::logistf()for penalized logistic. - Mixed effects (
glmer,lmer) - Random-effects output needs a separate interpreter; this tool only handles fixed-effects glm.
- Multinomial / ordinal (
multinom,polr) - Each category needs its own coefficient set; not handled here.
- Logistic regression in R, end to end, fitting, interpretation, classification.
- Poisson and negative binomial regression, when to switch from Poisson to NB.
- Odds ratios and relative risk, when an OR is and is not a relative risk.
- lm() interpreter, the linear-regression sibling of this tool.
- Confidence interval calculator, for any single coefficient on the OR or RR scale.
Numerical accuracy: qnorm uses Beasley-Springer-Moro; chi-squared upper tail via Lentz continued fraction. Cross-checked against R's qnorm() and pchisq() for input ranges typical of glm output.