Tutorials › Generalized Linear Models › A Reporting Workflow for Bias-Reduced Logistic Models

Bias Reduction and Separation · Tutorial 939 of 981

A Reporting Workflow for Bias-Reduced Logistic Models

Learn to report a Firth logistic regression transparently, from checking separation to presenting effect estimates, uncertainty, and the comparison with ordinary maximum likelihood.

Advanced 11 min read

What You'll Learn

  • Describe outcome and predictor coding clearly before reporting a bias-reduced fit
  • Distinguish complete and quasi-complete separation from sparse data alone
  • Explain why Firth estimation was used and what it changes
  • Calculate coefficient and odds-ratio estimates in a separated two-group example
  • Construct and label approximate Wald intervals from the fitted information
  • Compare Firth estimates with ordinary likelihood without reporting a nonexistent finite MLE

Why a Reporting Workflow Matters

A Firth logistic regression report should make clear not only what was estimated, but why the bias-reduced method was used and how uncertainty was quantified. Sparse data do not by themselves establish separation, and an odds ratio without its coding, interval method, or model specification is difficult to interpret. A transparent report connects the data structure, the separation assessment, the estimation method, and the reported quantities.

The workflow below uses a binary predictor so that the checks and calculations can be followed directly. The same reporting principles apply to more general logistic models, though separation in a multivariable design requires assessing the full predictor space; inspecting separate two-way tables is not enough to rule it out.

Specify the Model and Check Separation

Definition: In logistic regression, the event probability for observation \(i\) is \(P(Y_i=1\mid x_i)=p_i\), with \(\operatorname{logit}(p_i)=\log\{p_i/(1-p_i)\}=x_i^\top\beta\). Complete separation occurs when some coefficient direction strictly classifies every event above and every non-event below the decision boundary. Quasi-complete separation occurs when a direction weakly separates the outcomes, with equality for some observations and strict separation for others.

A report should state which outcome is coded as 1, how predictors are coded, and what population or sample was analyzed. For a binary predictor \(x\), state which group is \(x=0\) and which is \(x=1\). The slope \(\beta_1\) then represents the log odds ratio comparing \(x=1\) with \(x=0\); reversing the event or group coding changes the signs and reciprocates the odds ratio.

For a simple binary predictor, a two-by-two table makes a useful initial diagnostic: a group with no events or no non-events is a warning that the ordinary logistic estimate may diverge. In a multivariable model, however, separation can arise from a linear combination of predictors even when no single predictor table shows an empty cell. The report should name the actual check used, such as a separation diagnostic applied to the fitted design, rather than infer “no separation” from sparse tables alone.

Worked Example: Reading a Separation Check

Suppose \(x=0\) has 0 events among 10 observations, while \(x=1\) has 8 events among 8 observations. The outcome is coded \(Y=1\) for the event. The two groups have no overlap in their observed outcomes: all observations at \(x=0\) are non-events and all at \(x=1\) are events.

In the model \(\operatorname{logit}(p_i)=\beta_0+\beta_1x_i\), consider \(\beta_0=-t\) and \(\beta_1=2t\), for \(t>0\). The two fitted logits are \(-t\) for \(x=0\) and \(t\) for \(x=1\). Thus, as \(t\) increases, the fitted event probabilities approach 0 and 1 respectively, matching every observed outcome more closely.

This is complete separation: the ordinary likelihood improves toward its supremum as the coefficients diverge, rather than attaining a maximum at finite coefficients. A report should therefore say that complete separation was detected, identify the pattern that revealed it, and not describe a software stopping value as a finite maximum-likelihood estimate.

Why Use Firth Estimation?

Firth estimation maximizes the log-likelihood with a Jeffreys-information penalty. In logistic regression this yields adjusted score equations and can produce finite estimates in settings where ordinary maximum likelihood does not. It is used to reduce first-order small-sample bias; it does not make sparse data uninformative, guarantee narrow intervals, or turn an approximate interval into an exact one.

For a two-group model with an intercept and a binary predictor, the Firth calculation has a particularly clear form. Let \(y_j\) be the number of events and \(n_j\) the total in group \(j\), for \(j=0,1\). The model has one logit \(\eta_j\) in each group. Its ordinary binomial log-likelihood, omitting constants not depending on the parameters, is

$$ \ell(\eta_0,\eta_1)=\sum_{j=0}^1\{y_j\eta_j-n_j\log(1+\exp(\eta_j))\}. $$

The expected information in the group-logit parameterization is diagonal, with entries \(n_jp_j(1-p_j)\). Consequently the Jeffreys penalty is one half the log determinant of that information, up to terms constant in the parameters. This gives the following direct derivation.

1
Write the penalized likelihood.
Since \(p_j=\exp(\eta_j)/(1+\exp(\eta_j))\), the parameter-dependent penalty for group \(j\) is \(\tfrac12\log\{p_j(1-p_j)\}\).
2
Differentiate with respect to the group logit.
The derivative of \(\ell\) is \(y_j-n_jp_j\), and the derivative of \(\log\{p_j(1-p_j)\}\) with respect to \(\eta_j\) is \(1-2p_j\). Setting the penalized derivative to zero gives \(y_j-n_jp_j+\tfrac12(1-2p_j)=0\).
3
Solve for the fitted probability.
Rearranging gives \(y_j+\tfrac12=(n_j+1)p_j\), hence \(\hat p_j=(y_j+\tfrac12)/(n_j+1)\). Its fitted odds are \((y_j+\tfrac12)/(n_j-y_j+\tfrac12)\).
Result: In this saturated two-group logistic model, Firth estimation is equivalent to adding one half to the event and non-event counts in each group when calculating the fitted group odds. This is a model-specific derivation, not a license to add one half to arbitrary cells in a general multivariable analysis.

Worked Reporting Example: Complete Separation

Worked Example: From Counts to a Reported Odds Ratio

Use the preceding data: group \(x=0\) has 0 events among 10 people; group \(x=1\) has 8 events among 8 people. The model is \(\operatorname{logit}(p_i)=\beta_0+\beta_1x_i\), with the event coded 1. The separation check identifies complete separation, so ordinary maximum likelihood has no finite coefficient estimate.

Firth point estimates. The adjusted group odds are \((0+0.5)/(10-0+0.5)=1/21\) for \(x=0\), and \((8+0.5)/(8-8+0.5)=17\) for \(x=1\). Therefore the fitted group logits are \(\log(1/21)=-3.045\) and \(\log(17)=2.833\). The intercept is the first logit, \(\hat\beta_0=-3.045\); the slope is their difference:

$$ \hat\beta_1=\log(17)-\log(1/21)=\log(357)=5.878, \qquad \exp(\hat\beta_1)=357. $$

Thus the estimated odds of the event are 357 times as high for \(x=1\) as for \(x=0\), under this model. The large estimate is finite, but it should not be mistaken for a precise estimate.

Approximate Wald uncertainty. At the Firth fitted probabilities, \(\hat p_0=0.5/11=1/22\) and \(\hat p_1=8.5/9=17/18\). The ordinary expected-information contributions for the two group logits are

$$ I_0=10\frac{1}{22}\frac{21}{22}=\frac{105}{242}, \qquad I_1=8\frac{17}{18}\frac{1}{18}=\frac{34}{81}. $$

Because the slope is the difference between the two group logits, its estimated variance from the inverse information is \(1/I_0+1/I_1=242/105+81/34=4.687\), giving \(SE(\hat\beta_1)=\sqrt{4.687}=2.165\). A 95% Wald interval is \(5.878\pm1.96(2.165)=[1.635,10.121]\) on the log-odds-ratio scale. Exponentiating the endpoints gives an approximate odds-ratio interval of \([5.13,24{,}900]\). The interval is very wide, communicating substantial uncertainty despite the finite Firth estimate.

Ordinary-likelihood comparison. Along \(\beta_0=-t,\ \beta_1=2t\), the group probabilities approach 0 and 1 as \(t\) tends to infinity. The likelihood approaches its supremum, but no finite coefficient pair attains it. Accordingly, a responsible comparison states that the ordinary maximum-likelihood estimate is not finite under complete separation; it does not invent a finite ordinary estimate or report a numerical difference from one.

What to Put in the Results

A compact report should preserve enough detail for a reader to understand the analysis and reproduce its interpretation. For the example above, an appropriate statement is:

Example report: “The event was coded as 1 and the binary predictor compared \(x=1\) with \(x=0\). Complete separation was detected: there were 0 events among 10 observations at \(x=0\) and 8 among 8 at \(x=1\). We therefore used Firth bias-reduced logistic regression. The estimated log odds ratio was 5.878 (odds ratio 357); the 95% Wald interval for the odds ratio was approximately 5.13 to 24,900. Ordinary maximum likelihood had no finite coefficient estimate under this separation pattern.”

The example explicitly calls the interval a Wald interval. A Wald interval uses the estimate and its estimated standard error with a normal approximation. A profile penalized likelihood interval is a different procedure; reports should name the method actually used and should not call one method by the other’s name. Whatever method is chosen, provide the scale, confidence level, and whether the interval is for a coefficient or an exponentiated coefficient.

For a larger model, also report the predictor terms, any interactions or transformations, the estimation method, and the uncertainty procedure. Where relevant, give the analyzed sample size and explain exclusions or missing data handling. A statement such as “Firth regression was used because the data were sparse” is weaker than naming the separation assessment and its finding. Sparse data can motivate careful analysis, but are not themselves proof of separation.

A Nonseparated Comparison

Worked Example: Reporting a Finite Ordinary Fit Alongside Firth

Consider a different two-group data set: \(x=0\) has 2 events among 10 observations, and \(x=1\) has 4 among 10. Both groups include events and non-events, so this table does not show separation. The ordinary odds ratio is \((4/6)/(2/8)=8/3=2.667\).

For the Firth fit, the adjusted odds are \((2.5)/(8.5)=5/17\) at \(x=0\) and \((4.5)/(6.5)=9/13\) at \(x=1\). Hence

$$ \widehat{OR}_{Firth}=\frac{9/13}{5/17}=\frac{153}{65}=2.354, \qquad \hat\beta_{1,Firth}=\log(153/65)=0.856. $$

The fitted probabilities are \(5/22\) and \(9/22\). The information contributions are \(10(5/22)(17/22)=425/242\) and \(10(9/22)(13/22)=585/242\). Thus the slope variance is \(242/425+242/585=0.983\), and its standard error is \(0.991\). The 95% Wald interval on the log scale is \(0.856\pm1.96(0.991)=[-1.087,2.799]\); exponentiation gives an odds-ratio interval of approximately \([0.337,16.43]\).

A concise comparison here can give both point estimates, 2.667 for ordinary maximum likelihood and 2.354 for Firth, while labeling the interval as the Firth Wald interval. The values differ, but this one example does not establish a universal direction or size of difference. The interval also shows that the data are compatible with a broad range of odds ratios.

Common Reporting Mistakes

  • Calling any sparse table separated. Sparse counts warrant attention, but separation is a property of the outcomes and model design. State the check and its result.
  • Reporting an algorithm’s stopping value as the MLE. Under separation, a finite value returned at an iteration limit may be a numerical approximation along a diverging path, not a finite maximum-likelihood estimate.
  • Omitting event and reference coding. The sign and direction of a coefficient cannot be interpreted without knowing which outcome and predictor level are the reference.
  • Presenting a huge odds ratio without uncertainty. A finite Firth estimate can still be highly uncertain. Report an interval and name its method.
  • Describing Firth estimation as eliminating all bias. It is a bias-reduction method, not a guarantee of unbiased estimates or strong information in a small sample.
Key takeaway: A clear report links the separation assessment to the choice of Firth estimation, then gives the model coding, coefficient or odds ratio, a specifically identified uncertainty interval, and an honest ordinary-likelihood comparison. Finite estimates solve one problem; they do not remove the need to communicate uncertainty.

Check Your Understanding

Use the reporting principles above to answer the following.

  1. In a binary-predictor model, what pattern in a two-by-two table is a warning sign for separation, and why is that check not sufficient for a general multivariable model?
  2. For a Firth two-group fit with \(y=0\) events among \(n=6\) observations, calculate the adjusted group odds using the derived result.
  3. Why should a report distinguish a finite Firth estimate from an ordinary maximum-likelihood estimate under complete separation?
  4. What information is needed to interpret the direction of a reported logistic-regression odds ratio?
  5. Explain why a wide Wald interval can remain appropriate to report even when the Firth point estimate is finite.
Clinical Biostats