Rr‑statistics.co

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.

i 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.

Logistic, Poisson, quasi-binomial, quasi-Poisson, Gamma. Plain-English read with odds-ratio / rate-ratio conversion, runs in your browser

Try a real-world example to load.

📊 Logistic on mtcars

Predict transmission type (am: auto vs manual) from weight and horsepower.

Paste a summary(glm(...)) block on the left to get a plain-English interpretation.
R code RUNNABLE
R Reproduce in R

        
Predicted curve INTERACTIVE
Logistic: probability vs predictor.
Inference

Read more Anatomy of a GLM (link, deviance, AIC, pseudo-R-squared)
Link functions: logit(p) = log(p / (1 - p)) binomial log(mu) = b0 + b1*x1 + ... poisson, Gamma(log) 1 / mu = b0 + b1*x1 + ... Gamma(inverse) mu = b0 + b1*x1 + ... gaussian (identity)
Link functions. The link is what pulls the outcome onto the linear scale. logit makes a probability live on the real line; log keeps positive counts positive; identity is plain regression. Coefficients are always reported on the link scale; for logit and log you almost always want to exponentiate.
Deviance: D0 = -2 logL(null model) D = -2 logL(fitted model) LR = D0 - D (chi-squared, df = k - 1) McFadden pseudo-R2 = 1 - D / D0
Deviance and pseudo-R-squared. Deviance generalizes the residual sum of squares. The likelihood-ratio test of "any predictor matters" is just D0 - D against chi-squared on k - 1 df. McFadden = 1 - D/D0 is the GLM analogue of R-squared, but values 0.20 to 0.40 are already considered very good for logistic.
AIC = 2k - 2 logL BIC = k log(n) - 2 logL Lower is better; only valid on the SAME data + family.
AIC and model comparison. AIC compares fits on the same data. It is meaningless across different datasets or different distribution families. For nested models, the LR test (anova(fit1, fit2, test = "Chisq") for binomial / Poisson, or test = "F" for quasi-families) is the formal comparison.
Dispersion parameter phi: binomial / poisson: phi = 1 (assumed) quasi-families: phi = sum(Pearson residuals^2) / df phi much greater than 1: overdispersion
When to switch to quasi. Default Poisson assumes variance equals the mean. If residual deviance / df is well above 1 (a rule of thumb is 1.5), your standard errors are too small. Switch to 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() or logistf::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.
Further reading

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.