Tutorials › High-Dimensional Genomic Data Analysis › LDpred2 Models for Genome-Wide Effect Shrinkage

Polygenic Risk Scores · Tutorial 568 of 795

LDpred2 Models for Genome-Wide Effect Shrinkage

Understand the summary-statistic and LD inputs to LDpred2, and distinguish the prior assumptions and parameter handling of its infinitesimal, grid, and auto models.

Advanced 12 min read

What You'll Learn

  • Describe the summary-statistic likelihood that connects marginal GWAS effects to joint SNP effects through an LD matrix.
  • Interpret the Gaussian infinitesimal prior and its LD-aware posterior mean.
  • Explain how LDpred2-grid varies SNP heritability and the fraction of nonzero effects.
  • Explain how LDpred2-auto estimates those parameters and why its estimates require diagnostics.
  • Identify key assumptions about allele alignment, LD matching, phenotype scaling, and GWAS data.
  • Recognize when infinitesimal, grid, or auto modeling choices may be unsuitable.

Why LDpred2 Uses Both Summary Statistics and Linkage Disequilibrium

A GWAS summary statistic for a SNP is a marginal association: it describes that SNP's association without jointly accounting for all correlated SNPs. When nearby variants are in linkage disequilibrium (LD), a SNP can have a marginal association partly because it tags another SNP with a nonzero effect. A score built directly from marginal estimates can therefore misrepresent the joint effects needed for prediction.

LDpred2 addresses this by combining GWAS summary statistics with an LD correlation matrix. The summary statistics provide evidence about association; the matrix describes correlations among the analyzed variants. Together they help infer joint SNP effects under a specified prior model. The three models considered here differ chiefly in their assumptions about the distribution of those effects and whether model parameters are fixed or estimated.

Definition: Let \(M\) be the number of analyzed SNPs, \(\hat{\boldsymbol b}\) the vector of GWAS marginal effect estimates, \(\boldsymbol\beta\) the vector of joint effects, and \(R\) the \(M \times M\) LD correlation matrix. Under standardized genotype coding, the summary-statistic relationship is approximately \(\hat{\boldsymbol b}=R\boldsymbol\beta+\boldsymbol\epsilon\). The off-diagonal entries of \(R\) represent correlations between SNPs; its diagonal entries are 1.

This relationship assumes that the summary statistics and LD matrix refer to the same variants, effect alleles, and sufficiently similar genetic population. In practice, marginal estimates may come from a GWAS different from the reference sample used to estimate \(R\), but the reference must represent the LD structure relevant to the GWAS and intended prediction population. Allele orientation and genotype scaling must also be consistent. If an allele is reversed in one input but not the other, the corresponding signs and correlations can be wrong.

For a simple derivation, suppose genotypes are standardized and the phenotype is standardized, with model \(y=X\boldsymbol\beta+\boldsymbol\varepsilon\). If \(X'X/n=R\), the vector of marginal estimates is \(\hat{\boldsymbol b}=X'y/n\). Conditional on \(X\), its expectation is \(R\boldsymbol\beta\). If the residuals have variance \(\sigma_e^2\), the sampling covariance is approximately \(\sigma_e^2R/n\). Thus, a marginal estimate is not generally an unbiased estimate of its corresponding joint effect when correlated SNPs have effects: its expectation includes contributions from those correlated SNPs.

Worked Example: LD Changes the Expected Marginal Effects

Suppose two standardized SNPs have correlation \(r=0.6\), and their joint effects on a standardized phenotype are \(\beta_1=0.10\) and \(\beta_2=0.04\), measured in phenotype standard deviations per genotype standard deviation. The LD matrix is \(R=\begin{pmatrix}1&0.6\\0.6&1\end{pmatrix}\).

The expected marginal estimates are \(R\boldsymbol\beta\). For SNP 1, the expectation is \(1(0.10)+0.6(0.04)=0.124\). For SNP 2, it is \(0.6(0.10)+1(0.04)=0.100\). The second SNP's expected marginal estimate is larger than its joint effect because it tags the first SNP. This is the reason an LD-aware method uses both the marginal estimates and \(R\), rather than treating the marginal estimates as joint effects.

The Infinitesimal Model

The infinitesimal model is the Gaussian-prior option in LDpred2. It assigns every analyzed SNP an independent, mean-zero effect with the same prior variance. Write \(h^2\) for the assumed SNP heritability on the phenotype scale used in the model. With standardized genotypes and \(M\) SNPs, a common parameterization is prior variance \(h^2/M\) per SNP. Since the diagonal of \(R\) is 1, the prior expected genetic variance is \(M(h^2/M)=h^2\).

Definition: Under the infinitesimal prior, \(\beta_j \sim N(0,h^2/M)\) independently for \(j=1,\ldots,M\). The model does not set any SNP effect exactly to zero; it expresses the expectation that effects are broadly distributed and individually small.

The posterior mean makes the LD adjustment explicit. Under the approximate likelihood \(\hat{\boldsymbol b}\mid\boldsymbol\beta \sim N(R\boldsymbol\beta,\sigma_e^2R/n)\), and the Gaussian prior above, the posterior mean is

$$ \hat{\boldsymbol\beta}_{\mathrm{post}} = \left(R+\frac{\sigma_e^2M}{nh^2}I\right)^{-1}\hat{\boldsymbol b}. $$

This expression assumes that \(R\) is invertible for the likelihood derivation; the prior provides regularization, and practical implementations must handle highly correlated or rank-deficient LD information appropriately. When the residual variance is approximated by 1, the shrinkage term becomes \(M/(nh^2)\). The result is a posterior mean: correlated marginal estimates are jointly adjusted, and the amount of shrinkage depends on sample size, the number of SNPs, and the assumed heritability. This is not simply a separate shrinkage of each SNP.

Worked Example: Infinitesimal LD-Aware Shrinkage

Consider a hypothetical two-SNP analysis with \(n=1000\), \(M=2\), \(h^2=0.20\), residual variance approximated by 1, \(R=\begin{pmatrix}1&0.5\\0.5&1\end{pmatrix}\), and marginal estimates \(\hat{\boldsymbol b}=(0.08,0.07)'\). All effects are on a standardized scale.

The shrinkage term is \(M/(nh^2)=2/(1000\times0.20)=0.01\). Therefore, the posterior mean solves \((R+0.01I)\hat{\boldsymbol\beta}_{\mathrm{post}}=\hat{\boldsymbol b}\), or \(\begin{pmatrix}1.01&0.5\\0.5&1.01\end{pmatrix}\hat{\boldsymbol\beta}_{\mathrm{post}}=(0.08,0.07)'\).

The determinant is \(1.01^2-0.5^2=0.7701\). Inverting the matrix gives \(\hat\beta_{1,\mathrm{post}}=(1.01(0.08)-0.5(0.07))/0.7701=0.0595\), and \(\hat\beta_{2,\mathrm{post}}=(1.01(0.07)-0.5(0.08))/0.7701=0.0399\).

The estimated joint effects are smaller than the marginal estimates in this example, in part because each marginal estimate contains information associated with the other correlated SNP. These values are posterior mean effects, in phenotype standard deviations per genotype standard deviation; they are not evidence that either SNP has a causal effect.

LDpred2-Grid: Compare Explicit Prior Choices

The grid model replaces the all-effects Gaussian prior with a mixture prior. For each SNP, the prior assigns probability \(1-p\) to a zero effect and probability \(p\) to a Gaussian effect. The variance among nonzero effects is set to \(h^2/(Mp)\), so the expected number of nonzero effects is \(Mp\), while the prior expected genetic variance remains \(h^2\), under standardized genotypes and the stated assumptions.

Definition: In the LDpred2-grid prior, \(\beta_j=0\) with probability \(1-p\), and \(\beta_j\sim N(0,h^2/(Mp))\) with probability \(p\). A grid analysis fits candidate combinations of \(p\) and \(h^2\), rather than treating one combination as known.

The grid makes a modeling trade-off visible. A smaller \(p\) means fewer SNPs are expected to have nonzero effects, but the prior variance of those nonzero effects increases to preserve the same \(h^2\). A larger \(p\) spreads the expected heritability across more SNPs and implies smaller individual effects. The posterior for a SNP balances its summary-statistic evidence, LD with other SNPs, and this mixture prior; the prior probability \(p\) is not a claim that a particular SNP is causal.

Worked Example: Interpreting Two Grid Settings

Suppose a hypothetical analysis contains \(M=10{,}000\) standardized SNPs and considers \(h^2=0.40\). Compare grid settings \(p=0.01\) and \(p=0.10\).

At \(p=0.01\), the expected number of nonzero effects is \(Mp=10{,}000(0.01)=100\). The variance among nonzero effects is \(h^2/(Mp)=0.40/100=0.004\), giving prior standard deviation \(\sqrt{0.004}=0.0632\).

At \(p=0.10\), the expected number is \(10{,}000(0.10)=1000\). The nonzero-effect variance is \(0.40/1000=0.0004\), with standard deviation \(\sqrt{0.0004}=0.0200\). Both settings imply the same prior expected heritability, but they represent very different architectures: relatively few larger effects versus many smaller effects. The grid compares these assumptions; these calculations alone do not identify which setting predicts best.

LDpred2-Auto: Estimate the Architecture Parameters

LDpred2-auto uses a Bayesian sampling procedure to estimate model quantities including \(h^2\) and \(p\), rather than requiring the analyst to specify a grid of candidate values in advance. It uses the summary-statistic and LD information to update the effects and these parameters iteratively. Its conceptual prior is related to the mixture model: it allows a proportion of effects to be zero and estimates the proportion and overall heritability from the data.

This flexibility does not eliminate assumptions. Auto still depends on the summary-statistic likelihood being adequate, on the LD matrix representing the relevant population, and on the effect prior being a useful description of the genetic architecture. Its estimates are outputs of a model and sampling procedure, not assumption-free measurements of the true heritability or proportion of associated SNPs. In particular, a plausible-looking estimate from one run is not by itself evidence that sampling mixed or that the result is stable.

Worked Example: Interpreting Hypothetical Auto Estimates

Suppose an LDpred2-auto analysis of \(M=20{,}000\) standardized SNPs reports representative estimates \(h^2=0.30\) and \(p=0.015\). These are hypothetical values for illustration, not results from a real study.

The implied expected number of nonzero effects is \(Mp=20{,}000(0.015)=300\). Under the mixture parameterization, the variance among nonzero effects is \(0.30/300=0.001\), with standard deviation \(\sqrt{0.001}=0.0316\) phenotype standard deviations per genotype standard deviation.

This summary describes the fitted model's implied architecture; it does not establish that exactly 300 SNPs have nonzero biological effects. Before using the estimates, an analyst should examine whether independent chains give compatible results and whether sampled parameter values have stabilized rather than showing persistent drift. Material disagreement between chains or unstable estimates is a reason not to present one run as a dependable characterization.

Assumptions, Diagnostics, and Model Choice

All three models need harmonized, compatible inputs. A practical analysis checks that variant identifiers and effect alleles match, that the summary statistics and LD matrix use the same SNP set and ordering, and that effect estimates have the intended scale. The LD reference should be appropriate for the GWAS and prediction population. A substantial LD mismatch can lead the model to attribute marginal associations to the wrong joint effects. These checks do not guarantee a good model, but they can uncover errors that invalidate the LD adjustment.

The models also differ in how much architecture they assume:

ModelEffect priorHow parameters are handledInterpretive emphasis
LDpred2-infAll SNPs have Gaussian effects with common varianceUses a specified \(h^2\)Broadly distributed, small effects
LDpred2-gridPoint mass at zero plus Gaussian nonzero effectsFits candidate \(p\) and \(h^2\) combinationsCompares explicit sparsity and heritability assumptions
LDpred2-autoMixture architecture with parameters estimated during samplingEstimates quantities such as \(p\) and \(h^2\)Allows data-informed parameter estimation, subject to sampling and model assumptions

The infinitesimal model can be a poor description when effects are sparse or have a strongly heterogeneous distribution. The grid model can be sensitive to the candidate values offered: if useful combinations are absent, comparison among the available settings cannot recover them. Auto avoids a prespecified grid but can be unreliable if the sampler does not mix, if inputs are mismatched, or if the assumed prior is inappropriate. None of these models makes population transfer automatic, and none turns an association-based prediction score into evidence of causation.

A useful comparison is with clumping and thresholding, which selects a subset of marginal associations after reducing redundancy through LD-based clumping. LDpred2 instead uses the LD matrix to jointly model correlated effects under a prior. That joint modeling can retain information across correlated SNPs, but it makes the result depend more directly on the quality of the LD matrix and the adequacy of the prior. These approaches are alternatives, not interchangeable descriptions of the same calculation.

Common pitfall: “Auto estimates \(p\), so the returned \(p\) is the true fraction of causal SNPs.” That conclusion is too strong. The estimate is conditional on the model, inputs, and sampling behavior; it is not a definitive count of causal variants. Interpret it as a parameter estimate under the fitted mixture prior, assess chain behavior and input compatibility, and avoid biological causal claims based on \(p\) alone.

Check Your Understanding

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

  1. If two SNPs are correlated, why can a SNP's marginal GWAS estimate differ from its joint effect?
  2. For \(M=5000\), \(h^2=0.25\), and \(p=0.02\), what is the expected number of nonzero effects and the prior variance among nonzero effects under the grid model?
  3. Which LDpred2 model assumes every SNP has a Gaussian effect, and which model estimates \(p\) rather than requiring a grid of candidate values?
  4. Give two reasons why an LDpred2-auto estimate should not automatically be treated as a stable or literal description of the genetic architecture.

Solutions. (1) The expectation of the marginal estimate is the corresponding row of \(R\boldsymbol\beta\), so correlated SNPs' joint effects contribute to it. (2) The expected count is \(Mp=5000(0.02)=100\). The nonzero-effect variance is \(h^2/(Mp)=0.25/100=0.0025\). (3) LDpred2-inf uses the all-SNP Gaussian prior; LDpred2-auto estimates \(p\) through its sampling procedure. (4) For example, chains may not have mixed or stabilized, and the estimate depends on the fitted prior and on compatible summary-statistic and LD inputs. These limitations mean the estimate is conditional on the analysis, not a guaranteed literal count of causal SNPs.

Clinical Biostats