Tutorials › Statistical Genetics › Sample Overlap Bias in Genetic Mediation

Genetic Mediation and Selection Bias · Tutorial 879 of 989

Sample Overlap Bias in Genetic Mediation

See how participant overlap can link mediation-stage estimation errors, bias a product estimate, and be assessed using study-design details and sensitivity analysis.

Advanced 10 min read

What You'll Learn

  • Define stage-estimation errors and identify how their covariance enters a mediation product estimate
  • Derive the covariance of two genetic association estimates when participants overlap
  • State the additional conditions needed to simplify the overlap covariance formula
  • Calculate the expected product and its uncertainty under correlated stage errors
  • Assess overlap using participant-level design information and transparent sensitivity scenarios

Why Overlap Matters for a Mediation Product

A genetic mediation analysis often combines estimates from two stages. For example, one stage may estimate an effect of an exposure on a mediator, and another may estimate an effect of the mediator on an outcome. If the stage estimates are \(\hat{\alpha}\) and \(\hat{\beta}\), the product estimate of the mediated effect is \(\hat{\theta}=\hat{\alpha}\hat{\beta}\). This product is not generally unbiased merely because each stage estimate is unbiased.

The issue is that the same participants may contribute information to both stages. Their genetic association errors can then be correlated. The covariance of the two stage-estimation errors contributes directly to the expectation of the product. Its direction and size depend on the joint errors; overlap alone does not tell us whether the product shifts upward or downward.

Definition: Write \(\hat{\alpha}=\alpha+u\) and \(\hat{\beta}=\beta+v\), where \(\alpha\) and \(\beta\) are the target stage effects and \(u\) and \(v\) are their estimation errors. If both stage estimates are unbiased, so that \(E[u]=E[v]=0\), then $$ E[\hat{\alpha}\hat{\beta}]=\alpha\beta+\operatorname{Cov}(u,v). $$ The term \(\operatorname{Cov}(u,v)\) is the overlap-related contribution to the product’s bias when shared participants induce correlated errors.

This identity follows by multiplying \((\alpha+u)(\beta+v)\), then taking expectations. It applies whether the stages are simple association estimates or more complex mediation estimates, provided \(u\) and \(v\) denote the errors of the stage estimates themselves. Overlap is one possible source of their covariance; other dependence or estimation features can also contribute.

How Shared Participants Correlate Association Errors

A simple regression model makes the mechanism explicit. Suppose two studies estimate genetic association slopes for traits \(T_1\) and \(T_2\). For participant \(i\), let \(G_i\) be a centered genetic predictor, and write \(T_{1i}=\gamma_1G_i+\varepsilon_{1i}\) and \(T_{2i}=\gamma_2G_i+\varepsilon_{2i}\). Assume the regression slopes use fixed denominators \(D_1=N_1V_G\) and \(D_2=N_2V_G\), where \(N_1,N_2\) are the study sample sizes and \(V_G=\operatorname{Var}(G)>0\). For this illustration, assume participants are independent of one another, the residuals have mean zero, and the slope errors are centered. Each participant appearing in both studies contributes to both slope errors.

$$ \hat{\gamma}_1-\gamma_1 = \frac{\sum_{i\in S_1}G_i\varepsilon_{1i}}{N_1V_G}, \qquad \hat{\gamma}_2-\gamma_2 = \frac{\sum_{i\in S_2}G_i\varepsilon_{2i}}{N_2V_G}. $$

Let \(n_o\) be the number of participants shared by the studies. Because different participants are independent, cross-products of score contributions from different people have zero covariance. Only the \(n_o\) shared participants contribute to the covariance between slope errors. With fixed denominators, the general expression is

$$ \operatorname{Cov}(\hat{\gamma}_1,\hat{\gamma}_2) = \frac{n_oE[G^2\varepsilon_1\varepsilon_2]} {N_1N_2V_G^2}. $$

This form matters: a residual covariance by itself does not determine the covariance of the slopes. The score contribution contains \(G\varepsilon\), so its cross-product contains \(G^2\varepsilon_1\varepsilon_2\). The expectation of that product can depend on genotype, for example if the residual product varies with \(G\).

Condition for a common simplification: If \(G\) is independent of the residual pair \((\varepsilon_1,\varepsilon_2)\), \(E[G]=0\), \(E[\varepsilon_1]=E[\varepsilon_2]=0\), and \(\operatorname{Cov}(\varepsilon_1,\varepsilon_2)=\sigma_{12}\), then $$ E[G^2\varepsilon_1\varepsilon_2]=V_G\sigma_{12}, \qquad \operatorname{Cov}(\hat{\gamma}_1,\hat{\gamma}_2) = \frac{n_o\sigma_{12}}{N_1N_2V_G}. $$ Without the stated independence condition or another justification for the factorization, use the general expectation involving \(G^2\varepsilon_1\varepsilon_2\).

Worked Example: Association-Error Covariance Under Independence

Suppose two hypothetical studies estimate genetic association slopes with \(N_1=10{,}000\) and \(N_2=8{,}000\) participants, with \(n_o=4{,}000\) participants shared. Assume \(V_G=0.25\). For the shared participants, suppose the two residuals are centered, independent of \(G\), and have covariance \(\sigma_{12}=0.40\) in the traits’ respective units. These assumptions justify the simplified formula.

Substitute the values:

$$ \operatorname{Cov}(\hat{\gamma}_1,\hat{\gamma}_2) = \frac{4{,}000(0.40)} {10{,}000(8{,}000)(0.25)} = \frac{1{,}600}{20{,}000{,}000} = 0.0000800. $$

The estimated genetic association errors have covariance \(0.0000800\) in the product of the two slope units. Under these assumptions, positive residual covariance among shared participants produces positive covariance between the two slope errors. This calculation does not establish that the residual covariance is positive in an actual analysis; that requires relevant data or a justified sensitivity assumption.

From Correlated Stage Errors to Product Bias

The two regression slopes in the example illustrate how shared observations can create correlated association errors. A mediation product may instead use stage estimates that are ratios or other functions of genetic associations. The same product identity still applies to the stage estimates, but their error covariance must be derived or approximated for the estimators actually used. In general, if stage estimates are functions of association estimates, a first-order approximation propagates the covariance of those associations through the functions; it is not valid to substitute a raw slope covariance without accounting for that transformation.

Result: If the stage estimates are unbiased, the expected product differs from \(\alpha\beta\) by \(\operatorname{Cov}(\hat{\alpha}-\alpha,\hat{\beta}-\beta)\). If either stage estimate is biased, its bias also contributes. Writing \(b_\alpha=E[\hat{\alpha}]-\alpha\) and \(b_\beta=E[\hat{\beta}]-\beta\), the exact identity is $$ E[\hat{\alpha}\hat{\beta}] = \alpha\beta+\alpha b_\beta+\beta b_\alpha+b_\alpha b_\beta +\operatorname{Cov}(\hat{\alpha},\hat{\beta}). $$

Worked Example: The Covariance Contribution to a Product Estimate

Consider hypothetical unbiased stage estimates with target effects \(\alpha=0.30\) and \(\beta=0.50\). Suppose their error variances are \(\operatorname{Var}(u)=0.0100\) and \(\operatorname{Var}(v)=0.00250\), and their error covariance is \(0.00200\). The covariance is mathematically compatible with these variances because \(0.00200^2\leq 0.0100(0.00250)\).

The target product is \(\alpha\beta=(0.30)(0.50)=0.150\). Since both estimates are unbiased, the expected estimated product is

$$ E[\hat{\alpha}\hat{\beta}] = (0.30)(0.50)+0.00200 = 0.152. $$

Thus the product’s expectation is shifted upward by \(0.00200\), or about \(1.33\%\) of the target product. This is a statement about the expectation over repeated samples under the assumed error distribution, not a claim that every observed product will exceed \(0.150\).

For a single hypothetical realization, let \(\hat{\alpha}=0.32\) and \(\hat{\beta}=0.48\). The observed product is \((0.32)(0.48)=0.1536\). It differs from its expectation \(0.152\) because an observed pair of errors need not equal its average behavior.

Uncertainty When the Stage Estimates Are Correlated

Ignoring error covariance can also misstate the uncertainty of the product. A first-order delta-method approximation, suitable when stage-estimation errors are small relative to the estimates, is

$$ \operatorname{Var}(\hat{\alpha}\hat{\beta}) \approx \beta^2\operatorname{Var}(\hat{\alpha}) +\alpha^2\operatorname{Var}(\hat{\beta}) +2\alpha\beta\operatorname{Cov}(\hat{\alpha},\hat{\beta}). $$

The covariance term can increase or decrease this approximation, depending on its sign and on the signs of \(\alpha\) and \(\beta\). When the stage errors are jointly normal and centered, an exact variance is available:

$$ \operatorname{Var}(\hat{\alpha}\hat{\beta}) = \beta^2V_\alpha+\alpha^2V_\beta +2\alpha\beta C+V_\alpha V_\beta+C^2, $$

where \(V_\alpha=\operatorname{Var}(u)\), \(V_\beta=\operatorname{Var}(v)\), and \(C=\operatorname{Cov}(u,v)\). The additional \(V_\alpha V_\beta+C^2\) terms arise from variation in the product of the errors themselves. The first-order approximation drops these second-order terms; it should not be presented as exact when they matter.

Worked Example: Comparing Product Uncertainty With and Without Covariance

Use the hypothetical values from the previous example: \(\alpha=0.30\), \(\beta=0.50\), \(V_\alpha=0.0100\), \(V_\beta=0.00250\), and \(C=0.00200\). Under the joint-normal error assumption, the exact variance is

$$ \begin{aligned} \operatorname{Var}(\hat{\alpha}\hat{\beta}) &=(0.50)^2(0.0100)+(0.30)^2(0.00250)\\ &\quad+2(0.30)(0.50)(0.00200) +(0.0100)(0.00250)+(0.00200)^2\\ &=0.00250+0.000225+0.000600+0.0000250+0.00000400\\ &=0.003354. \end{aligned} $$

The corresponding standard deviation is \(\sqrt{0.003354}=0.0579\), in the product’s units. If one incorrectly set \(C=0\), the exact variance would be \(0.00250+0.000225+0.0000250=0.00275\), with standard deviation \(0.0524\). In this example, ignoring the positive covariance understates the product’s variability. The direction need not be the same in every setting.

Assessing Overlap and Performing Sensitivity Calculations

Overlap assessment starts with study design, not with a formula alone. Determine which cohorts contributed to each genetic association, whether participants were reused across stages, and whether overlap includes all participants or only particular subgroups. If feasible, use participant-level identifiers or cohort-specific sample counts to quantify the shared sample. Published total sample sizes alone do not usually identify the overlap.

Then assess what shared participants imply for the relevant estimation errors. For simple association slopes, this requires information about the joint residual behavior and the genotype-weighted residual product. For mediation estimators built from several associations, the needed covariance depends on how those associations enter each stage estimate. When it cannot be estimated precisely, report sensitivity calculations over plausible values rather than asserting that overlap creates a known bias.

Worked Example: Sensitivity to an Uncertain Error Correlation

Suppose a hypothetical mediation analysis has stage estimates near \(\alpha=0.25\) and \(\beta=0.40\), with standard errors \(0.08\) and \(0.05\). Let \(\rho\) denote the correlation between their estimation errors. The covariance is \(C=\rho(0.08)(0.05)=0.004\rho\). Suppose study-design information confirms some overlap, but does not determine the error correlation. Consider \(\rho=-0.40, 0,\) and \(0.40\) as sensitivity scenarios, not as estimates from the overlap count.

The target product under these stage values is \((0.25)(0.40)=0.100\). Under unbiased stage estimates, the covariance contribution gives the following expected products:

Assumed error correlation \(\rho\)Covariance \(C=0.004\rho\)Expected product \(0.100+C\)
-0.40-0.001600.0984
000.100
0.400.001600.102

Across these scenarios, the covariance contribution ranges from \(-0.00160\) to \(0.00160\) in the product’s units. This is a transparent sensitivity range conditional on the chosen correlations and unbiasedness assumption; it is not a confidence interval and does not establish which scenario is correct.

1
Map the samples.
Record the contributing cohorts, sample sizes, shared participants, and whether overlap differs across the mediation stages.
2
Identify the estimators.
Write each stage estimate as a function of its genetic association estimates, so the relevant error covariance is clear.
3
Quantify or vary the covariance.
Estimate it from suitable data when possible; otherwise calculate results over explicitly stated plausible covariance or correlation values.
4
Report the consequence.
Show how the product’s expectation and uncertainty change, and state the assumptions that make each calculation applicable.

Common Mistake and Key Takeaway

A common mistake is to reason, “The studies overlap, so the product estimate must be biased upward,” or to calculate slope covariance from the residual covariance without checking the genotype-residual relationship. Neither conclusion follows from overlap by itself. The covariance can be positive, negative, or near zero, and the simplified slope formula requires conditions that justify factoring \(E[G^2\varepsilon_1\varepsilon_2]\).

The key diagnostic is to separate three questions: who was shared, how shared participants’ score contributions covary, and how the association errors propagate into the mediation-stage estimators. The product identity then makes the consequence precise: for unbiased stages, their error covariance is added to the target mediated product. Reporting overlap counts, assumptions, and sensitivity results makes that contribution interpretable without overstating what the design information establishes.

Check Your Understanding

Answer these questions using the definitions and conditions above.

  1. If both stage estimates are unbiased but their errors have covariance \(-0.003\), how does their expected product compare with \(\alpha\beta\)?
  2. Why does the general covariance of two overlapping association slopes involve \(E[G^2\varepsilon_1\varepsilon_2]\), rather than only \(\operatorname{Cov}(\varepsilon_1,\varepsilon_2)\)?
  3. State a sufficient condition under which \(E[G^2\varepsilon_1\varepsilon_2]=V_G\sigma_{12}\).
  4. Why is the number of overlapping participants insufficient by itself to determine the direction of product bias?
  5. In a sensitivity analysis, what does a range of assumed error correlations show, and what does it not show?
Clinical Biostats