Tutorials › Statistical Genetics › Generalized IVW With Correlated Genetic Instruments

Robust Mendelian Randomization · Tutorial 862 of 989

Generalized IVW With Correlated Genetic Instruments

Learn how to construct and use the LD covariance matrix in generalized IVW, and why ignoring correlation can distort both an MR estimate and its uncertainty.

Advanced 10 min read

What You'll Learn

  • State the summary-association model and assumptions behind generalized IVW
  • Construct an outcome-association covariance matrix from standard errors and LD correlations
  • Derive the generalized IVW estimator and its standard error
  • Calculate a correlated-instrument MR estimate from hypothetical summary data
  • Explain why diagonal weighting can misstate uncertainty and identify a common calculation error

Why Correlated Instruments Need Joint Weighting

Inverse-variance weighted Mendelian randomization (IVW) combines variant-specific exposure and outcome associations. Its familiar form treats the variants as independent: each contributes information according to its outcome-association variance. When variants are in linkage disequilibrium (LD), however, their outcome-association estimates can be correlated. Treating them as independent can count overlapping information more than once and produce an incorrect standard error; it can also change the combined estimate when the correlations and variant-specific associations differ.

Generalized IVW replaces a list of independent weights with a covariance matrix. The central idea is to compare the vector of outcome associations with the vector of exposure associations while accounting for the covariance among outcome estimates. This tutorial uses summary associations and treats the exposure-association estimates as fixed. That approximation is important: uncertainty in those estimates, especially with weak instruments, is not handled by the generalized IVW formula presented here.

Definition: Let \(K\) variants have estimated exposure associations \(\hat{\gamma}_1,\ldots,\hat{\gamma}_K\) and outcome associations \(\hat{\beta}_1,\ldots,\hat{\beta}_K\). Write their vectors as \(\hat{\boldsymbol{\gamma}}\) and \(\hat{\boldsymbol{\beta}}\). Let \(\Sigma\) be the covariance matrix of \(\hat{\boldsymbol{\beta}}\), with diagonal entries equal to the outcome-association variances. Generalized IVW is the weighted regression through the origin that uses \(\Sigma^{-1}\) to account for covariance between outcome-association estimates.

Model, Covariance, and Estimator

For a single exposure, the summary-association model is

$$ \hat{\boldsymbol{\beta}}=\theta\hat{\boldsymbol{\gamma}}+\boldsymbol{\varepsilon}, \qquad E(\boldsymbol{\varepsilon})=\boldsymbol{0}, \qquad \operatorname{Var}(\boldsymbol{\varepsilon})=\Sigma. $$

Here \(\theta\) is the causal effect, measured in outcome units per exposure unit. In this working model, the instruments have no direct effects on the outcome that violate the IVW model, and the exposure-association vector is treated as known. In practice, that last condition is an approximation: it is most defensible when exposure associations are estimated precisely. Generalized IVW does not, by itself, correct weak-instrument bias or invalid instruments.

The matrix \(\Sigma\) describes the joint uncertainty in the outcome associations. Its diagonal entries are \(s_{Yj}^{\,2}\), the squared standard errors for the respective outcome associations. Under a common approximation, when the associations use the same outcome sample and compatible genotype coding, the off-diagonal entries are

$$ \Sigma_{ij}=r_{ij}s_{Yi}s_{Yj}, $$

where \(r_{ij}\) is the signed LD correlation between variants \(i\) and \(j\). Thus, \(\Sigma=D R D\), where \(D\) is the diagonal matrix of outcome standard errors and \(R\) is the LD correlation matrix. The approximation needs suitable LD information for the analyzed variants, aligned effect alleles, and a covariance structure appropriate to the outcome-association sample. If those conditions do not hold, the covariance should not be assumed to equal this simple expression.

Generalized IVW estimator: If \(\Sigma\) is known or treated as known and invertible, and \(\hat{\boldsymbol{\gamma}}\) is treated as fixed, then $$ \hat{\theta}_{\mathrm{GIVW}} = \frac{\hat{\boldsymbol{\gamma}}^{\,T}\Sigma^{-1}\hat{\boldsymbol{\beta}}} {\hat{\boldsymbol{\gamma}}^{\,T}\Sigma^{-1}\hat{\boldsymbol{\gamma}}}. $$ Under the working model, its variance and standard error are $$ \operatorname{Var}(\hat{\theta}_{\mathrm{GIVW}}) = \frac{1}{\hat{\boldsymbol{\gamma}}^{\,T}\Sigma^{-1}\hat{\boldsymbol{\gamma}}}, \qquad SE(\hat{\theta}_{\mathrm{GIVW}}) = \frac{1}{\sqrt{\hat{\boldsymbol{\gamma}}^{\,T}\Sigma^{-1}\hat{\boldsymbol{\gamma}}}}. $$

Why the Formula Has This Form

The estimator minimizes the covariance-adjusted squared discrepancy between the observed outcome associations and the associations predicted by a proposed causal effect:

$$ Q(\theta) = (\hat{\boldsymbol{\beta}}-\theta\hat{\boldsymbol{\gamma}})^T \Sigma^{-1} (\hat{\boldsymbol{\beta}}-\theta\hat{\boldsymbol{\gamma}}). $$

The inverse covariance gives less influence to directions in the data with high uncertainty and accounts for the fact that correlated estimates do not provide independent information. To find the minimum, expand \(Q(\theta)\), differentiate with respect to \(\theta\), and set the derivative to zero:

$$ \begin{aligned} Q(\theta) &= \hat{\boldsymbol{\beta}}^T\Sigma^{-1}\hat{\boldsymbol{\beta}} -2\theta\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\beta}} +\theta^2\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\gamma}},\\ \frac{dQ}{d\theta} &= -2\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\beta}} +2\theta\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\gamma}}=0. \end{aligned} $$

Solving the last equation gives the stated estimator. Under the model, \(\hat{\boldsymbol{\beta}}=\theta\hat{\boldsymbol{\gamma}}+\boldsymbol{\varepsilon}\). Substitution into the estimator shows that its estimation error is \[ \frac{\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\boldsymbol{\varepsilon}} {\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\gamma}}}. \] Its variance is the variance of this linear combination, namely \[ \frac{\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\Sigma\Sigma^{-1}\hat{\boldsymbol{\gamma}}} {(\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\gamma}})^2} = \frac{1}{\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\gamma}}}. \] This derivation assumes the covariance matrix is correctly specified and the exposure-association vector is fixed. With estimated exposure associations, the displayed standard error does not include their uncertainty.

Worked Example: Two Correlated Variants

Suppose two hypothetical variants have exposure associations \(0.10\) and \(0.20\) exposure units per allele, and outcome associations \(0.12\) and \(0.22\) outcome units per allele. Each outcome association has standard error \(0.05\) outcome units per allele, and the variants have LD correlation \(r=0.50\). Assume aligned alleles, a suitable common outcome sample, the covariance approximation above, and the working IVW model.

The outcome covariance matrix is \[ \Sigma = 0.05^2 \begin{pmatrix}1&0.50\\0.50&1\end{pmatrix} = 0.0025 \begin{pmatrix}1&0.50\\0.50&1\end{pmatrix}. \] The inverse correlation matrix is \(\frac{4}{3}\begin{pmatrix}1&-0.50\\-0.50&1\end{pmatrix}\), so \(\Sigma^{-1}=400\cdot\frac{4}{3}\begin{pmatrix}1&-0.50\\-0.50&1\end{pmatrix}\).

Using the common factor \(400\), which cancels in the estimator, first calculate \[ \frac{4}{3} \begin{pmatrix}1&-0.50\\-0.50&1\end{pmatrix} \begin{pmatrix}0.12\\0.22\end{pmatrix} = \begin{pmatrix}0.01333\\0.2133\end{pmatrix}. \] Thus the numerator without that common factor is \[ (0.10)(0.01333)+(0.20)(0.2133)=0.001333+0.04267=0.04400. \] For the denominator, \[ \frac{4}{3} \begin{pmatrix}1&-0.50\\-0.50&1\end{pmatrix} \begin{pmatrix}0.10\\0.20\end{pmatrix} = \begin{pmatrix}0\\0.2000\end{pmatrix}, \] so \((0.10)(0)+(0.20)(0.2000)=0.04000\). Therefore, \(\hat{\theta}_{\mathrm{GIVW}}=0.04400/0.04000=1.100\) outcome units per exposure unit.

Including the common factor \(400\), the denominator \(\hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\gamma}}\) is \(16.00\). The standard error is \(1/\sqrt{16.00}=0.2500\) outcome units per exposure unit. A normal-approximation 95% confidence interval is \(1.100\pm1.96(0.2500)=[0.6100,1.590]\) outcome units per exposure unit. Under the stated model, this interval describes uncertainty in the estimated causal effect; it does not account for uncertainty in the exposure associations or model violations.

Worked Example: Strong LD Reduces the Information in Similar Variants

Consider two hypothetical variants with the same exposure association, \(0.10\) exposure units per allele, and the same outcome association, \(0.12\) outcome units per allele. Both outcome standard errors are \(0.04\) outcome units per allele, and their LD correlation is \(0.80\). Assume the same covariance and working-model conditions as in the prior example. The estimate is \(1.20\) outcome units per exposure unit, because the equal variant-specific ratios agree.

The vector of equal exposure associations lies in the direction with eigenvalue \(1+r=1.80\) in the LD correlation matrix. Therefore its information, the denominator of the variance formula, is \[ \hat{\boldsymbol{\gamma}}^T\Sigma^{-1}\hat{\boldsymbol{\gamma}} = \frac{2(0.10)^2}{(0.04)^2(1+0.80)} = \frac{0.0200}{0.00288} = 6.944. \] The generalized standard error is \(1/\sqrt{6.944}=0.3795\) outcome units per exposure unit.

If the variants were incorrectly treated as independent, the information would instead be \(2(0.10)^2/(0.04)^2=12.50\), giving standard error \(1/\sqrt{12.50}=0.2828\). That calculation counts two highly similar associations as if they provided independent information. Under the correlated model, the approximate 95% interval is \(1.20\pm1.96(0.3795)=[0.4562,1.944]\), wider than the interval based on the incorrect independence assumption. This example illustrates why positive LD can make an independence-based standard error too small when variants carry similar information; the direction of the error is not guaranteed in every data configuration.

Worked Example: Constructing a Covariance Matrix With Unequal Standard Errors

Suppose two hypothetical variants have exposure associations \(0.05\) and \(0.10\) exposure units per allele, and outcome associations \(0.08\) and \(0.13\) outcome units per allele. Their outcome standard errors are \(0.02\) and \(0.03\) outcome units per allele, and their LD correlation is \(0.30\). Assume the covariance approximation and the fixed-exposure-association working model.

The covariance of the two outcome estimates is \(0.30(0.02)(0.03)=0.00018\) squared outcome units per allele. Hence \[ \Sigma= \begin{pmatrix} 0.0004&0.00018\\ 0.00018&0.0009 \end{pmatrix}. \] For a two-by-two matrix, its inverse is its adjugate divided by its determinant. Here the determinant is \[ (0.0004)(0.0009)-(0.00018)^2 =0.0000003600-0.0000000324 =0.0000003276. \]

The common determinant cancels from the estimator. Multiplying by the adjugate, the numerator before division by that determinant is \[ (0.0009)(0.05)(0.08) -(0.00018)\{(0.05)(0.13)+(0.10)(0.08)\} +(0.0004)(0.10)(0.13) =0.000006190. \] The corresponding denominator is \[ (0.0009)(0.05)^2 -2(0.00018)(0.05)(0.10) +(0.0004)(0.10)^2 =0.000004450. \] Thus \(\hat{\theta}_{\mathrm{GIVW}}=0.000006190/0.000004450=1.391\) outcome units per exposure unit. The information is \(0.000004450/0.0000003276=13.58\), so the standard error is \(1/\sqrt{13.58}=0.2713\) outcome units per exposure unit. The unequal standard errors and nonzero covariance both contribute to this result.

What Goes Wrong When Correlation Is Ignored?

The diagonal-only IVW calculation replaces \(\Sigma\) with a diagonal matrix and assumes that the outcome-association errors are independent. When that assumption is false, the resulting estimate generally differs from generalized IVW, and the usual diagonal-only standard error need not describe the actual uncertainty. Positive LD often means that similar variants provide less independent information than the diagonal calculation assumes, but correlations can also affect the estimate itself. The impact depends on the exposure and outcome associations, the standard errors, and the pattern of LD; it is not correct to claim that ignoring correlation always shifts an estimate in one direction.

A useful diagnostic is to check whether the LD matrix matches the analyzed variant set and allele orientation, whether the covariance matrix is invertible and numerically stable, and whether the standard errors correspond to the outcome associations being combined. Highly correlated or redundant variants can make the matrix nearly singular, so its inverse can be unstable. In that situation, the analysis needs a defensible variant set or a stated covariance-handling strategy rather than an unexamined matrix inverse.

Worked Example: Detecting an Inconsistent IVW Calculation

Suppose two hypothetical exposure associations are \(0.08\) and \(0.16\) exposure units per allele, outcome associations are \(0.104\) and \(0.024\) outcome units per allele, and both outcome standard errors are \(\sqrt{0.00064}\) outcome units per allele. For this check, assume the associations are independent and use the ordinary diagonal IVW formula.

The formula weights both parts of the ratio by inverse variance: \[ \hat{\theta}_{\mathrm{IVW}} = \frac{(0.08)(0.104)/0.00064+(0.16)(0.024)/0.00064} {(0.08)^2/0.00064+(0.16)^2/0.00064} = \frac{0.01216/0.00064}{0.03200/0.00064} = \frac{19.00}{50.00} = 0.3800. \] The common variance factor cancels, so the same result is \(0.01216/0.03200=0.3800\) outcome units per exposure unit.

A tempting but inconsistent expression is \(0.01216/[0.00064(0.03200)]\). Its arithmetic is \(0.01216/0.00002048=593.75\), or \(593.8\) to four significant figures. That quotient is not an IVW estimate: it applies the inverse-variance factor to the denominator but not to the numerator. The correction is to weight both terms, or cancel the common factor from both, giving \(0.3800\). This check is especially useful when transcribing weighted-regression formulas.

Common Mistakes and Practical Interpretation

  • Using LD only as a note beside the analysis. If the variants are correlated, the covariance structure belongs in the weighting calculation; simply reporting that LD exists does not account for it.
  • Confusing the LD correlation matrix with the association covariance matrix. The correlation matrix \(R\) is dimensionless. The outcome covariance matrix is \(\Sigma=DRD\), and its entries carry the scale of the outcome-association variances.
  • Assuming a generalized standard error fixes every MR problem. It accounts for the specified covariance among outcome associations under the model. It does not establish instrument validity, remove weak-instrument bias, or incorporate exposure-association uncertainty in the formula used here.
  • Assuming the answer must match diagonal IVW. It matches in special cases, such as no correlation, but generally changes when the covariance matrix has nonzero off-diagonal entries.
  • Ignoring allele alignment. A sign reversal in a variant's effect-allele coding must be reflected consistently in association estimates and LD correlations; otherwise the covariance matrix and association vectors do not describe the same data.
Key takeaway: Generalized IVW is a covariance-weighted regression through the origin. Its estimate and standard error depend on the joint uncertainty of the variant-outcome associations, not merely on their individual standard errors. A valid LD covariance matrix is therefore part of the estimator, not an optional refinement.

Check Your Understanding

Use the model and assumptions stated above to answer these questions.

  1. What information is represented by an off-diagonal entry of \(\Sigma\), and how is it approximated using an LD correlation and two standard errors?
  2. Why does the generalized IVW standard error not, by itself, account for uncertainty in the estimated exposure associations?
  3. For two variants with identical exposure associations and positive LD, why can treating them as independent overstate the information?
  4. In the unequal-standard-error example, calculate the covariance between the outcome-association estimates from the stated correlation and standard errors.
  5. Explain why applying an inverse-variance factor to only the denominator of an IVW ratio gives an incorrect estimate.
Clinical Biostats