Skip to main content
v2026.11,610 entries · CC-BY 4.0

Logistic Regression (the Logit Model): Interpretation, Diagnostics, and Reporting

A guide to logistic regression (the logit model): the logit link, interpreting log-odds and odds ratios correctly, maximum-likelihood fitting, diagnostics including separation, ROC/calibration, variants, and reporting.

Ask about Logistic Regression (the Logit Model): Interpretation, Diagnostics, and Reporting

Answers are drawn from this guide and the rest of the CASRAI corpus, with a link to every source.

Answers are AI-generated from CASRAI’s own published pages and can be wrong, so check the linked sources before relying on one; your question is logged without personal data — never sold, never used to train a third-party model — to show us what CASRAI is missing, so please do not type personal or confidential details. How we use this

Logistic regression — also called the logit model — is the standard method for modeling a binary outcome (yes/no, event/no event, funded/not funded) as a function of one or more predictor variables. It is the model of choice whenever your dependent variable has exactly two categories, and understanding it correctly matters because its output is routinely misread: coefficients are on the log-odds scale, not the outcome scale, and the exponentiated odds ratio that everyone reports is not the same thing as a risk ratio, no matter how often the two are used interchangeably in press coverage of health and social-science findings. This guide builds the model from first principles, works through where the odds-ratio/risk-ratio confusion actually comes from, and covers the diagnostics, performance metrics, variants, and reporting conventions a methods reviewer expects to see.

When to use logistic regression

Use (binomial) logistic regression when your outcome variable is binary — it takes exactly two values, however they’re coded (0/1, yes/no, alive/dead, cited/not cited). Common research-administration and research-methods examples: whether a grant application was funded, whether a manuscript was retracted, whether a participant was lost to follow-up, whether a trial site met its enrollment target.

If your outcome has more than two unordered categories, you need multinomial logistic regression; if the categories are ordered, ordinal logistic regression; both are logit-family extensions of the same underlying model and are covered below. For a continuous outcome, use ordinary linear regression instead — see the CASRAI guide to regression analysis for how to choose among the full family of regression models by outcome type.

Why linear regression fails for a binary outcome

It’s tempting to code a binary outcome as 0/1 and run ordinary least squares on it — this is sometimes called the “linear probability model.” It fails in a specific, predictable way:

  • Predicted values fall outside [0, 1]. A linear model has no mechanism to keep predictions bounded; for extreme predictor values it will happily predict a probability of −0.15 or 1.4, which is meaningless.
  • The residuals are neither normally distributed nor homoscedastic. With a 0/1 outcome, each residual can only take one of two values for any given fitted probability (the observation is either 0 or 1), which mechanically produces a residual variance that depends on the fitted value itself — the opposite of the constant-variance assumption ordinary least squares relies on.
  • The true relationship between predictors and probability is rarely linear across its full range. Probability is bounded at 0 and 1, so the effect of a one-unit change in a predictor must shrink as the predicted probability approaches either boundary — a straight line cannot represent that.

Logistic regression solves all three problems at once by modeling a transformation of the probability — the log-odds — as the linear function, instead of modeling the probability itself.

Building the logit link: odds, log-odds, and the logistic function

Three quantities, built in sequence:

  1. Probability (p): the chance the event occurs, bounded between 0 and 1.
  2. Odds: p / (1 − p) — the ratio of the probability the event happens to the probability it doesn’t. Odds range from 0 to positive infinity. A probability of 0.5 gives odds of 1 (“even odds”); a probability of 0.8 gives odds of 4 (0.8 / 0.2).
  3. Log-odds (the logit): ln(odds) — the natural logarithm of the odds. This transformation is what makes the model work: log-odds range from negative infinity to positive infinity, exactly like an ordinary linear predictor, with no boundary problem.

The logit model states that the log-odds of the outcome is a linear function of the predictors:

logit(p) = ln( p / (1 − p) ) = β0 + β1X1 + β2X2 + … + βkXk

To get back to a probability — the number people actually want — you invert that equation. The inverse of the logit function is the logistic function:

p = 1 / (1 + e−(β0 + β1X1 + …))

Plotted against the linear predictor, this produces the characteristic S-shaped (“sigmoid”) curve: it approaches 0 as the linear predictor goes to negative infinity, approaches 1 as it goes to positive infinity, and is steepest near p = 0.5 — which is exactly the behavior a linear model can’t reproduce, and exactly why the transformation is necessary rather than cosmetic.

Interpreting the coefficients: log-odds, odds ratios, and where people go wrong

Each β coefficient from a fitted logit model is a change in log-odds, not a change in probability, for a one-unit increase in that predictor (holding the others constant). Log-odds is not an intuitive scale, so almost nobody reports it directly. Instead:

Exponentiating a coefficient gives an odds ratio (OR): eβ. An OR of 1.8 means the odds of the outcome are 1.8 times higher for a one-unit increase in that predictor. An OR above 1 indicates higher odds of the outcome; below 1, lower odds; an OR of exactly 1 means the predictor has no association with the odds.

The intercept

β0, exponentiated, gives the odds of the outcome when every predictor equals zero. This is only meaningful if zero is a real, interpretable value for every predictor in the model (centering continuous predictors, e.g. on their mean, is standard practice specifically so the intercept has a sensible reading). Left uncentered, the intercept is frequently a mathematical artifact with no real-world interpretation and is usually not reported as a substantive finding on its own.

Odds ratios are not risk ratios: a worked numeric example

The figures below are a constructed arithmetic illustration, not data from any real study. The confusion between an odds ratio and a risk ratio (also called a relative risk) is the single most common misreading of logistic regression output, and it matters most exactly when it’s most tempting to ignore it: when the outcome is common.

Take a predictor with a true odds ratio of 2.0, and compare what that OR implies for the probability itself at two different baseline (reference-group) risks:

Baseline probability p0 Baseline odds OR = 2.0 → new odds Implied new probability p1 Risk ratio (p1/p0)
Rare outcome 0.05 0.0526 0.1053 0.095 1.90
Common outcome 0.40 0.667 1.333 0.571 1.43

With the same odds ratio of exactly 2.0 in both rows, the risk ratio is 1.90 when the outcome is rare — close enough to the OR that the two are often (loosely) used interchangeably — but only 1.43 when the outcome is common, a materially smaller effect on the probability scale. This is the standard “rare disease assumption”: OR approximates RR only when the outcome is uncommon (as a rough guide, well under 10–20% prevalence in the reference group); above that, reporting an OR as if it were a risk ratio overstates the real-world effect on probability, sometimes substantially. When the outcome is common, either report probabilities/risk ratios directly (via a log-binomial or Poisson model with robust variance, if risk ratios are the target estimand) or report the OR but state plainly, in the same sentence, what baseline risk it applies to.

Marginal effects

Because the logistic curve is non-linear, a one-unit change in a predictor does not produce a constant change in probability the way an OR is constant in odds — the effect on probability is largest near p = 0.5 and shrinks toward the boundaries. A marginal effect (commonly the average marginal effect, computed by averaging the model-implied slope of the probability curve across all observations, or a marginal effect at the mean, computed at a specific representative predictor profile) expresses the result in probability points instead of odds, at the cost of that estimate depending on where in the predictor space it’s evaluated — unlike the OR, which is constant across the whole range by construction of the model.

Fitting the model: maximum likelihood, not least squares

Logistic regression coefficients are estimated by maximum likelihood estimation (MLE): the algorithm searches for the coefficient values that make the observed pattern of 0s and 1s most probable under the model, rather than minimizing squared residuals as ordinary least squares does. This has two direct consequences for what you can and can’t report.

There is no R²: pseudo-R² and its limits

Ordinary R² is a variance-explained statistic that has no direct analogue under maximum likelihood, because there’s no residual sum of squares to compare against a total sum of squares in the same sense. Several pseudo-R² statistics exist as approximations, most commonly:

  • McFadden’s pseudo-R² — based on the ratio of the fitted model’s log-likelihood to a null (intercept-only) model’s log-likelihood. Its scale doesn’t match ordinary R²; values of 0.2–0.4 are often described as representing a good fit on this statistic specifically, which is a much lower bar than the same numbers would represent for linear R².
  • Nagelkerke’s (Cragg-Uhler) pseudo-R² — a rescaled version of Cox and Snell’s pseudo-R² that adjusts the maximum achievable value to 1, making it closer to a familiar 0-to-1 reading.

The shared limitation: none of these pseudo-R² values are directly comparable to linear-regression R², to each other across different software defaults, or across different outcome prevalences on the same predictors — report them as a supplementary fit descriptor, never as the primary evidence the model is adequate, and never compare a pseudo-R² from one study directly against an ordinary R² from another.

The likelihood-ratio test

The standard test of overall model fit is the likelihood-ratio (LR) test, comparing the log-likelihood of your fitted model against a reduced or null model via a chi-square distributed test statistic (−2 times the difference in log-likelihoods), which in turn produces the p-value reported for the test. It is also the standard way to test whether adding a block of predictors, or a single predictor, improves fit — report it alongside the coefficient table as the model-level significance test, the logistic analogue of the omnibus F-test in linear regression.

Assumptions and diagnostics

Logistic regression’s assumption set is different from linear regression’s — it does not require normally distributed residuals or homoscedasticity, because those are consequences of least-squares estimation on a continuous outcome, not general modeling requirements. What it does require:

Independence of observations

Each observation’s outcome should be uninformative about another’s, absent the modeled predictors. Repeated measures, matched sets, or observations clustered within a higher-level unit (patients within clinics, applications within funding rounds) all violate this and call for a structural fix — conditional logistic regression for matched data, or mixed-effects logistic regression for clustered data (both covered below) — not a post-hoc correction.

Linearity in the logit

Each continuous predictor is assumed to be linearly related to the log-odds of the outcome, not to the outcome itself — this is a materially weaker, more flexible assumption than linear regression’s linearity requirement, but it’s still checkable and still violated in practice. The standard diagnostic is the Box-Tidwell test: add an interaction term between each continuous predictor and its own natural log to the model, and check whether that interaction term is statistically significant. A significant interaction suggests the predictor’s relationship with the logit is non-linear, and calls for a transformation (a polynomial term, a spline, or categorizing the predictor) rather than leaving it linear.

Multicollinearity

Checked the same way as in linear regression — the Variance Inflation Factor (VIF) for each predictor, with values above 5 commonly flagged for attention and above 10 treated as a clear problem. See the CASRAI regression analysis guide for the full multicollinearity diagnostic writeup, which applies unchanged to the logit model.

Events per variable: the ~10 EPV rule and its limits

A widely cited 1996 simulation study (Peduzzi et al., Journal of Clinical Epidemiology) recommended at least 10 events — meaning observations in the less common outcome category — per predictor variable in the model, to avoid biased coefficients, inflated standard errors, and an unstable, overfit model. This “10 EPV” rule became the default heuristic cited in methods sections for two decades.

It has since been substantially qualified. Later simulation work (notably Vittinghoff and McCulloch, 2007) found that problems were concentrated at much lower EPV — roughly 2 to 4 — and that an EPV as low as 5–9 often performed adequately, while subsequent methodological reviews have argued the evidence underlying a fixed EPV=10 threshold is weaker than its ubiquity in the literature suggests, and that required sample size depends jointly on the number of predictors, the anticipated effect sizes, and overall outcome prevalence, not on EPV as a single number. The practical takeaway for a methods section: report your EPV, but don’t treat 10 as a hard pass/fail gate on its own — and if EPV is low, say so as a limitation and consider a formal sample-size calculation or a penalized-estimation approach (see separation, below) rather than relying on the rule of thumb alone.

Influential points

A small number of observations can disproportionately affect the fitted coefficients. Standard diagnostics carry over from linear regression in adapted form — leverage, and deviance or Pearson residuals in place of ordinary residuals, along with an analogue of Cook’s distance for generalized linear models. As with linear regression, the correct response to a flagged influential point is to investigate it, not to delete it by default.

Complete and quasi-complete separation

This is a failure mode specific to logistic (and other binary) regression, with no linear-regression analogue. It occurs when a predictor, or a combination of predictors, perfectly (complete separation) or almost perfectly (quasi-complete separation) predicts the outcome — for example, every observation with X above some threshold has the event, and every observation below it doesn’t. Under standard maximum likelihood, the algorithm tries to push the corresponding coefficient toward infinity to fit that perfect pattern, and typically fails to converge, or converges to an implausibly large coefficient with an equally enormous standard error.

How to spot it: a coefficient with an implausibly large magnitude and standard error, a Wald test that looks non-significant despite an enormous coefficient (the Wald test itself becomes unreliable under separation), or a fitting algorithm that fails to converge or throws a separation warning.

The standard fix: Firth’s penalized likelihood. Introduced by David Firth in 1993, Firth logistic regression adds a small bias-correction penalty to the likelihood function. That penalty keeps the log-likelihood from having its maximum pushed out to infinity even under complete or quasi-complete separation, producing finite, estimable coefficients where standard maximum likelihood cannot converge. It is now the standard recommended approach for separation, and is also useful more generally in small-sample or rare-event logistic regression, though it comes with its own trade-off: the penalty biases predicted probabilities somewhat toward 0.5, which is worth disclosing if predicted probabilities themselves (not just the coefficients) are the object of interest.

Evaluating model performance

Fit statistics (pseudo-R², the LR test) describe how well the model explains the data it was fitted on. Performance metrics describe how well it classifies or predicts — a related but distinct question, and the one that matters most for a model intended for prediction or screening rather than pure inference.

Confusion matrix, sensitivity, and specificity

Applying a probability cutoff (commonly, but not necessarily, 0.5) to the model’s predicted probabilities turns them into predicted classes, which can be cross-tabulated against actual outcomes in a confusion matrix. From that table: sensitivity (the proportion of true events correctly predicted) and specificity (the proportion of true non-events correctly predicted) are the standard pair of metrics, and both depend on the chosen cutoff — changing the cutoff trades one against the other. See the CASRAI sensitivity vs. specificity guide for the full derivation, including positive/negative predictive value and how prevalence affects them.

ROC curve and AUC

The receiver operating characteristic (ROC) curve plots sensitivity against 1 − specificity across every possible cutoff, showing the full trade-off rather than a single-cutoff snapshot. The area under that curve (AUC, also called the c-statistic in this context) summarizes discrimination as a single number between 0.5 (no better than chance) and 1.0 (perfect discrimination), and has a direct probabilistic interpretation: it’s the probability that a randomly chosen event case is assigned a higher predicted probability by the model than a randomly chosen non-event case. AUC is a discrimination metric, not a calibration metric — a model can discriminate well while still producing systematically miscalibrated predicted probabilities, which is why the two are checked separately.

Calibration: Hosmer-Lemeshow and its criticisms

Calibration asks a different question from discrimination: when the model predicts a 20% probability, does the event actually occur in roughly 20% of such cases? The Hosmer-Lemeshow test is the historically standard formal test — it groups observations into (commonly ten) bins by predicted probability and compares observed versus expected event counts within each bin via a chi-square statistic. It has well-documented limitations that are now widely discussed in the methodological literature: the result is sensitive to essentially arbitrary choices (the number of bins, how ties are handled), it has low power to detect real miscalibration in small samples while flagging trivial deviations as significant in large samples, and a non-significant result is often, incorrectly, read as proof of good calibration rather than simply an absence of evidence against it. For these reasons, a calibration plot — observed versus predicted probability, typically smoothed, across the full range of predicted risk — is now generally preferred as the primary calibration check, with the Hosmer-Lemeshow statistic reported as a supplementary number at most, not the sole calibration evidence.

Variants of the logit model

The binary logit model generalizes to several related designs, each solving a different structural problem:

Multinomial logistic regression

Used when the outcome has three or more unordered categories (for example, choosing among distinct career-track outcomes). It models the log-odds of each category relative to a chosen reference category, effectively fitting a set of binary logit comparisons simultaneously.

Ordinal logistic regression and the proportional-odds assumption

Used when the outcome has three or more ordered categories (a Likert-type scale, a staged severity rating). The most common form, the proportional-odds (cumulative logit) model, assumes the effect of each predictor on the odds of being in a higher versus lower category is constant across every category threshold — the “proportional odds assumption.” This is directly testable (commonly via a Brant test or an equivalent likelihood-ratio comparison against a model that relaxes it); if it fails, a partial proportional-odds model or multinomial regression treating the categories as unordered are the usual fallbacks.

Conditional logistic regression for matched data

Used for matched case-control designs (each case matched to one or more controls on age, sex, site, or similar). It conditions the likelihood on each matched set, which removes the matching variables’ effects from direct estimation entirely rather than requiring them to be modeled as ordinary predictors, and is the standard analysis for a 1:1 or 1:many matched case-control study.

Mixed-effects (multilevel) logistic regression

Used for clustered binary data — repeated binary measurements on the same subject, or subjects nested within a higher-level unit like a clinic, site, or lab — where the independence assumption of ordinary logistic regression is violated by design. A mixed-effects (generalized linear mixed) logit model adds random effects to account for the correlation within clusters, alongside the usual fixed-effect predictors. See the CASRAI guide to cluster-randomized trials, ICC, and design effect for the closely related issue of within-cluster correlation in a trial context.

How to report logistic regression results

A results section a methods reviewer will accept without a query generally includes, for logistic regression specifically:

  1. Odds ratios with confidence intervals, not raw log-odds coefficients, as the primary reported effect size — the log-odds scale is for the fitting stage, not the results table. See the CASRAI confidence interval guide for what that interval represents.
  2. The reference category stated explicitly for every categorical predictor (and for the outcome itself), since an OR is meaningless without knowing what it’s relative to.
  3. Events and total sample size for the model — both numbers, not just N, since the events count (not N) is what drives model stability (see the EPV discussion above).
  4. Pre-specification of the model. Which predictors were included and why, decided before looking at results, distinguished clearly from any exploratory or stepwise-selected model reported separately — data-driven variable selection followed by reporting only the “significant” predictors as if pre-specified is a recognized form of results-dependent reporting bias.
  5. Overall model fit — the likelihood-ratio test and, as supplementary information, a pseudo-R².
  6. Assumption and diagnostic checks, briefly stated — linearity in the logit, multicollinearity, separation, and EPV are the logit-specific set; see the sections above.
  7. Discrimination and, where predictive use is the goal, calibration — AUC at minimum, with a calibration plot if the model is intended to generate individual risk predictions rather than purely to test an association.

As with any regression on observational data, avoid causal language (“X increases the odds of Y”) unless the study design supports a causal interpretation — see the CASRAI causal analysis guide for what does and doesn’t license that language, and the chi-square test guide for the simpler bivariate test that often precedes fitting a full logit model on categorical predictors.

Frequently asked questions

Is logistic regression the same as the logit model?

Yes — “logistic regression” and “the logit model” refer to the same technique. “Logit” specifically names the log-odds transformation (the link function) the model uses; “logistic regression” names the overall modeling approach built on that link. Both terms are used interchangeably in the methodological literature.

Can I use logistic regression to predict a continuous outcome?

No — logistic regression is built specifically for a categorical (binary, or via its variants, multi-category or ordered) outcome. For a continuous outcome, use linear regression or another continuous-outcome model; see the CASRAI regression analysis guide for the full decision table by outcome type.

What sample size do I need for logistic regression?

There’s no single fixed answer — it depends on the number of predictors, the anticipated effect sizes, and critically, the number of events in the less common outcome category, not the total N alone. The traditional benchmark is roughly 10 events per predictor variable (EPV), though that specific threshold has been substantially qualified by later research; see the events-per-variable section above.

Why did my model fail to converge?

The most common cause is complete or quasi-complete separation — a predictor (or combination) perfectly or near-perfectly predicting the outcome. Check for implausibly large coefficients and standard errors, and consider Firth’s penalized-likelihood logistic regression as the standard fix; see the separation section above.

What’s the difference between an odds ratio and a relative risk?

An odds ratio compares odds (p / (1−p)) between two groups; a relative risk (risk ratio) compares probabilities directly. The two are similar only when the outcome is rare in the reference group; as outcome prevalence rises, the odds ratio increasingly overstates the risk ratio — see the worked numeric example above.

Related CASRAI resources

  • Research Methods pillar hub — the full quantitative-analysis, sampling, and study-design collection this guide belongs to.
  • Regression analysis — how to choose among the full family of regression models by outcome type, and the assumptions shared with linear regression.
  • Sensitivity vs. specificity — the classification-performance metrics used to evaluate a fitted logit model as a predictive or screening tool.
  • Causal analysis — what licenses causal language from a regression coefficient, and what doesn’t.
  • Chi-square test — the bivariate categorical-association test that often precedes fitting a full logit model.
  • Confidence interval, explained — the interval-estimation concept behind every odds-ratio CI reported alongside a logistic coefficient.
  • Cluster-randomized trials, ICC, and design effect — the within-cluster correlation problem that mixed-effects logistic regression is built to handle.
  • Prevalence vs. incidence — the baseline-rate concepts behind the odds-ratio/risk-ratio divergence worked example above.
  • Null hypothesis, explained — what the significance test on each logistic coefficient (and the likelihood-ratio test) is actually testing.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →