Why Test Annotation Results?
An annotation model estimates how genetic variation is distributed across genomic features. A fitted coefficient may indicate that a feature contributes to predicted per-variant heritability, but its estimate alone does not show how precisely that contribution was measured. Likewise, a heritability proportion or enrichment ratio is calculated from estimated quantities, so its uncertainty depends on how those quantities vary together. Wald inference provides a systematic way to test hypotheses and construct intervals while retaining that covariance information.
The calculations below concern estimates from a fitted annotation model, such as weighted stratified LD score regression, with an estimated covariance matrix. That covariance matrix may come from a block jackknife. The key principle is to use the covariance of the quantities entering a calculation, not to treat those quantities as independent by default.
Wald Inference for Coefficients
Let \(\boldsymbol{\tau}\) denote the vector of annotation coefficients, \(\hat{\boldsymbol{\tau}}\) its estimate, and \(\widehat{\mathbf{V}}\) the estimated covariance matrix. A Wald procedure requires that the model and its uncertainty estimate are appropriate for the data and that the estimator is approximately multivariate normal in the sample size regime being used. In particular, standard errors should reflect dependence handled by the fitting and uncertainty procedure; correlated annotations can also make coefficient estimates imprecise.
The coefficient’s meaning and units come from the model’s encoding. For example, a coefficient for an annotation score describes the modelled change in per-variant genetic variance associated with a one-unit change in that score, conditional on the other included annotations. Testing whether it equals zero is not the same as testing whether an entire annotation category has positive total heritability; the hypothesis must match the estimand.
Worked Example: Testing One Annotation Coefficient
Suppose a hypothetical fitted model gives an annotation coefficient of \(\hat{\tau}_1=0.018\), with standard error \(0.006\). The coefficient is measured in the model’s per-variant variance scale per one-unit increase in the annotation score. Test \(H_0:\tau_1=0\) against a two-sided alternative and form a 95% confidence interval.
The test statistic is
The two-sided standard-normal p-value is approximately \(0.00270\). Thus, under the null model and the Wald approximation, an absolute statistic at least as large as 3.00 would be unusual. At a 5% significance level, the data provide evidence against a zero coefficient.
Using \(z_{0.975}=1.96\), the interval is
In this hypothetical model, the interval estimates the coefficient to be between 0.00624 and 0.02976 per one-unit increase in the annotation score, on the stated variance scale. It is a confidence procedure with 95% long-run coverage under its assumptions; it does not assign a 95% probability to this fixed coefficient being inside this particular interval.
Joint Coefficient Hypotheses
When a scientific question concerns several coefficients together, testing them one at a time does not provide the same answer as a joint test. Let \(R\) be a matrix specifying linear contrasts and let \(\mathbf{r}\) be the hypothesized values. The null hypothesis is \(H_0:R\boldsymbol{\tau}=\mathbf{r}\). Its Wald statistic uses the covariance of the estimated contrasts:
If \(R\widehat{\mathbf{V}}R^\mathsf{T}\) is nonsingular and the null and approximation conditions hold, \(W\) is approximately chi-square with degrees of freedom equal to the rank of \(R\). The inverse covariance matrix accounts for dependence among the tested contrasts.
Worked Example: Jointly Testing Two Coefficients
In a hypothetical model, two coefficients have estimates \(0.020\) and \(0.010\), with estimated covariance matrix
Test the joint null that both coefficients are zero. The covariance is positive, so it must be included in the joint calculation. Here \(R\) is the \(2\times2\) identity matrix and \(\mathbf{r}=(0,0)^\mathsf{T}\). Substitution into the Wald statistic gives
The degrees of freedom are 2, and the chi-square p-value is approximately \(0.00359\). At a 5% level, the joint null is rejected. This result concerns the pair of coefficients together; it does not imply that each individual coefficient would pass a separate 5% test.
Proportions and Derived Quantities
A heritability proportion is a ratio of estimated heritabilities. For an annotation category \(C\), write \(h^2_{g,C}\) for the heritability attributed to that category under the model and \(h_g^2\) for total heritability. The proportion is \(p_C=h^2_{g,C}/h_g^2\). Since both quantities are estimated, the variance of the ratio depends on their variances and covariance.
For a smooth function \(g(\boldsymbol{\theta})\) of an estimated vector \(\hat{\boldsymbol{\theta}}\) with covariance estimate \(\widehat{\mathbf{V}}\), the delta method approximates its variance by the gradient evaluated at the estimate:
This approximation follows by a first-order Taylor expansion around the true parameter vector: \(g(\hat{\boldsymbol{\theta}})\) is approximately \(g(\boldsymbol{\theta})+\nabla g(\boldsymbol{\theta})^\mathsf{T}(\hat{\boldsymbol{\theta}}-\boldsymbol{\theta})\). Taking the variance of the linear term gives the gradient-covariance-gradient expression. Replacing the unknown gradient and covariance by their estimates yields the practical variance estimate.
Worked Example: A Heritability Proportion and Its Interval
Suppose hypothetical estimates are \(\hat h^2_{g,C}=0.12\) and \(\hat h_g^2=0.30\). Their estimated variances are \(0.0004\) and \(0.0009\), respectively, and their covariance is \(0.0003\). The estimated proportion is
For \(g(a,b)=a/b\), the gradient is \((1/b,\,-a/b^2)^\mathsf{T}\). At the estimates it is \((3.333,\,-1.333)^\mathsf{T}\). Therefore,
A 95% Wald interval is \(0.40\pm1.96(0.05812)=[0.2861,0.5139]\). It estimates that category \(C\) accounts for about 28.6% to 51.4% of total heritability, under the model and approximation. To test \(H_0:p_C=0.20\), the statistic is \((0.40-0.20)/0.05812=3.44\), with a two-sided normal p-value of about \(0.00058\).
The covariance term is negative in this ratio variance because the two gradient components have opposite signs. Omitting it would give a different standard error and would incorrectly treat the two estimates as uncorrelated.
Testing Enrichment Ratios
Let \(q_C=M_C/M\) denote the fraction of counted variants assigned to category \(C\), using the annotation and counting convention of the analysis. The enrichment ratio compares the category’s heritability proportion with its variant fraction:
An enrichment of 1 means the category’s share of heritability equals its share of variants. Values above 1 indicate a greater heritability share relative to that variant fraction; values below 1 indicate a smaller share. This is a model-based comparison, not evidence that the annotation causes heritability.
When \(q_C\) is treated as fixed, a test of \(H_0:E_C=1\) can use a Wald statistic \((\hat E_C-1)/SE(\hat E_C)\). If the denominator is estimated rather than fixed, it must be included in the function and covariance calculation. A ratio with a denominator near zero is unstable, and a normal Wald interval can be misleading, especially when it extends below zero even though the ratio is constrained to be positive.
Worked Example: Testing an Enrichment Ratio
In another hypothetical analysis, \(\hat h^2_{g,C}=0.08\), \(\hat h_g^2=0.25\), their estimated variances are \(0.000225\) and \(0.000625\), and their covariance is \(0.000250\). Suppose category \(C\) contains 8% of the counted variants, so \(q_C=0.08\) is fixed for this calculation. The estimated proportion and enrichment are
With \(E_C=h^2_{g,C}/(q_C h_g^2)\), the gradient with respect to \((h^2_{g,C},h_g^2)\) is \((1/(q_C h_g^2),-h^2_{g,C}/(q_C(h_g^2)^2))^\mathsf{T}\), which evaluates to \((50,-16)^\mathsf{T}\). The delta-method variance is
Thus \(SE(\hat E_C)=\sqrt{0.3225}=0.5679\). The 95% Wald interval is \(4.00\pm1.96(0.5679)=[2.887,5.113]\). The test of \(H_0:E_C=1\) gives \(Z=(4.00-1)/0.5679=5.28\), with a two-sided p-value of approximately \(1.3\times10^{-7}\). Under the stated assumptions, the estimated enrichment is higher than 1; it is not a causal effect.
Common Pitfalls and Interpretation
A common mistake is to calculate a ratio’s uncertainty as if its numerator and denominator were independent. The wrong reasoning is: “I have standard errors for both estimates, so I can combine only their variances.” The correction is to use the covariance term in the delta-method expression whenever the estimates are jointly estimated. Ignoring covariance can either increase or decrease the reported uncertainty, depending on the signs of the covariance and gradient components.
- Match the null to the question. A test of one coefficient equaling zero, a joint test of several coefficients, and a test of enrichment equaling 1 are different hypotheses.
- Check the scale. Coefficients inherit units from the outcome and annotation coding; proportions and enrichment ratios are dimensionless.
- Check the approximation. Wald procedures rely on approximate normality and a reliable covariance estimate. Near boundaries, with weakly identified coefficients, or with an unstable ratio, their intervals and p-values may be poor approximations.
- Do not infer causation. Enrichment describes a relative distribution of model-attributed heritability, not the causal effect of an annotation.
Check Your Understanding
Answer each question using the definitions and procedures above.
- What null hypothesis is tested by a Wald test of a single annotation coefficient equal to zero?
- Why does a joint test of two coefficients use their covariance, rather than two separate standard errors alone?
- For \(p_C=h^2_{g,C}/h_g^2\), what two estimates and covariance information are needed for a delta-method standard error?
- What does an enrichment ratio of 1 mean in terms of the heritability share and variant share?
- Give one reason a Wald confidence interval for an enrichment ratio might be unreliable.