Tutorials › Generalized Linear Models › Empty Cells and Nonestimable Interaction Effects

Factors Contrasts and Interactions · Tutorial 156 of 981

Empty Cells and Nonestimable Interaction Effects

Use design-matrix rank and observed cell patterns to decide which factorial contrasts the model can estimate.

Intermediate 10 min read

What You'll Learn

  • Define estimability of a linear predictor contrast in terms of the design matrix.
  • Check estimability using the row space or null space of the design matrix.
  • Identify which cell means and contrasts remain estimable in a saturated cell-means model.
  • See how an empty cell can prevent estimation of an interaction contrast.
  • Distinguish nonestimability from prediction under an additional model restriction.
  • Recognize why changing factor coding cannot recover information missing from the design.

Why Empty Cells Matter

A factorial interaction describes how a factor effect varies across levels of another factor. To estimate such a change from observed data, the relevant factor combinations must provide enough information. When a combination has no observations, some contrasts may be impossible to determine from the design, even if software prints a coefficient for them.

The key question is not simply whether a coefficient appears in the model formula. It is whether the contrast of interest has the same value for every parameter vector that produces the same linear predictors at the observed design points. This definition makes estimability a property of the design and the requested quantity, not of a particular choice of factor coding.

Definition: For a fixed design matrix \(X\) with \(n\) rows and \(p\) columns, a linear parameter function \(c^\mathsf{T}\beta\) is estimable if it has the same value for every pair of parameter vectors \(\beta\) and \(\tilde{\beta}\) satisfying \(X\beta=X\tilde{\beta}\). Equivalently, the observed design uniquely determines the value of that function, even if it does not uniquely determine all of \(\beta\).

In a generalized linear model, the linear predictor is \(\eta=X\beta\). The criterion below therefore applies to linear contrasts of the coefficients and to linear contrasts of cell-level linear predictors. It does not, by itself, say that every nonlinear function of the parameters is estimable.

The Design-Matrix Criterion

The row space of \(X\) is the set of all linear combinations of its rows; the null space of \(X\) is the set of vectors \(v\) such that \(Xv=0\). The following result turns the definition into a practical test.

Theorem: The linear function \(c^\mathsf{T}\beta\) is estimable if and only if \(c\) belongs to the row space of \(X\). Equivalently, it is estimable if and only if \(c^\mathsf{T}v=0\) for every \(v\) in the null space of \(X\).

Proof. Suppose first that \(c\) belongs to the row space of \(X\). Then there is a vector \(a\) such that \(c=X^\mathsf{T}a\). For any two parameter vectors with \(X\beta=X\tilde{\beta}\),

$$ c^\mathsf{T}\beta = a^\mathsf{T}X\beta = a^\mathsf{T}X\tilde{\beta} = c^\mathsf{T}\tilde{\beta}. $$

So the function is estimable. Conversely, suppose \(c^\mathsf{T}\beta\) is the same for every pair of parameter vectors with the same fitted linear predictor. For any \(v\) satisfying \(Xv=0\), the vectors \(\beta\) and \(\beta+v\) have identical predictors, since \(X(\beta+v)=X\beta\). Estimability then requires

$$ c^\mathsf{T}(\beta+v)=c^\mathsf{T}\beta, \qquad\text{so}\qquad c^\mathsf{T}v=0. $$

Thus \(c\) is orthogonal to the null space of \(X\). The fundamental theorem of linear algebra gives that the orthogonal complement of the null space of \(X\) is the row space of \(X\). Hence \(c\) belongs to the row space. This proves both equivalences. \(\square\)

This criterion also explains why full column rank is sufficient but not necessary for a particular contrast to be estimable. If \(X\) has full column rank, its null space contains only zero, so every linear function of \(\beta\) is estimable. If \(X\) is rank deficient, some functions may still be estimable; the test must be applied to the specific contrast.

Empty Cells in a Saturated Cell-Means Model

For a factorial design, a useful starting point is the saturated cell-means model. It assigns a separate linear predictor \(\eta_j\) to every possible factor combination \(j\). With this parameterization, a row of \(X\) for an observation in cell \(j\) has a 1 in column \(j\) and 0s elsewhere. Repeated observations in a cell repeat the same row. A cell with no observations contributes no row.

Theorem: In a saturated cell-means model, a linear contrast of cell-level linear predictors is estimable if and only if its contrast coefficient is zero for every empty cell.

Proof. Write the vector of all cell-level linear predictors as \(\eta=(\eta_1,\ldots,\eta_J)^\mathsf{T}\). For each observed cell \(j\), the design includes a row equal to the \(j\)th coordinate vector. If cell \(j\) is empty, no row has a nonzero entry in coordinate \(j\). Consequently, the null space of this cell-indicator design consists exactly of vectors that are zero in observed-cell coordinates and can be arbitrary in empty-cell coordinates. By the design-matrix criterion, a contrast \(d^\mathsf{T}\eta\) is estimable exactly when \(d\) is orthogonal to every such vector. That holds precisely when \(d_j=0\) for every empty cell \(j\). \(\square\)

In this saturated model, observed cell predictors can be estimated separately, but an empty cell's predictor cannot be recovered from the observed cells. An interaction contrast that includes an empty-cell predictor with a nonzero weight is therefore not estimable. This conclusion concerns the saturated model; a restricted model, such as one that assumes additivity, may make additional predictions possible.

Worked Example: A Missing Cell in a Two-by-Two Design

Let factor \(A\) have levels 0 and 1, and factor \(B\) have levels 0 and 1. Suppose the observed cells are \((0,0)\), \((0,1)\), and \((1,0)\), while \((1,1)\) is empty. Order the cell predictors as \((\eta_{00},\eta_{01},\eta_{10},\eta_{11})\). The distinct rows of the saturated cell-means design are

$$ X= \begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&1&0 \end{pmatrix}. $$

The matrix has rank 3. Its null space contains all multiples of \(v=(0,0,0,1)^\mathsf{T}\), because \(Xv=0\). The interaction, or difference-in-differences, contrast is

$$ \eta_{11}-\eta_{10}-\eta_{01}+\eta_{00}, \qquad d=(1,-1,-1,1)^\mathsf{T}. $$

Since \(d^\mathsf{T}v=1\), this contrast is not estimable. Changing \(\eta_{11}\) while holding the other three predictors fixed leaves all observed linear predictors unchanged but changes the interaction contrast.

By contrast, \(\eta_{01}-\eta_{00}\) has coefficient vector \((-1,1,0,0)^\mathsf{T}\), whose fourth entry is zero. It is estimable: both cells in that difference are observed. The distinction is not that every contrast involving factor \(B\) fails; it is that the requested contrast must not depend on the unconstrained empty-cell predictor.

Finding Which Contrasts Survive

For several factors or many levels, it is usually easiest to work with the observed design matrix rather than to reason from the word “interaction” alone. In a cell-means design, write down one coordinate for each possible combination, then mark which combinations occur. For a general contrast \(d^\mathsf{T}\eta\), check whether its weights on empty cells are zero. With a non-saturated parameterization, use the row-space or null-space criterion for its coefficient vector.

Worked Example: A Two-by-Three Design With Two Empty Cells

Let \(A\) have levels 0 and 1 and \(B\) have levels 1, 2, and 3. Suppose the observed cells are \((0,1)\), \((0,2)\), \((1,1)\), and \((1,3)\). The cells \((0,3)\) and \((1,2)\) are empty. Order the six cell predictors as \((\eta_{01},\eta_{02},\eta_{03},\eta_{11},\eta_{12},\eta_{13})\). A design with one row per observed cell is

$$ X= \begin{pmatrix} 1&0&0&0&0&0\\ 0&1&0&0&0&0\\ 0&0&0&1&0&0\\ 0&0&0&0&0&1 \end{pmatrix}. $$

Its rank is 4, and its null space is spanned by the coordinate vectors for the third and fifth cells. Consider first the contrast \(\eta_{01}-\eta_{02}\), comparing levels 1 and 2 of \(B\) within \(A=0\). Both cells are observed, so its weights on the empty cells are zero and the contrast is estimable.

Now compare the effect of \(A\) at \(B=1\) with its effect at \(B=2\). The corresponding difference-in-differences is

$$ (\eta_{11}-\eta_{01})-(\eta_{12}-\eta_{02}) = -\eta_{01}+\eta_{02}+\eta_{11}-\eta_{12}. $$

This contrast has weight \(-1\) on \(\eta_{12}\), an empty-cell predictor. It is not estimable in the saturated model. By contrast, the difference \(\eta_{13}-\eta_{01}\) is estimable because both of its cells are observed. A contrast need not compare cells at the same level of the other factor to be estimable; its weights and the observed design determine the answer.

What a Model Restriction Changes

Nonestimability is relative to a specified model. The saturated cell-means model makes no relationship assumption between different cells. A smaller model can impose such a relationship and thereby identify a missing-cell prediction. This is not new information supplied by the empty cell: it is a consequence of the restriction.

Worked Example: An Empty Cell Under an Additive Model

Return to the two-by-two pattern with cells \((0,0)\), \((0,1)\), and \((1,0)\) observed and \((1,1)\) empty. Suppose instead that the model has no interaction and uses the additive parameterization

$$ \eta_{ab}=\beta_0+a\beta_A+b\beta_B. $$

Using the observed-cell order \((0,0),(0,1),(1,0)\), the design matrix and the row for the missing combination are

$$ X= \begin{pmatrix} 1&0&0\\ 1&0&1\\ 1&1&0 \end{pmatrix}, \qquad x_{11}^\mathsf{T}=(1,1,1). $$

The observed rows identify \(\beta_0\), \(\beta_B\), and \(\beta_A\): the first row gives \(\beta_0\), the second differs from the first by \(\beta_B\), and the third differs from the first by \(\beta_A\). Algebraically,

$$ (1,1,1) = (1,0,1)+(1,1,0)-(1,0,0). $$

Thus the missing-cell linear predictor is estimable under this additive model and equals \(\eta_{01}+\eta_{10}-\eta_{00}\). The model's assumption of zero interaction supplies the relationship that the saturated model lacked. If the true interaction is nonzero, this prediction may be wrong; the fact that it is estimable under the additive model does not verify the assumption.

For a GLM with a one-to-one link, this identifies the missing-cell linear predictor under the additive restriction. Interpreting or estimating a response-scale contrast requires attention to the link: applying the inverse link to an estimable predictor is not the same as claiming that every linear contrast of response means is estimable.

Rank, Coding, and Practical Interpretation

The rank of the design matrix counts the number of independent directions in parameter space that the observed design informs. An empty cell can lower that rank in a saturated model. However, a rank deficiency does not automatically make every coefficient or every scientific contrast nonestimable. The correct question is always whether the particular contrast lies in the row space of the observed design.

Changing the reference level or using effect coding changes the coordinates used to express the model, but it does not add observations or new design information. Under an invertible reparameterization, the same fitted linear predictors and the same estimable scientific quantities remain available. A newly printed coefficient is not evidence that an unobserved interaction has become estimable.

In practice, make the observed-cell pattern explicit before interpreting an interaction. Then express the scientific question as a contrast, check its weights on empty cells in a saturated cell-means representation, or use the equivalent design-matrix test. If a contrast fails, distinguish two possibilities: the contrast is unavailable under the chosen model, or a stated restriction has made it available by connecting cells. That distinction matters for both interpretation and reporting.

Common Mistake

  • Wrong reasoning: “The factorial formula contains an interaction term, so the interaction is estimated, even though one combination is absent.” A coefficient can be included in a parameterization without being uniquely determined by the observed design.
  • Correction: Check estimability against the actual design matrix. If two coefficient vectors give the same observed linear predictors but different values of the proposed interaction contrast, that contrast is not estimable under the model. A restriction such as additivity can yield a missing-cell prediction, but it changes the model assumptions; it does not recover information from the empty cell.
Key takeaway: For a fixed design \(X\), a linear contrast is estimable exactly when its coefficient vector lies in the row space of \(X\), or equivalently is orthogonal to every vector in the null space. In a saturated cell-means model, this means a contrast cannot assign nonzero weight to an empty cell.

Check Your Understanding

For each question, state the model assumption you are using when it matters.

  1. In a saturated two-by-two cell-means model, three cells are observed and one is empty. Is the difference between two observed cell predictors estimable? Explain using the design-matrix criterion.
  2. What does it mean for a coefficient contrast \(c^\mathsf{T}\beta\) to be estimable when \(X\) is rank deficient?
  3. In the two-by-three example, why is the difference-in-differences comparing the effect of \(A\) at \(B=1\) and \(B=2\) not estimable in the saturated model?
  4. How can an additive model yield a predictor for an empty cell, and why does that not contradict the saturated-model result?
  5. Does changing from reference coding to effect coding create information about an empty cell? Explain.
Clinical Biostats