Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Influential Donors in Population Inference

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

Influential Donors in Population Inference

Use donor-level regression diagnostics to distinguish unusual covariate patterns from influential observations and to assess how strongly individual donors can affect an estimate.

Advanced 12 min read

What You'll Learn

  • Define leverage and residuals for a donor-level linear model.
  • Distinguish high-leverage donors, outlying responses, and influential donors.
  • Calculate leverage and Cook’s distance from hypothetical donor-level data.
  • Interpret DFBETAS and common diagnostic thresholds cautiously.
  • Identify assumptions, warning signs, and limitations of standard influence measures.

Why Influence Matters at the Donor Level

A population estimate can be strongly affected by one donor, even when the analysis correctly treats donors—not cells—as the independent units of biological replication. This can happen because a donor has an unusual outcome, because the donor has an unusual value of a covariate, or because both features occur together. The question is not merely whether a donor looks unusual. It is whether the fitted estimate or its uncertainty depends substantially on that donor.

Influence diagnostics make that question concrete. They combine information about a donor’s covariate position, its residual from the model, and the resulting change in fitted coefficients. A diagnostic flag is a prompt to investigate the model and the data, not a rule for discarding a donor. The target remains the population-level quantity defined by the analysis.

Leverage, Residuals, and Influence

Consider a linear model fitted to \(n\) donors. Let \(y_i\) be the donor-level response for donor \(i\), and let \(x_i\) be that donor’s row of model predictors, including an intercept if the model has one. In matrix form, write \(y=X\beta+\varepsilon\), where \(X\) has full column rank and \(p\) columns. The least-squares estimate is \(\hat{\beta}=(X'X)^{-1}X'y\). For the usual diagnostic formulas, assume the donor-level errors are independent, have mean zero, and have common variance \(\sigma^2\); normality is additionally used for exact small-sample distributional results, not to define leverage or Cook’s distance.

Definition: The leverage of donor \(i\) is \(h_{ii}\), the \(i\)th diagonal element of the hat matrix \(H=X(X'X)^{-1}X'\). The residual is \(e_i=y_i-\hat{y}_i\), the observed donor response minus the model’s fitted response. A donor is influential when its inclusion has a substantial effect on fitted coefficients or another stated analysis target.

Leverage depends on the predictors, not on the observed response. It measures how unusual the donor’s predictor values are relative to the other donors in the fitted model. The diagonal elements satisfy \(0\leq h_{ii}\leq1\) and \(\sum_i h_{ii}=p\). Thus the average leverage is \(p/n\), but a donor can have much greater leverage than this average. A residual measures lack of fit in the response direction; a large residual does not by itself mean that the donor has high leverage.

Influence combines these features. A donor with high leverage but a small residual may have little effect on the fit. A donor with a large residual but ordinary leverage may also have limited effect on a particular coefficient. The greatest concern is often a donor with both unusual predictors and a residual that pulls the fitted model toward itself.

Worked Example: Identifying a High-Leverage Donor

Suppose five hypothetical donors have a continuous donor-level covariate \(x\), such as a baseline clinical score, with values \(0,1,2,3,8\). A regression includes an intercept and this covariate. Calculate the leverage values and identify unusual predictor placement.

For simple linear regression with an intercept, \(h_{ii}=1/n+(x_i-\bar{x})^2/S_{xx}\), where \(\bar{x}\) is the mean covariate value and \(S_{xx}=\sum_i(x_i-\bar{x})^2\). Here, \(\bar{x}=14/5=2.8\), and \(S_{xx}=7.84+3.24+0.64+0.04+27.04=38.8\). Therefore the leverage for the donor with \(x=8\) is \(0.2+27.04/38.8=0.8969\).

The other leverage values are \(0.2+7.84/38.8=0.4021\), \(0.2+3.24/38.8=0.2835\), \(0.2+0.64/38.8=0.2165\), and \(0.2+0.04/38.8=0.2010\). They sum to \(2.000\), as expected because the model has \(p=2\) fitted coefficients. The donor at \(x=8\) has much greater leverage than the others and the average leverage \(p/n=0.4\). This identifies unusual predictor placement, but the response and residual must still be examined before judging influence.

Cook’s Distance and Coefficient-Specific Influence

Cook’s distance summarizes how much the fitted coefficient vector changes when one donor is omitted. Let \(\hat{\beta}_{(i)}\) denote the coefficient estimate with donor \(i\) omitted, and let \(MSE=\sum_i e_i^2/(n-p)\) be the residual mean square from the full fit. When \(n>p\) and \(h_{ii}<1\), Cook’s distance is

$$ D_i=\frac{(\hat{\beta}-\hat{\beta}_{(i)})'X'X(\hat{\beta}-\hat{\beta}_{(i)})}{p\,MSE} =\frac{e_i^2}{p\,MSE}\frac{h_{ii}}{(1-h_{ii})^2}. $$

The first expression is a scaled distance between the full-model and donor-omitted coefficient vectors. The second shows why Cook’s distance responds to both the residual and leverage. A large value means that the fitted coefficients are sensitive to that donor relative to the residual variation in the full fit. It is not a p-value, nor does it test whether a donor is erroneous.

The coefficient-specific diagnostic DFBETAS is useful when the main concern is one particular coefficient. For coefficient \(j\), define \(\mathrm{DFBETAS}_{ij}=(\hat{\beta}_j-\hat{\beta}_{j(i)})/[s_{(i)}\sqrt{[(X'_{(i)}X_{(i)})^{-1}]_{jj}}]\), where \(s_{(i)}^2\) is the residual mean square in the model omitting donor \(i\), and \(X_{(i)}\) is the design matrix without that donor. Its sign indicates the direction of the coefficient change; its magnitude is scaled by the coefficient’s deletion-fit standard error. Cook’s distance summarizes change across coefficients, whereas DFBETAS can reveal that influence is concentrated in a coefficient of scientific interest.

Why the Cook’s Distance Formula Works

The deletion identity underlying Cook’s distance can be justified directly. Write \(A=(X'X)^{-1}\). The full fit satisfies \(X'X\hat{\beta}=X'y\). If donor \(i\) is removed, the new normal equations are \((X'X-x_ix_i')\hat{\beta}_{(i)}=X'y-x_i y_i\). Solving these equations gives the coefficient change

$$ \hat{\beta}-\hat{\beta}_{(i)} =\frac{A x_i e_i}{1-h_{ii}}. $$

To verify the identity, substitute \(\hat{\beta}_{(i)}=\hat{\beta}-A x_i e_i/(1-h_{ii})\) into the deletion equations. Since \(x_i'Ax_i=h_{ii}\) and \(y_i=x_i'\hat{\beta}+e_i\), the left side becomes \(X'y-x_i x_i'\hat{\beta}-x_i e_i=X'y-x_i y_i\), which is the required right side. The denominator shows why a donor with leverage near one can have a large effect even when its residual is not large.

Substituting the identity into the quadratic distance gives the second Cook’s distance expression: the quadratic numerator is \(e_i^2h_{ii}/(1-h_{ii})^2\), because \(x_i'Ax_i=h_{ii}\). Dividing by \(p\,MSE\) yields the stated formula. If \(h_{ii}=1\), the deletion fit is not identified by the remaining design in the usual way, and this formula is not applicable.

Worked Example: Cook’s Distance in a Donor-Level Regression

Use the five covariate values in the previous example, and suppose the hypothetical donor-level outcomes are \(1,2,3,4,9.5\). These outcomes are close to a linear trend, with the last donor slightly above the value \(9\) that would continue the first four outcomes’ pattern. For the last donor, \(h_{ii}=0.8969\). The fitted residual for this donor is approximately \(e_i=0.05155\); the full-model residual sum of squares is approximately \(0.02577\), so \(MSE=0.02577/(5-2)=0.008591\).

There are \(p=2\) coefficients. Thus

$$ D_i=\frac{(0.05155)^2}{2(0.008591)} \frac{0.8969}{(1-0.8969)^2} \approx 13.0. $$

The donor’s residual is small in the response’s units, but its leverage is high; Cook’s distance is consequently large. This is a warning that the fitted regression coefficients may depend strongly on this donor, not proof that the observation is invalid. The small residual variance also contributes to the scale of the diagnostic, so the fitted values, measurement process, model specification, and scientific context all need review.

Influence in a Donor-Level Mean

The simplest population inference from donor-level paired contrasts is an intercept-only model: \(y_i\) is the contrast for donor \(i\), and the fitted intercept estimates the mean contrast across donors. This case illustrates that influence is relevant even without covariates. All donors have leverage \(1/n\); differences in residuals, rather than predictor placement, drive their Cook’s distances.

Worked Example: An Unusual Donor Contrast

Suppose six hypothetical donors have paired log-expression contrasts, in log base 2 units, of \(0.2,0.3,0.1,0.4,0.2,1.4\). The estimated mean contrast is \(\bar{y}=2.6/6=0.4333\) log base 2 units. The residual for the sixth donor is \(1.4-0.4333=0.9667\) log base 2 units.

The sum of squared residuals is approximately \(1.1733\), so the residual mean square is \(MSE=1.1733/(6-1)=0.2347\). For an intercept-only model, \(p=1\) and \(h_{ii}=1/6\). Therefore, for donor six,

$$ D_6=\frac{(0.9667)^2}{0.2347} \frac{1/6}{(1-1/6)^2} \approx 0.956. $$

The value exceeds the rough \(4/n=0.667\) screening reference sometimes used for Cook’s distance. It flags donor six for review because its contrast is far from the fitted mean and could affect the population estimate. It does not establish that the donor should be excluded. The contrast’s direction and size should be checked against the study design and measurement process, and the estimate should be reported with the donor-level replication made clear.

Reading Diagnostics Without Overinterpreting Them

Common screening references include \(h_{ii}>2p/n\) or \(3p/n\) for potentially high leverage, \(D_i>4/n\) for a potentially influential donor, and absolute DFBETAS values larger than about \(2/\sqrt{n}\). These are heuristics, not universal cutoffs or formal hypothesis tests. Their behavior depends on sample size, model structure, the predictor distribution, and the scientific target. With few donors, one observation can substantially affect a threshold, and no single reference should determine the conclusion.

Useful diagnostics include plotting residuals against fitted values and donor-level covariates, inspecting leverage and Cook’s distance together, and checking whether flagged donors have data-quality or design features that explain their position. A large raw residual should be interpreted in the response’s units; a standardized residual can help compare residuals when the fitted values of their standard errors differ. Diagnostics should be checked at the level at which the model is fitted. Treating cells from one donor as independent observations would not make a donor-level influence assessment valid.

Standard least-squares formulas apply to the specified linear model with independent, equal-variance donor errors. In weighted regression, generalized least squares, or mixed models, the relevant leverage and influence definitions depend on the fitted model and estimation procedure; ordinary least-squares cutoffs should not be transferred mechanically. Robust standard errors change uncertainty estimation, but do not by themselves prevent a donor from strongly affecting the coefficient estimate.

Influence diagnostics differ from several alternatives. Residual plots assess model fit but do not summarize coefficient change. Leverage alone identifies unusual predictor configurations but ignores the outcome. A robust regression may reduce sensitivity to some outlying responses, but it changes the fitting procedure and potentially the estimand; it is not a neutral substitute for examining influential donors. A full analysis of how estimates change under repeated donor removal is a separate sensitivity analysis. Here, deletion-based quantities serve as diagnostics for identifying dependence, not as a reason to repeatedly search for a preferred result.

Common Mistakes and Limitations

  • Calling every high-leverage donor influential. Leverage concerns predictors only. Check the residual and the coefficient-change measure as well.
  • Calling an influential donor an outlier or an error. A donor can be accurately measured and still have substantial influence. Verify records and design details rather than assuming a mistake.
  • Removing donors because a threshold is exceeded. A cutoff is a screening reference, not an exclusion rule. Any exclusion requires a defensible, preferably prespecified reason independent of the desired result.
  • Confusing a large Cook’s distance with statistical significance. Cook’s distance measures sensitivity of the fitted coefficients; it is not a p-value and says nothing by itself about whether an effect is biologically important.
  • Ignoring model assumptions or the replication unit. A diagnostic from a misspecified model, or one fitted as if cells were independent when donors are the inferential units, cannot repair the underlying analysis.

These measures are conditional on the model and observed donors. They cannot establish that the observed donors represent every population of interest, detect every form of misspecification, or resolve uncertainty caused by having very few donors. Report influential observations transparently, retain biologically justified donors in the primary analysis, and explain any separate sensitivity checks.

Key takeaway: Leverage describes predictor unusualness, residuals describe response discrepancy, and influence describes impact on the fitted estimate. Assess them together at the donor level, treat thresholds as prompts for investigation, and never use a diagnostic flag alone as an exclusion rule.

Check Your Understanding

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

  1. In a linear regression with an intercept and three donor-level predictors, what is \(p\), and what is the average leverage across \(n\) donors?
  2. Can a donor have high leverage and little influence? Explain which additional quantity matters.
  3. A donor has a large Cook’s distance. Does this mean the null hypothesis is false or that the donor is erroneous?
  4. Why should a Cook’s distance threshold not be used as an automatic exclusion rule?

Solutions. (1) There are four coefficients, including the intercept, so \(p=4\); average leverage is \(p/n=4/n\). (2) Yes. Leverage depends on predictors, and influence also depends on the residual and resulting coefficient change; a high-leverage donor with a small residual may have limited impact. (3) No. Cook’s distance is a scaled diagnostic of coefficient sensitivity, not a hypothesis test or data-validity test. (4) The threshold is a heuristic whose behavior depends on the model and sample; a flag prompts investigation, while exclusion needs an independent, defensible justification.

Clinical Biostats