Tutorials › High-Dimensional Genomic Data Analysis › Bias From Sample Overlap

Mendelian Randomization · Tutorial 688 of 795

Bias From Sample Overlap

Learn to quantify the error correlation caused by sample overlap, understand when it can bias Mendelian randomization toward the observational association, and assess its practical importance.

Advanced 12 min read

What You'll Learn

  • Derive the covariance between SNP–exposure and SNP–outcome association errors when participants overlap.
  • Distinguish correlated errors from bias in a strong-instrument estimate.
  • Explain why overlap can pull weak-instrument estimates toward a confounded observational association.
  • Calculate an approximate error correlation from sample sizes, overlap, and residual phenotype correlation.
  • Assess overlap using cohort provenance, instrument strength, and sensitivity to non-overlapping data.

Why Sample Overlap Matters

In two-sample Mendelian randomization (MR), SNP–exposure associations are estimated in one sample and SNP–outcome associations in another. Calling the design “two-sample” does not guarantee that the participant sets are disjoint: some participants may contribute to both genome-wide association studies (GWAS). When they do, random fluctuations in their exposure and outcome measurements can be shared. The resulting association-estimation errors are correlated.

That correlation matters most when instruments are weak. With strong instruments, the association estimates are relatively precise, so shared sampling error is usually a small part of the MR estimate. With weak instruments, the errors can be large relative to the genetic associations. In a conventional linear setting with residual exposure–outcome correlation, overlap can then pull the estimate toward the observational association, which may itself reflect confounding. Overlap does not automatically cause bias in every setting: the direction and size depend on the error covariance, instrument strength, and analysis.

Definition: Sample overlap occurs when one or more individuals contribute to both the sample used to estimate SNP–exposure associations and the sample used to estimate SNP–outcome associations. For a variant \(j\), write the estimated associations as \(\hat{\gamma}_j=\gamma_j+u_j\) and \(\hat{\Gamma}_j=\Gamma_j+v_j\), where \(\gamma_j\) and \(\Gamma_j\) are the underlying associations and \(u_j\) and \(v_j\) are sampling errors. Overlap can make \(\operatorname{Cov}(u_j,v_j)\ne 0\).

Where the Correlated Errors Come From

Consider a single variant \(G\), coded numerically, and suppose the GWAS association estimates are ordinary least-squares slopes after adjustment for the same relevant covariates. Let \(e_X\) and \(e_Y\) denote the residuals for exposure and outcome after those adjustments. Assume participants are independent of one another, the variant is independent of these residuals, the same variant coding is used in both studies, and the regression designs are comparable. Write \(\operatorname{Var}(G)\) for the variance of the variant in the analyzed population. If \(m\) participants are shared between samples of sizes \(n_X\) and \(n_Y\), then the approximate covariance of the two slope errors is

$$ \operatorname{Cov}(u,v)\ \approx\ \frac{m}{n_Xn_Y}\, \frac{\operatorname{Cov}(e_X,e_Y)}{\operatorname{Var}(G)}. $$

This follows from the regression-slope score. In a simplified centered design, each slope error is approximately a sum of genotype–residual products divided by the total genotype sum of squares. Products from non-overlapping participants contribute no cross-covariance, because their observations are independent. Each of the \(m\) shared participants contributes a covariance proportional to \(\operatorname{Var}(G)\operatorname{Cov}(e_X,e_Y)\). Dividing by the two genotype-sum denominators, approximately \(n_X\operatorname{Var}(G)\) and \(n_Y\operatorname{Var}(G)\), gives the expression above. Covariate adjustment and unequal designs can change the precise calculation; the formula is a useful approximation under the stated conditions.

The formula separates three ingredients: how many participants are shared, how strongly the residual exposure and outcome vary together, and how precisely each association is estimated. A positive residual covariance produces positive covariance between the association errors; a negative residual covariance produces negative covariance. If the residual covariance is zero, this source of correlated errors is absent even when participants overlap.

Worked Example: Estimating the Error Correlation

Suppose an exposure GWAS has \(n_X=100{,}000\) participants and an outcome GWAS has \(n_Y=80{,}000\), with \(m=30{,}000\) shared participants. For one variant, suppose \(\operatorname{Var}(G)=1\), the residual standard deviations are \(0.8\) for the exposure and \(0.7\) for the outcome, and the residual correlation is \(0.4\). Check that the assumptions for the approximation are plausible: take the samples as independent across individuals, the genotype as independent of the residuals, and the regression designs as comparable.

The residual covariance is \(0.4(0.8)(0.7)=0.224\). Thus the approximate covariance between the association errors is

$$ \operatorname{Cov}(u,v)\approx \frac{30{,}000}{(100{,}000)(80{,}000)} \frac{0.224}{1} =8.40\times 10^{-7}. $$

The approximate standard errors of the two slopes are \(0.8/\sqrt{100{,}000}=0.00253\) and \(0.7/\sqrt{80{,}000}=0.00247\). Therefore, their error correlation is approximately

$$ \operatorname{Corr}(u,v)\approx \frac{8.40\times10^{-7}}{(0.00253)(0.00247)} \approx 0.134. $$

The errors are positively correlated, but the correlation is not close to one. It describes dependence between the two estimated associations, not a correlation between the true genetic effects. It also does not by itself quantify the bias in an MR estimate.

Why Weak Instruments Can Pull an Estimate

To isolate the overlap mechanism, suppose variants are valid instruments in a linear model: \(\Gamma_j=\theta\gamma_j\), where \(\theta\) is the causal effect, and there is no direct effect of a variant on the outcome outside the exposure. Assume the variants are independent or have been handled so their estimation errors can be treated as independent across variants. Consider the inverse-variance weighted slope through the origin, with fixed positive weights \(w_j\):

$$ \hat{\theta}_{\mathrm{IVW}}= \frac{\sum_j w_j\hat{\gamma}_j\hat{\Gamma}_j} {\sum_j w_j\hat{\gamma}_j^2}. $$

Let \(G_0=\sum_jw_j\gamma_j^2\), \(U=\sum_jw_j\operatorname{Var}(u_j)\), and \(C=\sum_jw_j\operatorname{Cov}(u_j,v_j)\). Using \(\hat{\gamma}_j=\gamma_j+u_j\) and \(\hat{\Gamma}_j=\theta\gamma_j+v_j\), with mean-zero errors,

$$ E\!\left[\sum_jw_j\hat{\gamma}_j\hat{\Gamma}_j\right] =\theta G_0+C, \qquad E\!\left[\sum_jw_j\hat{\gamma}_j^2\right] =G_0+U. $$

When the sums are sufficiently concentrated, their ratio is approximately the ratio of these expectations:

$$ \hat{\theta}_{\mathrm{IVW}}\ \text{is centered approximately at}\ \frac{\theta G_0+C}{G_0+U} = \theta+\frac{C-\theta U}{G_0+U}. $$

This approximation shows why overlap is not synonymous with bias. The error variance \(U\) contributes to the denominator and, by itself, tends to attenuate the slope. The covariance term \(C\) contributes to the numerator; when it is positive, it can counteract that attenuation or move the estimate in a positive direction. The net shift depends on both terms and on the true causal effect.

A complementary view comes from expanding a single-variant ratio estimate when \(\gamma\ne0\). Under valid-instrument assumptions, \(\hat{\theta}=(\theta\gamma+v)/(\gamma+u)\). For errors small relative to \(\gamma\), a second-order expansion gives

$$ \hat{\theta}\approx \theta+\frac{v}{\gamma}-\frac{\theta u}{\gamma} -\frac{uv}{\gamma^2}+\frac{\theta u^2}{\gamma^2}, \qquad E(\hat{\theta})-\theta\approx \frac{\theta\operatorname{Var}(u)-\operatorname{Cov}(u,v)}{\gamma^2}. $$

This is a local approximation, not a reliable formula for a very weak single instrument: ratios can behave erratically when \(\hat{\gamma}\) is near zero. It makes the key role of covariance visible, while also showing that the net bias is not determined by overlap alone.

Worked Example: A Weak-Instrument Shift Toward a Confounded Association

Suppose a set of approximately independent variants has \(G_0=0.040\), \(U=0.010\), and causal effect \(\theta=0.20\), in arbitrary but consistent slope units. The instruments are valid, and the weighted sums are assumed concentrated enough for the ratio-of-expectations approximation above to be informative. Suppose shared participants induce \(C=0.006\). The approximate IVW center is

$$ \frac{(0.20)(0.040)+0.006}{0.040+0.010} = \frac{0.014}{0.050} =0.280. $$

For comparison, if the same error variance \(U\) were present but the errors were independent, so \(C=0\), the approximation would give \(0.008/0.050=0.160\). The positive covariance has moved the estimate upward from that independent-error value. If the confounded observational association in this hypothetical setting is \(0.35\), the overlap-shifted value \(0.280\) is closer to it than \(0.160\) is. This illustrates a possible direction of bias; it does not establish that every overlapping analysis moves toward the observational association or that the amount of movement is known from \(C\) alone.

When the Observational Association Is the Direction of Bias

The familiar statement that overlap pulls weak-instrument MR toward the observational association applies under a more specific set of conditions. In a linear setting, suppose the exposure and outcome share participants, the residual exposure–outcome covariance is nonzero, and the instruments are weak enough that sampling error matters. In a one-sample instrumental-variable analysis, the estimated genetic associations are formed from the same individuals; their shared residual variation can make the first-stage and reduced-form estimates co-move. In standard finite-sample settings, this weak-instrument behavior pulls the estimate toward the exposure–outcome association seen in those participants, which can include confounding.

For two-sample MR, complete separation of the samples removes this particular cross-sample error covariance. As overlap increases, some of the protection afforded by independent samples is lost. Under comparable designs and standard linear assumptions, the bias can be described approximately as increasing with the fraction of shared participants, from the independent-sample behavior toward the one-sample behavior. This is a useful rule of thumb, not a universal correction formula. Different sample sizes, covariate adjustments, phenotype definitions, variant selection, and residual structures can all affect the relationship.

“Toward the observational association” does not mean “equal to the observational association.” Nor does it mean that the observed association is necessarily a causal effect. The observational association may be affected by confounding, reverse causation, measurement error, or selection. If residual exposure–outcome covariance is near zero, overlap may contribute little of this particular bias. If it has the opposite sign, the overlap-related shift may be in the opposite direction.

Worked Example: Scaling Error Correlation With Partial Overlap

Suppose both studies have \(100{,}000\) participants, \(60{,}000\) are shared, genotype variance is one, and both residual standard deviations are one. Take the residual correlation to be \(0.30\). The samples are assumed independent outside the shared participants, with comparable regression designs and genotype independent of residuals. The residual covariance is \(0.30\), so

$$ \operatorname{Cov}(u,v)\approx \frac{60{,}000}{(100{,}000)^2}(0.30) =1.80\times10^{-6}. $$

Each association has approximate standard error \(1/\sqrt{100{,}000}=0.00316\). Their error correlation is therefore

$$ \operatorname{Corr}(u,v)\approx \frac{1.80\times10^{-6}}{(0.00316)^2} \approx 0.180. $$

With equal study sizes in this example, the result is \(0.60(0.30)=0.18\): the overlap fraction multiplies the residual correlation. If the full-overlap weak-instrument bias were, for illustration, 20% of the distance from the causal effect to the confounded observational association, a simple linear scaling would suggest about 12% at 60% overlap. That last calculation is only a rough design-based heuristic; it is not a general method for correcting an MR estimate.

Assessing Practical Impact

A useful assessment begins with study provenance rather than with a numerical correction. Determine whether the exposure and outcome GWAS share a cohort, biobank, or recruitment source; if possible, obtain the number of shared participants and the sample sizes contributing to each variant association. A statement that the studies are “independent” should be supported by the data sources, not inferred from the fact that they report separate results.

Next consider how consequential the overlap may be. The concern is greater when instruments are weak, overlap is substantial, and residual exposure–outcome correlation is appreciable. The approximate covariance formula can help quantify error dependence when the relevant sample sizes, residual covariance, and design details are available. In practice, those quantities may be difficult to estimate exactly, especially after different covariate adjustments or meta-analysis across cohorts.

Where feasible, compare the main analysis with estimates based on non-overlapping exposure and outcome samples, or with exposure and outcome estimates drawn from independent cohorts. A material change can indicate sensitivity to overlap, although different populations, phenotype measurement, and instrument selection can also explain a change. If removing overlap is not possible, report the known or estimated overlap and interpret weak-instrument estimates cautiously. Do not treat a simple overlap-fraction calculation as a universal bias correction.

1
Map the samples.
Identify the cohorts contributing to each GWAS and quantify shared participants where possible.
2
Assess the ingredients.
Consider instrument strength, overlap size, residual exposure–outcome correlation, and whether regression designs are comparable.
3
Compare feasible designs.
Check whether an analysis using independent or non-overlapping samples gives a similar estimate, while noting other differences between samples.
4
Interpret proportionately.
Describe overlap as a possible source of correlated estimation error and weak-instrument bias, not as proof that the estimate is invalid or as a known numerical correction.

Common Mistakes and Limitations

  • Assuming overlap always creates bias. Overlap can correlate errors, but its effect depends on residual covariance and instrument strength. If the relevant residual covariance is zero, this mechanism is absent.
  • Confusing error correlation with causal-effect correlation. The covariance concerns sampling errors in estimated genetic associations. It does not say that true variant effects on exposure and outcome are correlated in a particular way.
  • Claiming that every overlapping estimate moves toward the observational association. That is a standard weak-instrument result under particular linear conditions, not a universal rule. The sign and size of the shift can differ outside those conditions.
  • Applying the overlap fraction as an exact correction. Proportional scaling is a heuristic under comparable designs; it cannot replace a study-specific calculation or an analysis using independent samples.
  • Ignoring design differences. Different covariate adjustments, phenotype definitions, ancestry composition, or cohort weighting can make the simple covariance approximation inaccurate.

The central practical point is that sample overlap changes the dependence structure of summary association errors. It is most concerning when instruments are weak and residual phenotypes covary, but its impact should be evaluated in the context of the actual GWAS designs.

Check Your Understanding

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

  1. If the exposure and outcome studies overlap but their adjusted residuals have zero covariance, what does the covariance approximation imply about this source of correlated errors?
  2. Two studies have equal sample sizes \(n\), with fraction \(f\) of participants shared. If genotype variance and residual standard deviations are both one and the residual correlation is \(r\), derive the approximate correlation between the two association errors.
  3. Why can a positive covariance between association errors affect an IVW estimate even though each association error has mean zero?
  4. Under what conditions is it reasonable to say that overlap pulls weak-instrument MR toward the observational association?
  5. Why is multiplying a full-overlap bias estimate by the overlap fraction not a universal correction?

Solutions. (1) The approximation gives \(\operatorname{Cov}(u,v)\approx0\); overlap alone does not create this covariance when the adjusted residual covariance is zero. (2) Here \(m=fn\), so \(\operatorname{Cov}(u,v)\approx (fn/n^2)r=fr/n\). Each slope has standard error approximately \(1/\sqrt{n}\), giving error correlation \((fr/n)/(1/n)=fr\). (3) Although the errors average to zero separately, their product has expectation \(\operatorname{Cov}(u,v)\), which contributes to the numerator \(\sum_jw_j\hat{\gamma}_j\hat{\Gamma}_j\). (4) The statement is appropriate for standard linear settings with weak instruments, shared participants, and nonzero residual exposure–outcome correlation, where shared sampling variation links the first-stage and reduced-form estimates. It is not guaranteed in every design. (5) The relation depends on study sizes, residual covariance, regression designs, instrument strength, and other features; linear scaling is only a heuristic under comparable conditions.

Clinical Biostats