Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Interpreting Random-Intercept Models

Biological Replication and Donor-Level Inference · Tutorial 450 of 700

Interpreting Random-Intercept Models

Interpret the shared donor component in a random-intercept model and distinguish the number of cells from the number of independent biological replicates.

Advanced 12 min read

What You'll Learn

  • Write a random-intercept model for cell-level expression nested within donors.
  • Interpret the fixed intercept, condition coefficient, and donor-specific deviation.
  • Derive the covariance between two cells from the same donor.
  • Explain why cells from one donor do not count as independent biological replicates.
  • Check the model’s assumptions and recognize common interpretation errors.

Why Put a Random Intercept on Donor?

Cells sampled from the same donor share biological characteristics and technical circumstances. As a result, their expression measurements may resemble one another even after accounting for an experimental condition. Treating every cell as an independent replicate ignores this shared donor-to-donor variation and can make a comparison appear more precise than the biological replication supports. Earlier material on pseudoreplication and donor-level inference establishes why the sampling unit matters; here we interpret how a random-intercept model represents that structure.

A random intercept gives each donor a deviation from the population-level intercept. Cells from the same donor inherit that same deviation, so the model expresses their dependence rather than pretending that each cell has an unrelated baseline. The model can use cell-level observations, but the independent biological sampling units are the donors, assuming donors were independently sampled.

Definition: For cell \(i\) from donor \(j\), a random-intercept model with a donor-level condition indicator \(x_j\) is $$ Y_{ij}=\beta_0+\beta_1x_j+b_j+\varepsilon_{ij}. $$ Here \(Y_{ij}\) is the modeled expression response, \(\beta_0\) is the population-level intercept, \(\beta_1\) is the condition contrast, \(b_j\) is donor \(j\)'s random intercept, and \(\varepsilon_{ij}\) is the cell-level residual. The standard model assumes \(b_j\sim N(0,\tau^2)\), \(\varepsilon_{ij}\sim N(0,\sigma^2)\), and that all donor effects and residuals are mutually independent. In particular, residuals are independent conditional on the donor effects and the modeled predictors.

The response \(Y_{ij}\) must be understood on the scale specified by the analysis, such as a normalized and transformed expression scale. The Gaussian assumptions above apply to that modeled response, not automatically to raw RNA-sequencing counts. A count outcome generally requires an appropriate count model rather than assuming normally distributed residuals on the raw-count scale.

The random intercept \(b_j\) is a latent deviation for a donor, not a measured donor characteristic or a separate condition effect. Its assumed mean is zero, so \(\beta_0+\beta_1x_j\) describes the expected response for the donor population at that condition. A particular donor's expected response, conditional on its intercept, is shifted by \(b_j\). The residual \(\varepsilon_{ij}\) accounts for the remaining cell-level deviation around that donor-specific expectation.

What Dependence Does the Model Imply?

The shared term \(b_j\) is the source of the model's within-donor dependence. To see this, consider two distinct cells \(i\) and \(k\) from the same donor \(j\). Once the condition and donor effect are given, their residuals are independent. Without conditioning on the donor effect, however, both outcomes include the same \(b_j\).

Derivation: For two distinct cells from donor \(j\), subtract their conditional means. The remaining terms are \(b_j+\varepsilon_{ij}\) and \(b_j+\varepsilon_{kj}\). Since the donor effect has variance \(\tau^2\) and the two residuals are independent of one another and of \(b_j\), $$ \operatorname{Cov}(Y_{ij},Y_{kj}) =\operatorname{Cov}(b_j+\varepsilon_{ij},b_j+\varepsilon_{kj}) =\operatorname{Var}(b_j) =\tau^2. $$ For cells from different donors, the donor effects and residuals are independent under the model, so their covariance is zero. This is the model-based reason that same-donor cells are not independent observations at the population level.

The model also implies that a cell's expected response, conditional on its donor effect, is \(\beta_0+\beta_1x_j+b_j\). Averaging several cells from one donor can reduce the contribution of cell-level residual noise to that donor's average, but the shared \(b_j\) remains. Thus, collecting many cells from one donor does not create many independent donors. The formula is useful for understanding the structure; it does not mean that one can replace a small donor sample with a very large cell count.

Worked Example: Reading a Donor-Specific Intercept

Suppose a hypothetical analysis models transformed expression, in log-expression units, as \(Y_{ij}=2.0-0.4x_j+b_j+\varepsilon_{ij}\). Let \(x_j=1\) identify the treated condition, and suppose a particular donor has an estimated intercept deviation of \(b_j=0.6\). The model's population-level expected response for treated donors is $$ \beta_0+\beta_1=2.0-0.4=1.6\text{ log-expression units}. $$

For this donor, the conditional expected response for a treated cell is $$ 2.0-0.4(1)+0.6=2.2\text{ log-expression units}. $$ The value \(2.2\) is the donor-specific expected response before adding the cell residual \(\varepsilon_{ij}\). The donor's positive deviation shifts its expectation upward by \(0.6\) units; it does not change the condition coefficient. Under this coding, \(-0.4\) is the modeled treated-versus-control contrast in log-expression units at the population level.

Which Unit Is Independent?

The sampling unit is the unit independently sampled from the target biological population. If donors are sampled independently and cells are then collected within each donor, donors are the independent clusters. Cells within a donor are repeated observations sharing the random intercept. The model allows these cell records to contribute information about the donor's observed expression pattern, but it does not turn each record into an independent biological replication.

For a condition comparison, the design determines what provides replication. If condition is assigned or varies between donors, the condition contrast is supported by the number of donors in each condition, not the number of cells. If the same donors contribute observations under both conditions, the comparison is paired at the donor level; the donor structure must reflect that pairing. A random intercept can represent a shared donor baseline in such data, but the condition design and model terms must also match how measurements were collected.

The distinction between independent clusters and conditionally independent cell residuals is important. In this model, cells are assumed independent conditional on their donor effect and predictors. Marginally, cells from the same donor are dependent. The assumption of conditional independence does not justify counting every cell as a new independent donor.

Worked Example: Donor Count Versus Cell Count

Consider a hypothetical study with four control donors and four treated donors. Each donor contributes 100 cells, giving 800 cell observations in total. Condition is constant within donor, and donors are assumed to have been independently sampled within their respective groups.

There are eight independent donor clusters, with four donors per condition. There are 800 cell measurements, but they are nested within those eight donors. Under the random-intercept model, the condition coefficient compares population-level expected responses between conditions, while each donor's \(b_j\) captures a shared departure from the relevant condition mean.

It would be incorrect to describe this design as having 400 independent biological replicates per condition. That count treats the 100 cells from each donor as if they were independently sampled donors, contrary to the shared-intercept model. More cells can describe each sampled donor more fully, but they do not increase the donor count beyond four per condition.

This example does not, by itself, determine whether the study has enough donors for reliable inference. That depends on the donor-level variability, design, and inferential procedure. It does establish which count represents independent biological replication: the donor count.

Interpreting the Condition Coefficient and Checking Assumptions

With \(x_j=0\) for control and \(x_j=1\) for treatment, the conditional expected responses are \(\beta_0+b_j\) for a control donor and \(\beta_0+\beta_1+b_j\) for a treated donor. For a donor-specific comparison with the same intercept, the intercept cancels and the modeled contrast is \(\beta_1\). At the population level, the assumed mean of \(b_j\) is zero, so \(\beta_1\) is also the difference in expected responses between the two donor populations under the model.

That interpretation relies on the model and study design. Donors must be independently sampled for the donor clusters to be independent. The random intercepts are assumed to follow a common mean-zero distribution, and residual variation is assumed to follow the specified distribution with a common variance in this simple model. The residuals must not retain substantial dependence or systematic structure that the model has omitted. If condition is confounded with batch, for example, the condition coefficient may capture a batch difference as well as a biological condition difference.

Diagnostics should therefore examine whether the chosen response scale is reasonable, whether residual patterns suggest unequal variance or a missing trend, and whether a few donors dominate the estimated contrast. Donor-level plots of observed summaries can reveal unusual donors or group separation driven by only one or two clusters. Such checks do not prove that assumptions hold; they can expose patterns that make the model interpretation doubtful. With few donors, distributional and variance assumptions are difficult to assess, and cell count alone cannot resolve that limitation.

Worked Example: Translating a Fitted Contrast

Suppose a hypothetical fitted model gives \(\hat{\beta}_1=0.30\) log-expression units for treated versus control donors, with the coding and model specified above. The coefficient is interpreted as an estimated difference in population-level expected response of \(0.30\) log-expression units, subject to the model assumptions. It is not a statement that every treated cell is \(0.30\) units above every control cell.

For a control donor with \(b_j=-0.2\), the conditional expectation is \(\beta_0-0.2\). For a treated donor with \(b_j=0.5\), it is \(\beta_0+0.30+0.5\). The observed gap between those two donor-specific expectations is \(1.0\) unit, but it combines the condition contrast \(0.30\) and the difference in donor deviations \(0.5-(-0.2)=0.7\). The population-level contrast remains \(0.30\), not \(1.0\).

This distinction matters because the random intercept accounts for donor-specific baselines rather than attributing all observed between-donor differences to condition. The estimated condition contrast is an association under the model; a causal interpretation requires an appropriate design and additional assumptions.

Common Mistakes and Alternatives

  • Counting cells as independent biological replicates. This treats shared donor effects as absent. The correction is to identify the donor clusters and base population-level replication on independently sampled donors.
  • Calling \(b_j\) the treatment effect. It is the donor-specific intercept deviation. The treatment contrast is \(\beta_1\) under the stated coding.
  • Interpreting \(\beta_1\) as a cell-by-cell difference. It is a contrast in expected response on the modeled scale, not a guarantee about every individual cell.
  • Assuming a random intercept solves every design problem. It represents a shared donor baseline. It does not correct confounding, an inappropriate response distribution, or a mismatch between the model and the sampling design.

A donor-level summary analysis is a useful alternative when the scientific target is a comparison of donor summaries: it reduces each donor to a summary and performs inference across those independent summaries. A cell-level random-intercept analysis instead retains cell observations while modeling their shared donor component. These approaches answer related questions but rely on different modeling choices, and neither creates additional independent donors. Treating cells as independent without a donor structure is not a valid substitute when within-donor dependence is present.

Key takeaway: A donor random intercept gives cells from the same donor a shared latent shift. It models their dependence, while the independently sampled donor remains the biological sampling unit for population-level comparisons.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In \(Y_{ij}=\beta_0+\beta_1x_j+b_j+\varepsilon_{ij}\), what does \(b_j\) represent, and what does \(\beta_1\) represent when \(x_j=1\) denotes treatment?
  2. Why are two cells from the same donor dependent under the model, even if their residuals are conditionally independent?
  3. A study samples six donors per condition and measures 500 cells per donor. How many independent biological donor clusters are represented, assuming donors were independently sampled?
  4. What is one assumption that should be checked before interpreting the fitted condition coefficient?

Solutions. (1) \(b_j\) is donor \(j\)'s deviation from the population-level intercept; \(\beta_1\) is the treated-versus-control contrast in expected response on the modeled scale. (2) Both outcomes contain the same random term \(b_j\), so their marginal covariance is \(\operatorname{Var}(b_j)=\tau^2\). (3) There are 12 independent donor clusters, six in each condition; the 6,000 cells are nested observations, not 6,000 independent donors. (4) Answers include checking whether the response scale and residual distribution are plausible, whether residuals show unmodeled structure, or whether condition is confounded with batch. The relevant checks depend on the design and model.

Clinical Biostats