Tutorials › Generalized Linear Models › Feasibility Constraints In Log-Binomial Models

Alternative Binary Links · Tutorial 376 of 981

Feasibility Constraints In Log-Binomial Models

Learn how to impose and interpret the feasibility constraints that keep log-binomial fitted risks at or below one, including when a fitted risk reaches the boundary.

Intermediate 10 min read

What You'll Learn

  • Derive the linear inequalities required for valid log-binomial fitted probabilities
  • Characterize the feasible coefficient set for a finite design
  • Distinguish constraints on observed covariate values from constraints on a prediction range
  • Identify when a fitted risk equals one and how that boundary affects the likelihood
  • Diagnose why an otherwise plausible log-risk model can predict a probability above one

Why Feasibility Needs Attention

A binary regression model must assign a probability between zero and one to every covariate value at which it is used. With the log link, the model writes the logarithm of the risk as a linear predictor. Exponentiating that predictor guarantees a positive value, but it does not guarantee a value at most one. A positive linear predictor produces a number greater than one, which cannot be a probability.

The restriction is simple to state but important in practice: at every relevant covariate value, the linear predictor must be nonpositive. This tutorial develops that condition for a finite design, explains its geometry, and distinguishes valid fitted risks from the separate question of whether a likelihood estimate lies on the boundary.

Definition: For binary observations with fixed covariate vectors \(x_1,\ldots,x_n\), a log-binomial model specifies \(p_i=E[Y_i\mid x_i]=\exp(x_i^\mathsf{T}\beta)\), where \(Y_i\) is Bernoulli and \(\beta\) is a coefficient vector. A coefficient vector is feasible for this design if every \(p_i\) is a valid probability.

The Feasible Coefficient Set

For finite coefficients, the exponential is strictly positive. Thus the lower probability bound is automatic, and the upper bound is the one that imposes a constraint. For each observed covariate vector, the equivalences are

$$ p_i\leq 1 \quad\Longleftrightarrow\quad \exp(x_i^\mathsf{T}\beta)\leq 1 \quad\Longleftrightarrow\quad x_i^\mathsf{T}\beta\leq 0. $$

Collecting these inequalities gives the design-specific feasible set. If \(X\) is the matrix whose \(i\)th row is \(x_i^\mathsf{T}\), then

$$ \mathcal{C}(X)=\{\beta\in\mathbb{R}^p:X\beta\leq 0\}, $$

where the vector inequality applies row by row. This condition is about the covariate values under consideration. It does not automatically guarantee valid predictions at covariate values outside that set.

Theorem: For any finite design matrix \(X\), the coefficient vectors giving valid log-binomial means at every observed design point are exactly \(\mathcal{C}(X)\). This set is a nonempty, closed, convex polyhedron; it may be unbounded.

Proof. The row-wise equivalence above shows that all fitted means are at most one if and only if \(X\beta\leq 0\). They are already strictly positive for finite \(\beta\), so this is precisely the set of valid fitted means. The set is the intersection of finitely many closed half-spaces, one for each inequality \(x_i^\mathsf{T}\beta\leq 0\). Each half-space is closed and convex, so their intersection is closed and convex; it is a polyhedron because it is described by finitely many linear inequalities. Finally, \(\beta=0\) satisfies every inequality, since \(X0=0\). Therefore the set is nonempty. It is a cone because, if \(\beta\in\mathcal{C}(X)\) and \(c\geq 0\), then \(X(c\beta)=cX\beta\leq 0\). Nothing in the inequalities requires the set to be bounded. \(\square\)

The zero vector always gives the constant risk one, so the finite-design feasible set cannot be empty under this model as stated. Additional requirements can change the problem: for example, an offset \(o_i\) changes the inequalities to \(x_i^\mathsf{T}\beta\leq -o_i\), and an imposed coefficient restriction may also remove zero. Such modified constraints can be infeasible, but that is not the homogeneous finite-design constraint \(X\beta\leq 0\).

Worked Example: A Binary Predictor and an Invalid Risk Ratio

Suppose the model has an intercept and a binary predictor \(x\in\{0,1\}\): \(p(x)=\exp(\beta_0+\beta_1x)\). Let \(\beta_0=\log(0.4)\) and \(\beta_1=\log(3)\). Check both fitted risks and determine whether this coefficient vector is feasible.

At \(x=0\), the linear predictor is \(\log(0.4)\), so \(p(0)=0.4\). At \(x=1\), it is \(\log(0.4)+\log(3)=\log(1.2)\), so \(p(1)=1.2\). The second value is not a probability; equivalently, the corresponding linear predictor \(\log(1.2)\) is positive. The coefficient vector is therefore infeasible for this design.

The constraints can be written directly as \(\beta_0\leq 0\) and \(\beta_0+\beta_1\leq 0\). Here the first holds, but the second does not. With \(\beta_0=\log(0.4)\), the second inequality requires \(\beta_1\leq-\log(0.4)=\log(2.5)\). For example, taking \(\beta_1=0.8\) gives \(p(1)=\exp(\log(0.4)+0.8)\approx 0.890\), which is valid; taking \(\beta_1=\log(2.5)\) puts \(p(1)\) exactly at one.

Boundary Risks and the Likelihood

The feasible set includes equality. If \(x_i^\mathsf{T}\beta=0\), then \(p_i=1\), a valid boundary probability. This differs from a zero risk: with finite coefficients, \(\exp(x_i^\mathsf{T}\beta)\) is strictly positive, so a fitted risk of exactly zero is not attained. It can only be approached as the linear predictor tends to negative infinity.

Whether a boundary fitted risk is compatible with observed outcomes depends on the data. For a Bernoulli observation \(y_i\in\{0,1\}\), its likelihood contribution is \(p_i^{y_i}(1-p_i)^{1-y_i}\). At \(p_i=1\), this contribution is one if \(y_i=1\), but zero if \(y_i=0\). Thus feasibility alone does not say that a boundary value is a good fit; the observed response matters.

Worked Example: A Maximum at a Boundary Risk

There are two groups, \(x=0\) and \(x=1\), with a log-binomial model \(p(x)=\exp(\beta_0+\beta_1x)\). In the first group, 4 of 10 outcomes are successes. In the second group, all 5 outcomes are successes. Find the likelihood-maximizing fitted risks and the corresponding coefficients.

Because the two parameters determine the two group risks, write them as \(p_0=\exp(\beta_0)\) and \(p_1=\exp(\beta_0+\beta_1)\). The design constraints are \(0<p_0\leq1\) and \(0<p_1\leq1\). The likelihood, apart from binomial coefficients that do not depend on the risks, is

$$ L(p_0,p_1)=p_0^4(1-p_0)^6p_1^5. $$

The first factor is maximized at \(p_0=4/10=0.4\): differentiating its log gives \(4/p_0-6/(1-p_0)=0\), whose solution is \(p_0=0.4\); the log-likelihood is strictly concave for \(0<p_0<1\). The second factor \(p_1^5\) increases over \(0<p_1\leq1\), so its maximum occurs at \(p_1=1\). This boundary value is feasible because every observation in that group is a success.

The corresponding coefficients are \(\beta_0=\log(0.4)\approx-0.9163\) and \(\beta_1=\log(p_1/p_0)=\log(2.5)\approx0.9163\). They give linear predictors \(-0.9163\) at \(x=0\) and \(0\) at \(x=1\). If even one of the five outcomes at \(x=1\) had been a failure, \(p_1=1\) would give that observation likelihood zero, so the same boundary fit could not maximize the likelihood.

Observed Design Versus Prediction Range

A model may be feasible at every observed covariate value and still produce an invalid prediction elsewhere. If predictions are required over an entire covariate region, the inequalities must hold throughout that region. For a single predictor on an interval, it is enough to check the endpoints.

Result: For the linear predictor \(\eta(x)=\beta_0+\beta_1x\) on a finite interval \([a,b]\), the condition \(\eta(x)\leq0\) for every \(x\in[a,b]\) is equivalent to the two endpoint conditions \(\eta(a)\leq0\) and \(\eta(b)\leq0\).

Proof. Necessity follows because both endpoints belong to the interval. For sufficiency, any \(x\in[a,b]\), with \(a<b\), can be written as \(x=(1-t)a+tb\) for \(t=(x-a)/(b-a)\in[0,1]\). Since \(\eta\) is affine, \(\eta(x)=(1-t)\eta(a)+t\eta(b)\). If both endpoint values are nonpositive, this weighted average is nonpositive. If \(a=b\), the single endpoint condition is already sufficient. \(\square\)

Worked Example: Feasibility Across a Prediction Interval

Suppose \(p(x)=\exp(\beta_0+\beta_1x)\) and predictions are required for every \(x\in[0,4]\). Take \(\beta_0=-1\) and \(\beta_1=0.3\). Check feasibility on the interval, then find the largest allowed positive slope if the intercept stays fixed at \(-1\).

At \(x=0\), the linear predictor is \(-1\), giving \(p(0)=e^{-1}\approx0.368\). At \(x=4\), it is \(-1+4(0.3)=0.2\), giving \(p(4)=e^{0.2}\approx1.221\). The model is infeasible on the requested interval. In fact, the endpoint condition at \(x=4\) requires \(-1+4\beta_1\leq0\), or \(\beta_1\leq0.25\). With \(\beta_1=0.25\), the risk at \(x=4\) is exactly one, and every risk between the endpoints is at most one by the result just proved.

That last coefficient is feasible on \([0,4]\), but not for \(x=5\): its linear predictor there is \(-1+5(0.25)=0.25\), so \(p(5)=e^{0.25}\approx1.284\). A constraint checked only over one prediction range does not extend automatically beyond it.

Common Mistakes and Practical Checks

  • Assuming exponentiation enforces a probability. It enforces positivity only. Check the upper bound by checking that every relevant linear predictor is nonpositive.
  • Checking only the intercept. A nonpositive intercept does not prevent a positive slope or other covariate combination from making the predictor positive.
  • Treating equality as invalid. A fitted risk of one is a legitimate probability. It may, however, assign zero likelihood to observed failures at that covariate value.
  • Confusing the observed design with a prediction domain. Constraints at the observed rows ensure valid fitted means there, not necessarily at new covariate values.
  • Assuming the constraint set can be empty in the unmodified finite-design model. The zero coefficient vector satisfies \(X\beta\leq0\). Extra offsets or coefficient restrictions define a different constraint problem.

In computation, feasibility and likelihood optimization are related but distinct tasks. A numerical optimizer should respect the linear inequalities, and predictions should be checked over the covariate values where they will be interpreted. A boundary estimate can be valid and data-supported, as in the all-success group, but it should not be mistaken for an interior solution or silently treated as evidence that arbitrary extrapolations are valid.

Check Your Understanding

Use the log-binomial mean \(p_i=\exp(x_i^\mathsf{T}\beta)\) and the feasibility conditions developed above.

  1. For a model with intercept and a binary predictor, write the two inequalities that make both group risks valid.
  2. Why does the zero coefficient vector establish that the finite-design feasible set is nonempty?
  3. What likelihood contribution does a failure make when its fitted risk is exactly one?
  4. For a linear predictor on \([2,6]\), which two values must be checked to ensure feasibility throughout the interval?
  5. A model is feasible at every observed covariate value. Does this alone establish feasibility for a new covariate value outside their range? Explain.
Clinical Biostats