Tutorials › Generalized Linear Mixed Models (GLMM) › Partial Crossing and Incomplete Crossed Designs

Crossed and Nested Random Effects · Tutorial 495 of 698

Partial Crossing and Incomplete Crossed Designs

Represent incomplete crossed designs with incidence structure and derive how the observed overlap between factor levels determines response dependence in a GLMM.

Advanced 12 min read

What You'll Learn

  • Distinguish partially crossed factors from nested factors when some combinations are unobserved.
  • Encode the observed combinations with response-level incidence matrices.
  • Derive marginal covariance for responses sharing one or more random intercepts.
  • Calculate covariances when responses have different fixed-effect means.
  • Diagnose sparse, disconnected, and potentially informative patterns of missing combinations.
  • Compare incomplete crossed designs with complete crossing and nested designs.

When a Crossed Design Is Incomplete

Two factors are crossed when their levels can, in principle, occur in combination: an observation may belong to one level of each factor. In a complete crossed design, every combination is observed. In practice, some combinations may have no observations because of scheduling, availability, or the way data were collected. The factors can still be crossed even though the observed design is incomplete.

This distinction matters because the observed combinations determine which responses share random effects. Two responses at different combinations may still be dependent if they share a level of one factor. Conversely, an unobserved combination supplies no response and therefore no direct information about the response distribution at that combination.

Definition: A partially crossed design has two or more factors whose levels are combinable in principle, but only some combinations are observed. An incomplete crossed design is a partially crossed design in which at least one possible combination has no observed responses. The factors are not nested merely because some combinations are absent.

For example, suppose responses are associated with machines and operators. An operator may use several machines, and a machine may be used by several operators, so the factors are crossed. If an operator never uses one particular machine, that missing combination makes the observed design incomplete; it does not by itself make operators nested within machines or machines nested within operators.

Representing the Observed Combinations

A useful representation is a table of observed counts for each combination. Consider the following hypothetical data from three machines and three operators.

Operator O1Operator O2Operator O3Responses by machine
Machine M12103
Machine M20123
Machine M31012
Responses by operator3238

There are eight responses: the two cells with count 2 contribute four responses, and the four cells with count 1 contribute four more. The M1–O3, M2–O1, and M3–O2 combinations are unobserved. The table represents replication as well as missing combinations; it does not treat a cell count as a single response.

At the response level, define one indicator column for each machine and one for each operator. Each of the eight response rows has exactly one 1 in its machine incidence matrix and exactly one 1 in its operator incidence matrix. A response row therefore records membership in both factors, while the absent combinations simply contribute no rows. This is the same incidence-matrix representation used for crossed classifications; incompleteness changes which rows occur, not the meaning of the indicators.

The observed pattern can also be represented as a bipartite graph: one set of vertices represents machines, the other operators, and an edge connects two levels when their combination has at least one response. Replication can be recorded as an edge count. This view makes overlap visible: responses on edges that touch the same machine or operator may share a random effect.

Worked Example: Reading an Incomplete Incidence Pattern

Use the table above. Consider one response from M1–O1, the response from M1–O2, and one response from M2–O3. Identify which pairs share a machine, share an operator, or share neither.

The M1–O1 and M1–O2 responses share machine M1, but have different operators. The M1–O1 and M2–O3 responses share neither a machine nor an operator. The M1–O2 and M2–O3 responses also share neither factor level.

Thus, in a model with independent machine and operator random intercepts, only the first pair has a random intercept in common. The missing M1–O3 combination does not create a response or a shared effect; it is simply an unobserved cell.

How Observed Overlap Creates Dependence

To make the dependence calculation explicit, suppose the response is a count and use a Poisson log-link GLMM with random intercepts for machine and operator. Let \(Y_i\) denote response \(i\), \(a(i)\) its machine, and \(b(i)\) its operator. Conditional on the random effects, responses are independent and have the following means:

$$ Y_i \mid u,v \sim \operatorname{Poisson}(\lambda_i), \qquad \log(\lambda_i)=\beta_0+\beta_1 w_i+u_{a(i)}+v_{b(i)}. $$

Here \(w_i\) is a recorded response-level indicator, included below to show how different fixed-effect means affect covariance. Assume \(u_a\sim N(0,\sigma_A^2)\) independently across machines, \(v_b\sim N(0,\sigma_B^2)\) independently across operators, and that the two sets of random effects are mutually independent. Also assume conditional independence of responses given all random effects and predictors. These assumptions specify the dependence calculation; the incomplete pattern alone does not guarantee that they are appropriate.

For two distinct responses \(i\) and \(j\), conditional independence gives \(E(Y_iY_j\mid u,v)=\lambda_i\lambda_j\). The law of total covariance then yields

$$ \operatorname{Cov}(Y_i,Y_j) =E\{\operatorname{Cov}(Y_i,Y_j\mid u,v)\} +\operatorname{Cov}\{E(Y_i\mid u,v),E(Y_j\mid u,v)\} =\operatorname{Cov}(\lambda_i,\lambda_j). $$

The first term is zero for distinct responses under the conditional-independence assumption. To evaluate the second term, use \(E\{\exp(cZ)\}=\exp(c^2\sigma^2/2)\) when \(Z\sim N(0,\sigma^2)\). Let \(\mu_i=E(Y_i)\), the marginal mean. If the two responses share a machine random intercept, their random linear predictors share variance \(\sigma_A^2\); if they also share an operator, they share the additional independent variance \(\sigma_B^2\). Consequently,

$$ \operatorname{Cov}(Y_i,Y_j) =\mu_i\mu_j\left[\exp\left\{ \mathbf{1}\{a(i)=a(j)\}\sigma_A^2+ \mathbf{1}\{b(i)=b(j)\}\sigma_B^2 \right\}-1\right]. $$

An indicator in this expression is 1 when the pair shares that factor level and 0 otherwise. If neither level is shared, the covariance is zero under the stated independent-random-effects model. Sharing one or both levels creates positive marginal covariance, even though the responses are conditionally independent.

Worked Example: Covariance for Responses Sharing One Factor

Suppose \(\beta_0=\log(2)\), \(\beta_1=0\), \(\sigma_A^2=0.25\), and \(\sigma_B^2=0.16\). Compare two responses with the same machine but different operators, such as the selected M1–O1 and M1–O2 responses. Both have marginal mean \(\mu=\exp\{\log(2)+(0.25+0.16)/2\}=2\exp(0.205)\approx2.455\).

They share the machine effect but not the operator effect. Thus the shared variance is \(0.25\), and

$$ \operatorname{Cov}(Y_i,Y_j) =\mu^2\{\exp(0.25)-1\} =\{2\exp(0.205)\}^2\{\exp(0.25)-1\} \approx 6.027(0.2840) \approx 1.712. $$

The covariance is about 1.712 squared-count units. It is positive because both responses include the same machine deviation \(u_{\mathrm{M1}}\). Their different operator effects do not contribute to their covariance under the independent-effects assumption.

Worked Example: Two Shared Effects and Different Means

Now consider the two responses in cell M2–O3, with one response having \(w_i=0\) and the other \(w_j=1\). Keep the variance assumptions above, but set \(\beta_1=\log(2)\). The responses share both random intercepts, and the second has twice the conditional mean of the first at any fixed values of the random effects.

Their marginal means are \(\mu_i=2\exp(0.205)\approx2.455\) and \(\mu_j=4\exp(0.205)\approx4.910\). The shared random-effect variance is \(0.25+0.16=0.41\). Therefore,

$$ \begin{aligned} \operatorname{Cov}(Y_i,Y_j) &=\mu_i\mu_j\{\exp(0.41)-1\}\\ &=\left[2\exp(0.205)\right]\left[4\exp(0.205)\right]\{\exp(0.41)-1\}\\ &=2\left[2\exp(0.205)\right]^2\{\exp(0.41)-1\}\\ &\approx 2(6.027)(0.5068) \approx 6.109. \end{aligned} $$

The covariance is about 6.109 squared-count units. The coefficient is the product of the two different marginal means, not the square of the smaller mean. If both responses instead had \(w=0\), their covariance would be \(6.027\{\exp(0.41)-1\}\approx3.055\). This comparison shows why fixed-effect differences must be included when evaluating covariance.

What Incompleteness Does—and Does Not—Change

A partially crossed design changes which pairwise overlaps occur in the data. It does not change the covariance rule implied by the model. In the machine–operator example, two responses at different cells can be dependent through a shared machine or operator; responses at cells with no shared factor level have zero covariance under the independent random-intercept specification. Two responses in the same cell share both effects.

Incompleteness can nevertheless affect what the data reveal. If a machine is observed with only one operator, its machine effect and that operator's effect are not contrasted against other combinations within that local part of the design. If the bipartite graph has disconnected pieces, there are no observed combinations linking those pieces. Whether particular fixed or variance parameters are identifiable depends on the full model, replication, and design; missing cells alone do not establish either identifiability or non-identifiability.

The missingness mechanism also matters. If combinations are absent for reasons unrelated to unobserved outcomes after conditioning on modeled information, analysis of the observed data may be defensible under that assumption. If, for example, a combination is systematically omitted because its unobserved response would be unusually large, treating the observed pattern as innocuous can bias inference. The analyst should explain how combinations became unobserved rather than assume that every zero in a count table is a structural impossibility.

1
Map the observed memberships.
List the factor levels and record which combinations have responses, including the number of responses in each observed cell.
2
Specify the random-effects structure.
State which factor effects are shared by each response and the assumptions about their distributions and independence.
3
Check overlap and support.
Look for levels with few observed partners, isolated or disconnected graph components, and cells with little or no replication.
4
Assess the model and data process.
Check whether the response distribution, conditional-independence assumption, and explanation for absent combinations are plausible; investigate convergence or boundary estimates as signs of weak information.

Diagnostics and Comparisons

A complete crossed design offers observations across every possible pair of levels and usually gives broader direct information about combinations. An incomplete crossed design retains the crossed random-effects structure but has less direct support in some parts of the factor combination space. By contrast, a nested design has a structural membership rule: each lower-level unit belongs to only one higher-level unit. A missing combination is not evidence for that rule. The sampling design and possible memberships, not just the empty cells, distinguish crossing from nesting.

A practical diagnostic is to inspect the incidence table or graph alongside the fitted model. Check for factor levels represented by only one response, highly uneven partner counts, disconnected components, and a pattern of missingness related to predictors or outcomes. Sparse overlap can make variance estimates imprecise, and a random-effect variance estimated near zero or a convergence warning deserves investigation. Such signs do not prove the model is wrong, but they warn that the data may provide limited information for its components.

It may be tempting to remove a factor, analyze each observed cell as an independent group, or replace the crossed structure with a nested model simply to avoid empty cells. These choices alter the dependence assumptions. Treating responses as independent ignores shared-effect covariance; treating cell as the only random effect does not generally reproduce covariance between different cells that share a machine or operator. The model should reflect the membership mechanism, while conclusions should acknowledge weakly supported or unobserved combinations.

Common pitfall: “Some machine–operator cells are empty, so the factors must be nested.” This is incorrect: crossing is about whether levels can be combined under the design, not whether every combination happened to be observed. Identify the design's possible memberships first, then represent the observed responses and their shared random effects.

Partial crossing is useful because it allows a model to represent real overlap without pretending that the design is balanced or complete. Its limitation is equally important: the model's covariance structure describes dependence among observed responses, but it cannot manufacture information for absent combinations. Interpretation should therefore separate model-based predictions from combinations actually represented in the data.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Two factors have levels that could be paired, but one pair has no observations. Does that fact alone make the factors nested?
  2. In a crossed random-intercept model with independent effects, when is the covariance of two distinct responses zero?
  3. For a Poisson log-link model, two responses share a machine effect of variance \(0.25\), but not an operator. What shared variance enters the covariance formula?
  4. Why must the product of marginal means be used when two responses have different fixed-effect predictors?
  5. Name two features of an incomplete incidence graph that should prompt careful assessment of the fitted model.

Solutions. (1) No. Nesting concerns the design's possible membership structure; an unobserved pair may simply be a missing combination in a crossed design. (2) Under independent random effects and conditional independence, they have zero covariance when they share no random-effect level. (3) The shared variance is \(0.25\); the unshared operator variance does not enter. (4) The covariance formula is \(\mu_i\mu_j\{\exp(V_{\mathrm{shared}})-1\}\), so unequal marginal means give a product different from either mean squared. (5) Examples include disconnected components, levels with only one observed partner, very uneven partner counts, or little replication in observed cells.

Clinical Biostats