Tutorials › Generalized Linear Mixed Models (GLMM) › Disconnected Graphs in Crossed Classifications

Crossed and Nested Random Effects · Tutorial 512 of 698

Disconnected Graphs in Crossed Classifications

Use the connected components of a crossed-design graph to distinguish comparisons supported by observed links from those that depend on model assumptions.

Advanced 11 min read

What You'll Learn

  • Define the bipartite graph of a two-factor crossed design.
  • Identify connected components, including levels with no observed links.
  • Use paths to determine which additive level contrasts are supported by the design.
  • Relate disconnected components to rank deficiency and estimability.
  • Distinguish empirical comparisons from GLMM comparisons relying on random-effects assumptions.
  • Diagnose disconnectedness and consider its implications for interpretation.

Why the links in a crossed design matter

In a crossed classification, observations are associated with levels of two factors: for example, students and test items, or raters and targets. An observation links a level of the first factor to a level of the second. If some levels are never linked, the pattern is not merely a collection of empty cells: it can divide the design into separate groups that have no observed route of comparison between them.

A graph makes this structure visible. It can show whether a comparison is supported by a chain of shared levels, even when two levels were never directly paired. It can also reveal when comparisons between groups rest on modeling assumptions rather than on links in the data. This distinction is important in a generalized linear mixed model (GLMM), where the model may produce predictions for disconnected parts of the design even though the observed links do not connect them.

Definition: For a two-factor crossed design, the bipartite graph has one set of vertices for the observed levels of factor A and a separate set for the observed levels of factor B. An edge joins A level \(i\) to B level \(j\) if at least one observation was recorded for that pair. A connected component is a maximal set of vertices in which every pair of vertices can be joined by a path of edges. A level with no observations may be represented as an isolated vertex, but it contributes no observed edge.

Repeated observations for the same A–B pair give that edge more data, but do not create a new connection. Conversely, an empty A–B cell means no edge for that pair; it does not by itself imply that the entire graph is disconnected. Connectivity depends on whether there is a path through other observed pairs.

Reading components and paths

Consider an additive model for the linear predictor of an observed A–B pair:

$$ \eta_{ij}=\mu+\alpha_i+\beta_j $$

Here \(\eta_{ij}\) is the pair-specific linear predictor, \(\mu\) is an overall intercept, and \(\alpha_i\) and \(\beta_j\) are factor-level contributions. In a GLMM, the response distribution and link function determine how this predictor relates to the response. For example, with a binary response and a logit link, the conditional probability is \(\operatorname{logit}^{-1}(\eta_{ij})\). The graph reasoning concerns which combinations of level contributions are linked by observed pairs; it does not depend on using a logit link.

If A levels \(i\) and \(i'\) share a B level \(j\), then the difference between their linear predictors at that B level is \(\eta_{ij}-\eta_{i'j}=\alpha_i-\alpha_{i'}\). The shared B contribution and the intercept cancel. If the A levels do not share a B level directly but lie in the same component, an alternating path can still connect them. Adding and subtracting the linear predictors along that path cancels the intermediate factor contributions. This is why connectivity, rather than direct pairing alone, determines which additive contrasts can be traced through the design.

Worked Example: Finding the Components

Suppose a hypothetical rating design has A levels \(A_1,A_2,A_3,A_4\) and B levels \(B_1,B_2,B_3\). The observed pairs are \((A_1,B_1)\), \((A_1,B_2)\), \((A_2,B_2)\), and \((A_3,B_3)\). Determine the connected components.

First component. The edge from \(A_1\) to \(B_1\) connects those two vertices. The edge from \(A_1\) to \(B_2\) adds \(B_2\), and the edge from \(B_2\) to \(A_2\) adds \(A_2\). Thus \(\{A_1,A_2,B_1,B_2\}\) is one component.

Second component. The observed pair \((A_3,B_3)\) forms a separate component containing \(\{A_3,B_3\}\). There is no path from it to the first component.

Unlinked level. \(A_4\) has no recorded pair, so it is an isolated vertex if included in the graph. There are three components when this isolated level is counted. The observations themselves occur in only the first two components; no outcome data directly inform \(A_4\)'s level-specific contribution.

There are four observed edges, but edge count alone does not establish connectivity. The key fact is that no observed pair joins the \(A_3,B_3\) component to the \(A_1,A_2,B_1,B_2\) component.

What disconnection means for comparisons

For a fixed additive model, disconnected components create a precise estimability problem. To see its structure, form a design matrix with one column for each A level and one for each B level. Each row corresponds to an observed pair and has a 1 in the column for its A level and a 1 in the column for its B level. This is the incidence matrix of the bipartite graph.

Within each connected component, add a constant \(t\) to every A-level contribution and subtract \(t\) from every B-level contribution. Every observed pair in that component retains the same sum, because \((\alpha_i+t)+(\beta_j-t)=\alpha_i+\beta_j\). Thus the incidence matrix has at least one independent null direction per component. For a bipartite graph with \(V\) vertices and \(C\) connected components, its rank is \(V-C\): each component contributes one such direction, and no further independent direction remains within a connected component.

An intercept or constraints such as sum-to-zero constraints change how parameters are represented, but do not create observed links between components. Under an unconstrained additive parameterization, comparisons of level contributions across disconnected components are not identified by the observed pair sums alone. Constraints can select a numerical representation; they cannot turn an unsupported contrast into a comparison supplied by the data.

In a GLMM with random intercepts, a common specification is \(\eta_{ij}=\mathbf{x}_{ij}^{\mathsf T}\boldsymbol{\beta}+u_i+v_j\), where the random effects are assigned distributions, often independent mean-zero normal distributions with estimated variances. This distributional structure can connect components through shared population-level assumptions. It does not add edges to the observed graph. Consequently, a model-based comparison across components may be computable, but its interpretation depends more heavily on the assumed random-effects distributions and on the pooling they imply than does a comparison supported by observed paths.

Worked Example: An A-Level Contrast Along a Path

In a hypothetical connected component, suppose the fitted linear predictors for four observed pairs are \(\eta_{A_1B_1}=0.2\), \(\eta_{A_2B_1}=0.7\), \(\eta_{A_2B_2}=0.4\), and \(\eta_{A_3B_2}=0.1\). Under the additive model, calculate \(\alpha_{A_1}-\alpha_{A_3}\).

The graph has the path \(A_1-B_1-A_2-B_2-A_3\). Alternating addition and subtraction along this path gives

$$ \begin{aligned} \eta_{A_1B_1}-\eta_{A_2B_1} +\eta_{A_2B_2}-\eta_{A_3B_2} &=(\mu+\alpha_{A_1}+\beta_{B_1})-(\mu+\alpha_{A_2}+\beta_{B_1})\\ &\quad+(\mu+\alpha_{A_2}+\beta_{B_2})-(\mu+\alpha_{A_3}+\beta_{B_2})\\ &=\alpha_{A_1}-\alpha_{A_3}. \end{aligned} $$

Substituting the stated values gives \(0.2-0.7+0.4-0.1=-0.2\). Thus the fitted additive contrast is \(\alpha_{A_1}-\alpha_{A_3}=-0.2\) on the linear-predictor scale. The contrast is supported by the path even though \(A_1\) and \(A_3\) were not directly paired. For a logit link, this is a log-odds contrast conditional on the model’s other terms; exponentiating it gives an odds ratio of \(e^{-0.2}\approx0.8187\).

GLMM interpretation across separate components

A random-effects model does not make disconnectedness irrelevant. Suppose two components contain different sets of A and B levels. The model can estimate population-level fixed effects and variance components using all observed data, subject to the model and design providing the necessary information. It may also produce conditional predictions for particular levels. But there is no observed path that directly calibrates an A-level contribution in one component against an A-level contribution in the other.

For example, consider a hypothetical binary-response GLMM with a logit link and random intercepts \(u_i\) and \(v_j\). Suppose fitted conditional values for one pair in each of two disconnected components are \(\eta_1=-1+0.4+0.3=-0.3\) and \(\eta_2=-1-0.5+0.2=-1.3\). Their conditional probabilities are

$$ \operatorname{logit}^{-1}(-0.3)=\frac{1}{1+e^{0.3}}\approx0.4256, \qquad \operatorname{logit}^{-1}(-1.3)=\frac{1}{1+e^{1.3}}\approx0.2142. $$

The fitted conditional probability difference is about \(0.4256-0.2142=0.2114\), or 21.14 percentage points. The linear-predictor difference is \(1.0\), corresponding to a conditional odds ratio of \(e^1\approx2.718\). These calculations describe the stated fitted model values. They do not show that the observed design directly identifies a difference between the components: that comparison is informed by the model’s distributional assumptions and fitted effects, not by a path in the graph.

This distinction is especially important when the components are substantively different groups, sites, or periods. A model that assumes all A-level random effects come from a common mean-zero distribution may partially pool estimates across components. If the components differ systematically in an unmodeled way, that assumption can be misleading. Conversely, treating every component as unrelated may discard a plausible shared population structure. The graph diagnoses the lack of direct links; subject-matter knowledge and the modeling assumptions determine what, if anything, should be shared across components.

Diagnostics, alternatives, and limitations

A practical connectivity check begins with the observed A–B pairs, not with a model summary. Construct one edge for each distinct observed pair, label the vertices, and identify connected components. For a large design, a graph algorithm can do this efficiently. An equivalent computational check is to find connected components in the bipartite adjacency structure. Inspect isolated vertices separately: a level with no observations cannot have a data-informed level-specific effect.

A second check concerns the model matrix. Rank deficiency or aliased fixed-effect columns can reveal non-estimability, but the graph is often easier to interpret: it shows exactly which levels lack a linking path. Connectivity is a structural diagnostic, not a complete guarantee of a good model. It does not establish adequate replication, adequate precision, correct distributional assumptions, or identifiability of every additional fixed effect, interaction, or random slope. Those features require their own checks.

If disconnected components are a problem for the intended comparison, possible responses include collecting observations that bridge components, limiting the target contrast to levels connected by observed paths, or fitting component-specific analyses when separate inference is scientifically appropriate. A model that imposes common random-effects distributions across components is another possibility, but its cross-component comparisons must be presented as assumption-dependent. No statistical parameterization can substitute for missing links without adding assumptions.

Common pitfall: “The GLMM software returned estimates for every level, so every cross-component contrast is supported by the data.” This reasoning confuses a computable, model-based estimate with an empirically linked comparison. Check the observed graph. If no path joins the levels, state which distributional or structural assumptions are providing the connection, and avoid describing the result as a direct comparison established by the observed design.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. A design has edges \((A_1,B_1)\), \((A_2,B_1)\), and \((A_2,B_2)\). Are \(A_1\) and \(A_2\) connected? Must they have a directly observed pair with a common B level?
  2. Two observed pairs share the same A–B combination, each with several observations. Does this repetition change the graph’s connected components?
  3. Why does a disconnected graph limit a fixed additive comparison between A levels in separate components?
  4. A GLMM gives conditional predictions for levels in separate components. What should be said about a contrast between those predictions?

Solutions. (1) Yes. The path \(A_1-B_1-A_2\) connects them, and they also share the directly observed B level \(B_1\). (2) No. Replication adds observations to an existing edge but does not add a new vertex or connection. (3) There is no observed path through which shared factor contributions can cancel to identify that contrast; the observed pair sums do not determine the between-component difference without additional constraints or assumptions. (4) It is a model-based contrast that may depend on shared distributional assumptions or pooling. It should not be described as directly supported by observed links when the components are disconnected.

Clinical Biostats