Tutorials › High-Dimensional Genomic Data Analysis › Diagnosing Inconsistent Summary Statistics and LD

Statistical Fine-Mapping and Credible Sets · Tutorial 713 of 795

Diagnosing Inconsistent Summary Statistics and LD

Learn how to check summary statistics and LD for internal consistency before interpreting a fine-mapping result.

Advanced 10 min read

What You'll Learn

  • State the assumptions behind the Gaussian summary-statistic model used for diagnostic checks.
  • Predict the z-score pattern expected from a proposed causal variant and compare it with observed values.
  • Interpret residuals while accounting for their covariance and the effects of selecting a signal.
  • Check whether an LD matrix has the basic properties of a correlation matrix.
  • Recognize how allele coding, variant order, and implausible fitted effects can reveal incompatibilities.
  • Distinguish diagnostic warning signs from formal evidence that a particular cause is responsible.

Why Check the Inputs Before Interpreting Fine-Mapping

Fine-mapping combines association summary statistics with linkage disequilibrium (LD) to distinguish variants that could explain an observed signal. That combination relies on an important premise: the signed association statistics and the LD matrix describe the same variants, in the same order and allele orientation, and are compatible with the model used to connect them. If this premise fails, the resulting posterior probabilities can look precise while reflecting a mismatch in the inputs.

This tutorial focuses on checks for internal consistency, not on identifying or correcting every possible source of mismatch. A surprising residual or invalid matrix is a reason to investigate the data and analysis pipeline; it does not, by itself, prove which input is wrong.

The Model Behind the Checks

For a clear reference model, suppose there are \(m\) variants, the signed \(z\)-scores are collected in \(z\), and the LD matrix is \(R\). Assume genotypes have been centered and scaled to variance one, the phenotype is standardized, and all variants use the same sample of size \(N\). In a linear model with effect vector \(\beta\), where \(\beta_j\) is the phenotype change in standard deviations per one standard deviation of genotype \(j\), the usual Gaussian summary-statistic approximation is

$$ z \sim N\!\left(\sqrt{N}R\beta,\ R\right). $$

This approximation treats \(R\) as the correlation matrix of the standardized genotypes. It presumes compatible variant definitions and allele coding, and a common analysis sample and model across variants. With covariate-adjusted analyses, the approximation requires that the summary statistics and LD represent compatible residualized genotype relationships. If sample sizes or analysis procedures vary substantially across variants, this simple common-\(N\) form may not apply as written.

The model is useful here because it specifies two things to check: the expected pattern of \(z\)-scores under a proposed effect configuration, and the covariance structure of deviations from that pattern. It is not a guarantee that the model is an exact description of every genome-wide association analysis.

Definition: For proposed effect vector \(\beta\), the fitted mean \(z\)-score vector is \(\hat{\mu}_z=\sqrt{N}R\beta\). The residual vector is \(e=z-\hat{\mu}_z\). A large residual is a discrepancy between the observed and fitted pattern; its size must be judged in light of the residual covariance, the model assumptions, and how the effects were chosen.

A One-Variant Pattern and Its Residuals

A useful diagnostic is to ask what pattern would be expected if variant \(i\) were the only causal variant. Let \(R_{:,i}\) denote column \(i\) of \(R\). Under this one-variant model, \(\beta_j=0\) for \(j\ne i\), so

$$ E(z)=\sqrt{N}\beta_i R_{:,i}. $$

Because \(R_{ii}=1\), the expected \(z\)-score at the proposed causal variant is \(\sqrt{N}\beta_i\). A simple fitted effect is therefore \(\hat{\beta}_i=z_i/\sqrt{N}\), giving fitted scores \(\hat{\mu}_z=z_iR_{:,i}\). Comparing this predicted LD pattern with the observed \(z\)-scores is informative, but it is not a stand-alone test of the one-variant model.

There is a covariance detail that matters. Under the Gaussian model, the conditional distribution of the other \(z\)-scores given \(z_i\) has mean \(R_{-i,i}z_i\) and covariance \(R_{-i,-i}-R_{-i,i}R_{i,-i}\). Thus, residuals for other variants are generally correlated; treating each as an independent discrepancy can mislead. Also, if variant \(i\) was selected because it had the largest observed association, residuals calculated after that selection are not ordinary, pre-specified test statistics.

Worked Example: A One-Variant Fit With Small Residuals

Consider three hypothetical variants with \(N=10{,}000\), observed signed \(z\)-scores \(z=(5.0,3.4,1.1)^T\), and

$$ R= \begin{pmatrix} 1 & 0.6 & 0.2\\ 0.6 & 1 & 0.3\\ 0.2 & 0.3 & 1 \end{pmatrix}. $$

Suppose variant 1 is the proposed sole causal variant. The fitted standardized effect is \(\hat{\beta}_1=z_1/\sqrt{N}=5.0/100=0.0500\). Equivalently, the fitted \(z\)-score vector is \(z_1R_{:,1}\):

$$ \hat{\mu}_z=5.0 \begin{pmatrix} 1\\0.6\\0.2 \end{pmatrix} = \begin{pmatrix} 5.0\\3.0\\1.0 \end{pmatrix}, \qquad e=z-\hat{\mu}_z= \begin{pmatrix} 0\\0.4\\0.1 \end{pmatrix}. $$

The conditional covariance for residuals at variants 2 and 3 is \( \begin{pmatrix}0.64&0.18\\0.18&0.96\end{pmatrix} \): the diagonal entries are \(1-0.6^2=0.64\) and \(1-0.2^2=0.96\), and the off-diagonal entry is \(0.3-(0.6)(0.2)=0.18\). The residuals are modest relative to their marginal conditional standard deviations, \(0.8\) and approximately \(0.9798\). This pattern is compatible with the proposed fit as a descriptive check, but it does not establish that variant 1 is causal or that the inputs are correct.

Residual Patterns and Implausible Effects

Residuals are most useful when examined as a pattern, not as a hunt for a single large number. A cluster of residuals with the same sign, a strong association whose sign or magnitude conflicts with the fitted LD pattern, or a systematic pattern across many variants may suggest that the proposed effect configuration or the inputs do not adequately represent the observed data. Conversely, small residuals do not prove compatibility: a flexible model can fit many patterns, and highly correlated variants provide limited independent information.

Estimated effects can also serve as a warning check. In the stated one-variant model, a fitted effect is \(z_i/\sqrt{N}\). A very large fitted effect, or a value inconsistent with the phenotype and genotype scaling, should prompt a check of units, sample size, standard errors, and allele coding. The estimate is not automatically implausible just because it is large: its interpretation depends on the trait scale and model. It is the discrepancy with the stated scale or analysis assumptions that matters.

Worked Example: A Residual Pattern That Deserves Investigation

Use the same hypothetical \(R\) and \(N=10{,}000\), but suppose the observed vector is \(z=(5.0,4.7,-2.8)^T\). Under the one-variant model with variant 1 as the proposed causal variant, \(\hat{\beta}_1=5.0/100=0.0500\), and the fitted vector remains \((5.0,3.0,1.0)^T\). The residual is

$$ e= \begin{pmatrix} 5.0\\4.7\\-2.8 \end{pmatrix} - \begin{pmatrix} 5.0\\3.0\\1.0 \end{pmatrix} = \begin{pmatrix} 0\\1.7\\-3.8 \end{pmatrix}. $$

The marginal conditional standard deviations for variants 2 and 3 are \(0.8\) and \(\sqrt{0.96}\approx0.9798\). The residuals are about \(1.7/0.8=2.125\) and \(-3.8/0.9798\approx-3.878\) conditional standard deviations from their fitted means. In particular, the negative residual at variant 3 is large relative to this one-variant fit. The residuals are correlated, and variant 1 may have been chosen after inspecting the data, so these ratios are diagnostic summaries rather than calibrated \(p\)-values. The pattern motivates checking the proposed effect configuration and the input files rather than concluding that a specific file is wrong.

Check the LD Matrix Itself

An LD matrix used as a correlation matrix should be square, symmetric, have diagonal entries equal to one (up to known conventions and small numerical rounding), and have entries between \(-1\) and \(1\). It must also be positive semidefinite: for every vector \(a\), \(a^TRa\geq0\). Equivalently, all its eigenvalues are nonnegative, apart from tiny negative values attributable to numerical rounding. It need not be positive definite. Perfect LD or redundant variants can make it singular, which is a valid correlation structure even though some matrix inverses do not exist.

Worked Example: An Impossible Pairwise Correlation

Suppose a hypothetical two-variant LD file contains \(R=\begin{pmatrix}1&1.05\\1.05&1\end{pmatrix}\). The off-diagonal entry already violates the correlation bound. The eigenvalues are \(1+1.05=2.05\) and \(1-1.05=-0.05\), so the matrix is not positive semidefinite. For example, taking \(a=(1,-1)^T\) gives \(a^TRa=2-2(1.05)=-0.10\), which cannot be a variance. This matrix cannot be a valid correlation matrix as stated; investigate whether the data were corrupted, incorrectly assembled, or represented on a different scale before using it as LD.

For a real matrix, useful checks include the maximum absolute asymmetry, deviations of the diagonal from one, the minimum eigenvalue, and whether entries fall outside the correlation bounds. Apply tolerances appropriate to the precision of the stored matrix: rounding can produce tiny numerical discrepancies, while a materially negative eigenvalue is not explained by ordinary rounding. Pairwise bounds alone are insufficient; a symmetric matrix can have every entry in range and still fail positive semidefiniteness.

Alleles, Variant Order, and Other Pipeline Checks

The sign of a \(z\)-score depends on which allele is counted as the effect allele. If one summary-statistic row is reported relative to the opposite allele, its signed association changes sign. The corresponding LD correlations must use a compatible orientation too. In matrix notation, flipping the coding of selected variants uses a diagonal matrix \(D\) with entries \(+1\) or \(-1\); the consistently transformed quantities are \(z^*=Dz\) and \(R^*=DRD\). Flipping a \(z\)-score without the corresponding LD transformation can create an apparent inconsistency.

Variant order is equally important. An LD matrix can be mathematically valid but unusable with a summary-statistic vector whose rows are in a different order. Before fitting, compare variant identifiers and alleles explicitly, check that duplicates and missing variants are handled consistently, and confirm that matrix rows and columns correspond to the same ordered list. Also verify that the summary statistics and LD use compatible genome builds, variant representations, and analysis samples where required by the model.

Worked Example: A Sign Flip Without a Matching LD Reorientation

Return to the first hypothetical example, where the expected association at variant 2 is \(0.6(5.0)=3.0\), and the observed value is \(3.4\). If the summary statistic for variant 2 is instead recorded as \(-3.4\) because its effect allele was reversed, while the LD matrix is left unchanged, the apparent residual becomes \(-3.4-3.0=-6.4\). This is not a coherent reorientation of the data. For a flip of variant 2, take \(D=\mathrm{diag}(1,-1,1)\): the consistently transformed summary vector is \(Dz=(5.0,-3.4,1.1)^T\), and the transformed LD matrix is \(DRD\), whose correlations involving variant 2 also change sign. The fitted pattern then changes consistently with the coding. This check illustrates why allele labels and LD orientation must be assessed together.

Diagnostics, Alternatives, and Limits

A practical order of checks is to validate variant matching and allele orientation, inspect basic matrix properties, fit an appropriate association pattern, and then examine residuals and effect scales. When possible, reconstructing the association statistics and LD from the same individual-level data and the same analysis specification provides a useful independent check. It is more direct than relying only on a residual pattern, although it may not be possible when only summary statistics are available.

These approaches answer different questions. Matrix checks ask whether the LD input can be a correlation matrix at all. Variant and allele checks ask whether the inputs are aligned. Residual checks ask whether a proposed model predicts the observed association pattern. Reanalysis from individual-level data can check whether the reported summaries are reproducible under a common pipeline. None alone proves that fine-mapping is correct, and residuals should not be treated as formal goodness-of-fit tests unless their distribution, degrees of freedom, and any model-selection steps are accounted for.

A common mistake is to say, “The residual at this variant is large, so the LD reference must be wrong.” That conclusion goes beyond the evidence. The residual could instead reflect an inadequate effect configuration, allele or variant misalignment, differences in sample or analysis, or another failure of the approximation. The correction is to treat the residual as a warning, run independent checks, and state only what those checks establish. Likewise, a valid, positive-semidefinite matrix is necessary for a coherent LD correlation model but does not establish that it is the correct LD for the summary statistics.

Key takeaway: Check that the LD matrix is a valid correlation matrix and that variant identities and allele orientations match. Then compare observed \(z\)-scores with the patterns implied by the fitted effects, interpreting residuals in their covariance context. A diagnostic flags incompatibility; it does not identify its cause automatically.

Check Your Understanding

Answer each question, then compare with the solutions.

  1. In the common-sample model, what fitted \(z\)-score pattern is implied by a single causal variant \(i\)?
  2. Why is a singular LD matrix not automatically invalid?
  3. A symmetric \(2\times2\) matrix has diagonal entries one and off-diagonal entries \(0.7\). What are its eigenvalues, and is it positive semidefinite?
  4. A large residual is observed under a one-variant fit. Does this establish that the LD matrix is wrong? Give two other possibilities.

Solutions. (1) The fitted pattern is \(\hat{\mu}_z=z_iR_{:,i}\), because \(\hat{\beta}_i=z_i/\sqrt{N}\). (2) Perfectly correlated or redundant variants can produce a singular but positive-semidefinite correlation matrix; singularity means an inverse may not exist, not that the correlations are impossible. (3) The eigenvalues are \(1+0.7=1.7\) and \(1-0.7=0.3\), both positive, so the matrix is positive definite and hence positive semidefinite. (4) No. A large residual can also indicate an inadequate effect configuration or mismatched variant or allele coding; differences in samples or analysis procedures are other possibilities.

Clinical Biostats