Ask Mallard
Analysis method

Log-binomial regression

4 min read

Log-binomial regression models a binary risk with a log link, so exponentiating an exposure coefficient gives a risk ratio.

Fit

When to use it, and when not to

Use it when

  • You need a risk ratio for a binary outcome with recorded baseline adjustments.
  • A binomial model with a log link fits within the probability limits.

Not when

Before you start

What you need

Decide these first
  1. Binary outcome and follow-up windowoutcomeTypeCode the event as one and its absence as zero. Record whether everyone has complete follow-up.
  2. Exposure contrast and baseline covariatessummaryMeasureName the risk ratio of interest and choose adjustments before seeing the result.
  3. Independent people or defined clustersclusteredState the sampling unit. Missing outcomes need an assumption and a plan.
It rests on these
  1. The log risk follows the specified predictor model.How to check: Check continuous terms and interactions. A common exposure coefficient assumes the same risk ratio across covariate patterns.
  2. The model keeps fitted risks within zero and one.How to check: Inspect fitted probabilities, boundary estimates and convergence diagnostics. A boundary fit needs careful inference.
  3. The model-based interval assumes independent binary observations.How to check: Shared sites or repeated outcomes need an appropriate clustered method. A binomial likelihood alone does not handle dependence.
  4. A causal claim needs adequate control of baseline confounders.How to check: Choose factors using subject knowledge. Adjustment alone cannot remove bias from unrecorded causes.
  5. The analysis matches the stated missing-data assumption.How to check: Missing at random means gaps depend on recorded factors. Account for those factors and assess plausible departures.

Plain language

How it works

A binomial likelihood describes zero-or-one outcomes. The log link makes the log risk a sum of predictor terms. Exponentiating the exposure coefficient gives a risk ratio at fixed covariate values. A cross-sectional study instead estimates a prevalence ratio.

The method at a glance
Log-binomial regression: Binary outcomes and baseline factors. Then Binomial log-link fit within probability limits. Then Converged risk ratio and interval.Log-binomial regressionBinary outcomes andbaseline factorsBinomial log-link fitwithin probability limitsConverged risk ratio andintervalCheck convergence and the probability boundary before reporting a coefficient or interval.
Conceptual diagram. It shows the structure of the idea, not data from any study.
Inference and checks

Unlike the usual logit link, the log link restricts the allowed coefficients: fitted risks cannot exceed one. A fitting algorithm may stop at that boundary or fail before reaching a valid maximum. Williamson and colleagues show that failed convergence need not mean no finite maximum exists. Check coding, scaling and feasible starting values. Use a constrained optimizer if needed. If fitting still fails, document a switch to modified Poisson regression with robust errors.

Worked example

A worked example

Invented for illustration
Setting
A complete cohort has two baseline severity strata. Each stratum has 100 exposed and 100 unexposed people, with one binary outcome per person.
Question
What risk ratio does a converged log-binomial fit estimate?
Approach
Low severity: exposed 20/100, unexposed 30/100. High severity: exposed 40/100, unexposed 70/100. Fit intercept, exposure and severity, without interaction. Maximize the binomial likelihood with a log link. Use a model-based log-scale Wald interval.
Result
The adjusted risk ratio is 0.592, with 95% model-based Wald interval 0.467 to 0.750. The log coefficient is -0.525; its standard error is 0.121.
What it means
The fitted exposed risk is 0.185 at low severity and 0.411 at high severity. The estimated risk is 40.8% lower at either severity level.

In practice

Recent studies PubMed search · not vetted

Searching PubMed…

Watch out

Common mistakes

The one to remember

The log link must keep every fitted probability within zero and one. A convergence warning is not a usable estimate. Check the likelihood boundary and use a suitable constrained fit or a stated alternative; never silently report the last iteration.

  • Reporting the last iteration after a convergence warning.Instead: Check data coding, feasible starting values and the likelihood boundary. Use constrained fitting or a documented alternative if needed.
  • Discarding covariates until the software converges.Instead: Preserve the scientific adjustment set. Reconsider scaling and model form; seek help with a constrained optimizer.
  • Using an ordinary symmetric interval on the risk-ratio scale.Instead: Use an appropriate likelihood interval or a log-scale Wald interval, exponentiating both limits. Boundary estimates need specialist care.

Inside Mallard

How Mallard uses this

Mallard offers this lesson in Learn search and the Atlas. Plans do not link to it automatically.

No Mallard code example points to this page.
Atlas node analysis.log_binomial, the id a plan cue records.

Related Learn pages

Related designs and methods

Evidence

Sources & further reading

  1. Log-binomial models: exploring failed convergence (opens in a new tab) · Emerg Themes Epidemiol · doi 10.1186/1742-7622-10-14
  2. A comparison of two methods for estimating prevalence ratios (opens in a new tab) · BMC Med Res Methodol · doi 10.1186/1471-2288-8-9
Prepared with AI assistance. PubMed records checked by title, authors, year and available DOI on 2026-11-07. Record verified; confirm it supports this use. No independent professional approval is claimed. Williamson and colleagues examine failed convergence, including a finite likelihood maximum missed by software. Petersen and Deddens study log-binomial fitting and inference, including probability constraints.
Last source review: 2026-11-07
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.