Why use Firth estimation?
In a logistic propensity model, the likelihood can keep improving as one or more coefficients grow without bound. This happens under complete or quasi-complete separation: covariate values, or a linear combination of them, distinguish treated from untreated units. Ordinary maximum likelihood then does not provide finite coefficient estimates, and the corresponding fitted propensity scores can approach zero or one. A penalty is one way to regularize estimation; Firth estimation uses a particular penalty motivated by reducing the first-order bias of maximum likelihood estimates.
Write \(Z_i=1\) for treatment and \(Z_i=0\) otherwise, let \(x_i\) be the covariate vector including an intercept, and let \(\beta\) be the coefficient vector. The logistic model specifies \(p_i=P(Z_i=1\mid x_i)=\operatorname{logit}^{-1}(x_i^\top\beta)\), where \(\operatorname{logit}^{-1}(u)=1/(1+\exp(-u))\). The fitted propensity score is \(\hat e_i=\operatorname{logit}^{-1}(x_i^\top\hat\beta)\). The usual Bernoulli log-likelihood is \(\ell(\beta)=\sum_i\{Z_i\log(p_i)+(1-Z_i)\log(1-p_i)\}\).
The added term is one-half the log determinant of the information matrix, not a fixed ridge penalty on the coefficients. It is also the log of the square root of the Jeffreys-information factor, which gives the penalty its invariance motivation under smooth reparameterizations. The important practical feature here is that it changes the score equations most strongly where the data provide little information about a coefficient.
From the penalty to the adjusted score
The ordinary logistic score is \(U(\beta)=X^\top(Z-p)\), where \(p\) is the vector of fitted probabilities. Differentiating the Firth penalty gives an additional term that depends on each observation’s leverage in the weighted design. Define the weighted hat matrix as \(H=W^{1/2}X(X^\top W X)^{-1}X^\top W^{1/2}\), and let \(h_i=H_{ii}\).
To see the last equality, note that \(\partial w_i/\partial\beta_j=w_i(1-2p_i)x_{ij}\). Since \(I=X^\top W X\), its derivative is \(X^\top\operatorname{diag}\{w_i(1-2p_i)x_{ij}\}X\). Substitution into the trace expression gives one contribution per observation, with \(w_i x_i^\top I^{-1}x_i=h_i\). Thus the Firth estimating equation is the ordinary score plus this adjustment:
where \(\odot\) denotes elementwise multiplication and \(h\) is the vector of diagonal leverages. This derivation explains why the method is not equivalent to simply adding a constant to every outcome: the adjustment depends on the fitted probabilities and on the design. In regular, identifiable models, this adjustment removes the leading, order-\(1/n\) bias term of the maximum likelihood coefficient estimator. It does not guarantee that all finite-sample bias disappears.
Worked examples
Worked Example: Finite scores under complete separation
Suppose a hypothetical sample has eight units and a binary covariate \(x\). Among the four units with \(x=0\), none received treatment; among the four with \(x=1\), all four received treatment. The logistic model has an intercept and \(x\), so each covariate group has its own fitted probability. Treatment is completely separated by \(x\).
Under ordinary maximum likelihood, the likelihood increases as the fitted probability for \(x=0\) approaches zero and that for \(x=1\) approaches one. The required intercept and slope diverge; there is no finite maximum likelihood coefficient pair.
For this saturated two-group model, the Firth likelihood separates into one contribution for each group. If group \(j\) has \(y_j\) treated units out of \(m_j\), its penalized log-likelihood, up to constants, is \(y_j\log(p_j)+(m_j-y_j)\log(1-p_j)+\frac{1}{2}\log\{p_j(1-p_j)\}\). Differentiating with respect to \(p_j\) and setting the derivative to zero gives \((y_j+\frac{1}{2})/p_j-(m_j-y_j+\frac{1}{2})/(1-p_j)=0\). Solving yields \(\hat p_{F,j}=(y_j+0.5)/(m_j+1)\).
For \(x=0\), this is \((0+0.5)/(4+1)=0.1000\). For \(x=1\), it is \((4+0.5)/(4+1)=0.9000\). The fitted intercept is \(\operatorname{logit}(0.1)=-2.197\), and the slope is \(\operatorname{logit}(0.9)-\operatorname{logit}(0.1)=4.394\). Both coefficients are finite. The Firth scores avoid exact zero and one in these observed groups, but are still quite different across the groups.
Worked Example: Comparing Firth and maximum likelihood scores
Consider another hypothetical sample with five units in each of two covariate groups. In the \(x=0\) group, one unit is treated; in the \(x=1\) group, four are treated. With the same intercept-and-binary-covariate model, both groups contain treated and untreated units, so the maximum likelihood estimates are finite.
The maximum likelihood fitted probabilities equal the group proportions: \(\hat p_{ML,0}=1/5=0.2000\) and \(\hat p_{ML,1}=4/5=0.8000\). For this saturated model the Firth group estimates use the same formula as above. Thus \(\hat p_{F,0}=(1+0.5)/(5+1)=0.2500\), and \(\hat p_{F,1}=(4+0.5)/(5+1)=0.7500\).
The Firth coefficients are \(\hat\beta_{0,F}=\operatorname{logit}(0.25)=-1.099\) and \(\hat\beta_{1,F}=\operatorname{logit}(0.75)-\operatorname{logit}(0.25)=2.197\). The maximum likelihood coefficients are \(\hat\beta_{0,ML}=\operatorname{logit}(0.20)=-1.386\) and \(\hat\beta_{1,ML}=\operatorname{logit}(0.80)-\operatorname{logit}(0.20)=2.773\). Here Firth estimation moves each group score toward 0.5, reducing the fitted contrast. These are estimated treatment probabilities, not evidence that the covariate groups are causally different.
Worked Example: Intercept-only rare treatment
Suppose a hypothetical intercept-only model has one treated unit among ten. The maximum likelihood estimate is the observed proportion, \(1/10=0.1000\). For an intercept-only model, \(h_i=1/n\), and the Firth estimate can be found directly from the adjusted score. Setting its intercept score to zero gives \(y-np+n(1/n)(1/2-p)=0\), so \(p=(y+0.5)/(n+1)\).
Substituting \(y=1\) and \(n=10\) gives \(\hat p_F=(1+0.5)/(10+1)=1.5/11=0.1364\). The Firth estimate is finite and slightly larger than the observed treatment proportion. The adjustment is consequential here because the sample contains little information about the treatment probability; it does not mean that Firth estimation has recovered a known population probability.
When the method helps—and what it does not fix
Under separation, the ordinary likelihood has no finite maximizer, while the Jeffreys-information penalty can yield finite estimates for a full-rank logistic design with the usual finite covariate values. The separation example shows the mechanism: as a group probability tends to zero or one, its information contribution tends to zero, and the log-determinant penalty discourages that boundary. In the common logistic setting, Firth estimation is a standard bias-reducing remedy for separation.
The information matrix must still be nonsingular for the penalty and adjusted score to be defined. Redundant columns, an unidentified model, or an empty outcome class can cause problems that the penalty does not repair. Firth estimation also does not select a propensity-model specification, correct omitted covariates, or ensure that estimated scores will be appropriate for a later analysis. Finite estimates are not, by themselves, evidence of adequate covariate overlap or successful adjustment.
Ordinary maximum likelihood is suitable when it exists and is not unduly unstable; it is also the unpenalized reference point. Ridge and lasso instead penalize coefficient magnitude, with the amount of shrinkage controlled by a tuning parameter; lasso can also set coefficients to zero. Firth’s penalty is determined by the information matrix and targets first-order bias reduction, rather than imposing a chosen coefficient norm. Each approach has different goals, and none substitutes for checking the model and the observed data.
Look for nonconvergence, very large coefficient estimates or standard errors, and fitted probabilities numerically near zero or one. These are warning signs, not standalone proofs of separation.
Identify covariate patterns with only treated or only untreated units, and check that the model matrix is full rank. Sparse patterns can produce unstable estimates even without complete separation.
When maximum likelihood fails or is unstable, fit Firth estimation and compare its coefficients and fitted scores with the ordinary fit if that fit exists. Large differences indicate sensitivity to the estimation method.
Report the estimation method and assess the resulting scores in the context of the intended analysis. Finite scores alone do not validate the propensity model.
Common mistake
A common mistake is to interpret finite Firth estimates as proof that the separation problem, or the broader modeling problem, has been solved. Firth estimation addresses the existence and first-order bias of logistic coefficient estimates; it does not create information where covariate patterns are absent. A second mistake is to describe the method as simply adding 0.5 to every observation. The half-count formula applies to the saturated group examples above; in a general design the adjustment uses the observation-specific leverage \(h_i\) and fitted probability \(p_i\).
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In the complete-separation example, what are the Firth fitted probabilities for the group with zero treated units out of six and the group with six treated units out of six?
- For the intercept-only model with \(y\) treated units among \(n\), derive the Firth estimate from the adjusted score equation.
- Why can ordinary maximum likelihood fail to give finite coefficients under separation?
- Does a finite Firth estimate establish that the model is full rank and that the propensity scores are suitable for the intended analysis? Explain.
Solutions. (1) The group estimates are \((0+0.5)/(6+1)=0.07143\) and \((6+0.5)/(6+1)=0.9286\). (2) With \(h_i=1/n\), the intercept equation is \(y-np+n(1/n)(0.5-p)=0\). Rearranging gives \(y+0.5=(n+1)p\), hence \(\hat p_F=(y+0.5)/(n+1)\). (3) Along a separating direction, the likelihood can improve as coefficients grow in magnitude and probabilities approach zero or one, so the maximum may occur only in the limit. (4) No. The information matrix still needs to be nonsingular, and finite estimates do not establish that the model is well specified or the scores suitable.