Why Shrink Selected Effects?
A genome-wide association study can report an estimated effect for each tested variant, but the variants that pass a significance threshold are not a representative sample of all variants. Even when estimates are unbiased before selection, those that happen to be unusually large in magnitude are more likely to be reported. This is the winner's curse: selected discovery estimates tend to overstate the underlying effects.
Empirical Bayes shrinkage addresses a related question: given a collection of estimated effects, what effect estimate is sensible for each locus if effects across loci are drawn from a shared distribution? The method combines each locus's discovery estimate with a prior distribution learned across loci. Because the data available for learning that distribution may themselves be selected, the selection mechanism must also be represented in the prior-fitting step.
This tutorial treats effect estimates on a common scale, such as log odds per allele. Shrinkage moves an estimate toward the prior mean, often zero, but is not a correction that guarantees an unbiased estimate. Its quality depends on the likelihood, prior, and selection model being reasonable.
Posterior Shrinkage for a Known Prior
For a moment, treat \(\tau^2\) as known. The likelihood for \(\beta_j\) is proportional to \(\exp\{-(Y_j-\beta_j)^2/(2s_j^2)\}\), and the prior is proportional to \(\exp\{-\beta_j^2/(2\tau^2)\}\). Multiplying them gives the posterior density. Completing the square gives its mean and variance:
The posterior mean is a weighted average of the raw estimate and the prior mean of zero. Its weight on the raw estimate is \(w_j=\tau^2/(\tau^2+s_j^2)\), which lies between zero and one. Less precise estimates, with larger \(s_j\), receive more shrinkage; estimates with high precision receive less. The posterior standard deviation is the square root of the posterior variance. In this model it is smaller than the raw standard error \(s_j\), because the prior contributes information.
Worked Example: Shrinkage With a Specified Prior
Suppose a hypothetical locus has a discovery log-odds estimate \(Y=0.080\) per allele and standard error \(s=0.040\). Suppose, for illustration, the prior standard deviation is \(\tau=0.050\), so \(\tau^2=0.0025\). These values specify the model; no selection adjustment is needed to calculate the posterior conditional on this observed estimate.
The weight on the estimate is \(w=0.0025/(0.0025+0.040^2)=0.0025/0.0041=0.6098\). Therefore the posterior mean is \(0.6098(0.080)=0.04878\) log-odds units per allele.
The posterior variance is \((0.0025)(0.0016)/0.0041=0.0009756\), giving posterior standard deviation \(\sqrt{0.0009756}=0.03123\) log-odds units per allele. A normal-approximation 95% posterior interval is \(0.04878\pm1.96(0.03123)\), or approximately \((-0.0124,\ 0.1100)\) log-odds units per allele. This interval describes posterior uncertainty under the stated model and fixed prior variance; it is not a frequentist confidence interval or a guarantee that the model is correct.
Learning the Prior From Selected Loci
If estimates from all tested loci are available, a marginal likelihood can be used to estimate \(\tau^2\). Under the normal model, integrating out \(\beta_j\) gives \(Y_j\sim N(0,\tau^2+s_j^2)\). But if the estimation data contain only loci passing a threshold, fitting this untruncated marginal distribution to those estimates will generally overstate the spread. The selected estimates are disproportionately large in magnitude.
Suppose selection retains a locus when \(|Y_j/s_j|>c_j\), with known threshold \(c_j\). Given \(\tau\), the marginal density of \(Y_j\) is \(f_j(y;\tau)=\phi(y;0,\tau^2+s_j^2)\), and the probability of selection is \(P_j(S_j\mid\tau)=2\{1-\Phi(c_js_j/\sqrt{\tau^2+s_j^2})\}\). Thus the density for a selected estimate is \(f_j(y;\tau)/P_j(S_j\mid\tau)\), for values inside the selected region. Multiplying these conditional densities across independent selected loci, and maximizing over \(\tau\), gives a selection-adjusted empirical Bayes estimate. If loci have different standard errors or thresholds, each denominator must reflect its own selection rule.
For example, a normal density calculation at \(y=0.120\) with predictive variance \(0.0020\) is \(\exp\{-0.120^2/(2(0.0020))\}/\sqrt{2\pi(0.0020)}\approx0.2437\) per log-odds unit. If the selection probability under that model is \(0.0148\), the conditional density at this selected value is \(0.2437/0.0148\approx16.47\) per log-odds unit. The numerator is the unselected marginal density; dividing by the probability of selection normalizes it over the selected region.
Worked Example: Estimating Prior Spread With a Truncated Moment
Consider four hypothetical independent loci, all with standard error \(s=0.040\), retained when \(|Y/s|>1.96\). Their selected effect estimates, in log-odds units per allele, are \(0.120,-0.100,0.080,-0.150\). All pass the stated rule: their absolute test statistics are \(3.00,2.50,2.00,\) and \(3.75\).
A simple selection-adjusted estimating method matches the observed average squared estimate to its expectation conditional on selection. Under the model, \(Y\sim N(0,V)\), where \(V=\tau^2+s^2\), and selection is \(|Y|>t\) with \(t=1.96(0.040)=0.0784\). For \(a=t/\sqrt V\), standard normal tail integration gives \(E(Y^2\mid |Y|>t)=V\{1+a\phi(a)/[1-\Phi(a)]\}\). This is a moment equation for \(V\), not the full conditional-likelihood maximum likelihood estimate.
The observed average squared estimate is \((0.120^2+(-0.100)^2+0.080^2+(-0.150)^2)/4 =(0.0144+0.0100+0.0064+0.0225)/4=0.013325\). Solving \(V\{1+a\phi(a)/[1-\Phi(a)]\}=0.013325\), with \(a=0.0784/\sqrt V\), gives approximately \(V=0.00455\). Hence \(\hat{\tau}^2=0.00455-0.040^2=0.00295\), and \(\hat{\tau}\approx0.0543\) log-odds units per allele. The correction matters: the selected second moment is larger than the unselected variance \(V\), so treating \(0.013325\) itself as the total variance would overestimate the prior spread.
This calculation is deliberately small for transparency. With many loci, the selection-adjusted conditional likelihood is often preferable to a moment equation, and uncertainty in the estimated prior should be assessed rather than ignored.
Putting the Learned Prior Into a Locus Estimate
After estimating the prior variance, substitute it into the posterior formulas to obtain empirical Bayes summaries. Conditional on the observed estimate and a fixed fitted prior, the posterior formula is unchanged by the fact that the estimate passed a deterministic threshold: once \(Y_j\) is observed, knowing that it passed a rule based on that same \(Y_j\) supplies no additional information about \(\beta_j\). Selection adjustment is essential when learning the prior from the selected collection. This distinction does not remove uncertainty about the fitted prior or fix an incorrect selection model.
Worked Example: Raw Estimate Versus Empirical Bayes Summary
Use the selected locus with \(Y=0.120\) and \(s=0.040\) from the preceding hypothetical data, and the moment estimate \(\hat{\tau}^2=0.00295\). The shrinkage weight is \(w=0.00295/(0.00295+0.0016)=0.6484\). The empirical Bayes posterior mean is therefore \(0.6484(0.120)=0.07780\) log-odds units per allele.
The posterior variance is \((0.00295)(0.0016)/0.00455=0.001037\), so the posterior standard deviation is \(0.03220\) log-odds units per allele. A normal-approximation 95% posterior interval is \(0.07780\pm1.96(0.03220)=(0.0147,\ 0.1409)\) log-odds units per allele. For comparison, the raw estimate's approximate 95% interval is \(0.120\pm1.96(0.040)=(0.0416,\ 0.1984)\) log-odds units per allele. The posterior mean is closer to zero, and the posterior interval is narrower under this prior model. Neither interval accounts for uncertainty in estimating \(\tau^2\).
Assumptions, Diagnostics, and Alternatives
The normal likelihood is an approximation for an estimated effect and standard error; it is more credible when the underlying association analysis has adequate information and the standard error is reliable. The prior assumes effects are exchangeable around zero with a common variance. A collection containing distinct biological classes, substantial directional effects, or very different effect distributions may not be well represented by one zero-centered normal prior. The selection model must match the actual reporting rule, including the threshold and whether selection was one- or two-sided.
Diagnostics should examine whether the fitted prior reproduces the observed distribution after applying the selection rule. Compare observed and model-predicted selected effect magnitudes, check whether residual patterns vary with standard error or allele frequency, and verify that the selected-locus set and thresholds were recorded correctly. A few extreme loci can dominate a variance estimate; sensitivity analyses that omit influential loci can reveal this instability. Correlated variants also violate an independent-locus likelihood and can make the effective number of observations much smaller than the count of reported variants.
A raw discovery estimate is simple and preserves the original likelihood-based analysis, but does not use cross-locus information to temper extreme estimates. Empirical Bayes shrinkage borrows strength through a learned prior and is computationally convenient, but depends on the prior family and plug-in hyperparameter estimate. Selection-adjusted likelihood methods explicitly model the distribution among selected estimates when learning the prior. Bootstrap and resampling corrections, covered in the earlier material on selection, instead use repeated resampling to assess or correct selection effects and can be sensitive to how the resampling scheme represents discovery and selection. No approach makes an unrecorded selection rule or a misspecified effect distribution harmless.
Check Your Understanding
Try each question, then compare your reasoning with the solutions below.
- For a locus with \(Y=0.060\), \(s=0.030\), and \(\tau=0.040\), calculate the posterior mean and posterior standard deviation.
- Why is the ordinary sample variance of genome-wide significant estimates generally not an appropriate direct estimate of \(\tau^2\)?
- If the same estimate \(Y\) is observed but its standard error increases, what happens to the weight on \(Y\) in the posterior mean?
- State one reason a single zero-centered normal prior could be unsuitable for a set of loci.
Solutions. (1) The weight is \(0.0016/(0.0016+0.0009)=0.64\), so the posterior mean is \(0.64(0.060)=0.0384\). The posterior variance is \((0.0016)(0.0009)/0.0025=0.000576\), and the posterior standard deviation is \(0.0240\), in the same effect units as \(Y\). (2) Significance selection preferentially retains estimates with large absolute values, inflating their observed spread relative to the unselected distribution. The estimation must account for the selection event. (3) The weight \(w=\tau^2/(\tau^2+s^2)\) decreases as \(s\) increases, so the estimate receives more shrinkage toward zero. (4) For example, loci may comprise distinct effect classes or have a directional distribution; either could make a shared zero-centered normal prior a poor description.