Tutorials › High-Dimensional Genomic Data Analysis › Score Tests for Fast Genome-Wide Scans

Mixed-Model GWAS, Relatedness and Inflation Diagnostics · Tutorial 253 of 795

Score Tests for Fast Genome-Wide Scans

Learn to calculate and interpret a mixed-model score test and understand why one fitted null model can support a fast scan across many variants.

Advanced 11 min read

What You'll Learn

  • Define the null-model residual and covariance-weighted genotype information used by a score test.
  • Calculate a one-degree-of-freedom score statistic and its null p-value.
  • Explain why a fitted mixed-model null can be reused across many variants.
  • Recognize how relatedness and fixed covariates enter through the covariance and residualization.
  • Identify conditions that can make a fast score scan unreliable.

Why Use a Score Test for a Genome-Wide Scan?

A genome-wide association scan may test millions of variant effects. Refitting a mixed model from scratch for every variant can be computationally expensive, especially when the model accounts for relatedness through a non-diagonal covariance matrix. A score test offers a shortcut: fit the model under the null hypothesis of no effect for the variant, then ask whether the null-model residuals align with the variant’s genotype pattern after accounting for covariance and fixed effects.

The test is especially useful when the null model is shared across variants: the phenotype, fixed-effect design, covariance structure, and analysis individuals remain the same, while only the genotype vector changes. The resulting statistic tests for association; it does not itself provide the same full-model effect estimate and standard error as a Wald test.

Null Model, Residuals, and Information

Consider a continuous phenotype represented by the vector \(y\) for \(n\) individuals. Let \(X\) be the \(n \times q\) design matrix for fixed effects, such as an intercept and prespecified covariates. For one variant, let \(g\) be its \(n\)-vector of genotype dosages, commonly coded as the number of copies of an allele, from 0 to 2. The mixed-model null hypothesis excludes this variant’s effect:

$$ H_0:\gamma=0,\qquad y=X\beta+\varepsilon,\qquad \varepsilon\sim N(0,V). $$

Here \(\beta\) is the vector of fixed-effect coefficients, \(\gamma\) is the variant effect being tested, and \(V\) is the null-model covariance matrix. In a linear mixed model, \(V\) can incorporate both residual variation and covariance induced by relatedness. Assume \(V\) is positive definite, the columns of \(X\) are linearly independent, and the null model is adequately specified. For a practical score scan, \(V\)'s parameters are usually estimated once under the null and then treated as fixed when evaluating each variant.

Definition: The generalized least-squares residual-forming matrix under the null is
$$ P=V^{-1}-V^{-1}X(X^\mathsf{T}V^{-1}X)^{-1}X^\mathsf{T}V^{-1}. $$
The score for a single variant is \(U=g^\mathsf{T}Py\), and its null information is \(I=g^\mathsf{T}Pg\). The one-degree-of-freedom score statistic is \(T_{\mathrm{score}}=U^2/I\), provided \(I>0\).

The matrix \(P\) accounts for both parts of the null model. It removes the component explained by the fixed effects, using generalized least squares, and weights the remaining information according to \(V\). In particular, \(Py\) is a covariance-weighted null residual vector, while \(Pg\) is the similarly adjusted genotype vector. Thus \(U\) measures their alignment. A genotype pattern already explained by the fixed effects or carrying little independent information has a small \(I\), or in the exact collinear case \(I=0\), and cannot support this test.

Why the Statistic Has a Chi-Square Reference Distribution

At the null, the fixed-effect estimate is \(\hat{\beta}=(X^\mathsf{T}V^{-1}X)^{-1}X^\mathsf{T}V^{-1}y\). Differentiating the Gaussian log likelihood with respect to \(\gamma\) at \(\gamma=0\), while accounting for estimation of the null fixed effects, gives \(g^\mathsf{T}V^{-1}(y-X\hat{\beta})\). Substituting the expression for \(\hat{\beta}\) shows that this is \(g^\mathsf{T}Py=U\). The information for \(\gamma\), after adjusting for the fixed effects, is \(g^\mathsf{T}Pg=I\).

Under the null with known \(V\), \(U\) has mean zero. The matrix identity \(PVP=P\) gives its variance:

$$ \operatorname{Var}(U\mid H_0) =g^\mathsf{T}PVPg =g^\mathsf{T}Pg =I. $$

Consequently, when the model conditions hold, \(U/\sqrt{I}\) has a standard normal null distribution, and its square has a chi-square distribution with one degree of freedom. When covariance parameters are estimated under the null, the statistic uses their fitted values in \(P\); the chi-square calibration is generally an asymptotic, plug-in approximation, not an exact finite-sample guarantee.

Result: For a single additive variant effect, use \(T_{\mathrm{score}}=U^2/I\) and compare it with a \(\chi^2_1\) reference distribution under the null. The upper-tail p-value is \(P(\chi^2_1\ge T_{\mathrm{score}})\). It measures how unusual a statistic at least this large would be under the null model; it is not the probability that \(H_0\) is true.

Worked Score-Test Calculations

Worked Example: A Corrected Residual-Alignment Calculation

Suppose four hypothetical individuals have an intercept-only null model with \(V=I_4\), the \(4 \times 4\) identity matrix. The genotype dosages are \(g=(0.7,0.3,0.9,0.1)^\mathsf{T}\), and the hypothetical phenotype values are \(y=(3.8,2.2,2.6,-0.6)^\mathsf{T}\). Both vectors have means 0.5 and 2.0, respectively. With an intercept, \(P=I_4-\mathbf{1}\mathbf{1}^\mathsf{T}/4\), so the centered vectors are \(Pg=(0.2,-0.2,0.4,-0.4)^\mathsf{T}\) and \(Py=(1.8,0.2,0.6,-2.6)^\mathsf{T}\).

The score is the sum of their elementwise products:

$$ U=0.2(1.8)+(-0.2)(0.2)+0.4(0.6)+(-0.4)(-2.6) =0.36-0.04+0.24+1.04=1.60. $$

In particular, the third contribution is positive: \(0.4(0.6)=0.24\). The information and test statistic are

$$ I=0.2^2+(-0.2)^2+0.4^2+(-0.4)^2=0.40, \qquad T_{\mathrm{score}}=\frac{1.60^2}{0.40}=6.4. $$

The upper-tail probability for \(\chi^2_1\) at 6.4 is approximately 0.0114. Under this hypothetical model, the variant has a nominal association p-value of 0.0114. This is evidence against the null for this one test, not a claim that the variant is causal or that the result meets a genome-wide significance threshold.

Worked Example: Accounting for Correlated Observations

For two hypothetical individuals, let \(X=(1,1)^\mathsf{T}\), \(V=\begin{pmatrix}2&1\\1&2\end{pmatrix}\), \(g=(0,2)^\mathsf{T}\), and \(y=(1,3)^\mathsf{T}\). The covariance matrix is positive definite: its eigenvalues are 1 and 3. Thus it satisfies the required covariance condition, and the intercept design has full column rank.

In this case \(V^{-1}=\frac{1}{3}\begin{pmatrix}2&-1\\-1&2\end{pmatrix}\), and substituting \(X\) and \(V\) into the definition of \(P\) gives \(P=\frac{1}{2}\begin{pmatrix}1&-1\\-1&1\end{pmatrix}\). Therefore \(Py=(-1,1)^\mathsf{T}\) and \(Pg=(-1,1)^\mathsf{T}\). The score, information, and statistic are

$$ U=g^\mathsf{T}Py=(0,2)\begin{pmatrix}-1\\1\end{pmatrix}=2,\qquad I=g^\mathsf{T}Pg=(0,2)\begin{pmatrix}-1\\1\end{pmatrix}=2,\qquad T_{\mathrm{score}}=\frac{2^2}{2}=2. $$

The \(\chi^2_1\) upper-tail probability is approximately 0.1573. This is not strong evidence against the null at conventional significance levels. The nonzero off-diagonal covariance was included in the calculation; treating the observations as independent would use a different \(P\), and therefore a different score and information.

Worked Example: Reusing a Null Fit for Two Variants

Suppose four hypothetical individuals have an intercept-only null model with \(V=I_4\), and phenotype values \(y=(6,4,7,3)^\mathsf{T}\). The null mean is 5, so \(Py=(1,-1,2,-2)^\mathsf{T}\). Consider two dosage vectors, \(g_1=(2,0,2,0)^\mathsf{T}\) and \(g_2=(2,2,0,0)^\mathsf{T}\). Both have mean 1; after centering, they are \((1,-1,1,-1)^\mathsf{T}\) and \((1,1,-1,-1)^\mathsf{T}\), respectively. The same null residual vector and matrix \(P\) can be reused for both tests.

For the first variant, \(U_1=1(1)+(-1)(-1)+1(2)+(-1)(-2)=6\), and \(I_1=1^2+(-1)^2+1^2+(-1)^2=4\). Hence \(T_1=6^2/4=9\), with a \(\chi^2_1\) upper-tail p-value of approximately 0.0027. For the second variant, \(U_2=1(1)+1(-1)+(-1)(2)+(-1)(-2)=0\), while \(I_2=4\). Thus \(T_2=0\) and its p-value is 1. These are nominal, per-variant p-values; a genome-wide scan must also account for testing many variants.

How a Fast Scan Uses the Null Model

The computational gain comes from separating work shared by all variants from work specific to each genotype. A practical scan follows this pattern:

1
Fit the null model.
Estimate the fixed effects and covariance parameters without including any tested variant. Check that the fit has converged and that the resulting covariance matrix is usable.
2
Form null-model quantities.
Using the fitted covariance and fixed-effect design, obtain the residual or transformed quantities needed to evaluate \(g^\mathsf{T}Py\) and \(g^\mathsf{T}Pg\).
3
Evaluate each variant.
For each genotype vector on the same analysis individuals, compute its score and information, then calculate \(U^2/I\) and a null p-value.
4
Check applicability.
Confirm that the variant has usable genotype data, positive information, and the same sample and model specification as the null fit. Variants with different missingness may require variant-specific handling.

For large scans, software avoids explicitly constructing a dense \(P\) when that would be expensive. Algebraically equivalent matrix operations can apply the covariance weighting and remove fixed-effect components without storing every entry of \(P\). The key statistical requirement remains the same: each variant’s score and information must reflect the fitted null covariance and the fixed effects.

Assumptions, Diagnostics, and Comparisons

The score test is most straightforward for a Gaussian linear mixed model with a correctly specified null mean and covariance, a positive-definite \(V\), a full-rank \(X\), and a variant effect represented by one tested coefficient. Its reference distribution is most reliable when the sample size supports the asymptotic approximation and the null covariance fit is stable. If covariance parameters are at a boundary or the fit is singular, the plug-in calibration may be less reliable. Rare variants, small samples, and genotype vectors with very little variation can also produce poor approximations or little information.

Useful checks include verifying that the null fit converged, that the covariance matrix is positive definite (or that any numerical approximation is justified), and that \(I=g^\mathsf{T}Pg\) is positive and not so small that numerical error dominates. Inspect variant call rates, allele frequencies, imputation quality, and the analyzed sample. A missing genotype pattern that changes the individuals used for a variant means the original null-model quantities may no longer apply unchanged. Residual structure or systematic miscalibration can also undermine the nominal p-values; accounting for relatedness in \(V\) does not guarantee that every other source of model misspecification has been resolved.

Compared with a Wald test, a score test needs only the null fit for the variant test, whereas a Wald test uses an effect estimate and standard error from a model that includes the variant. That makes the score test attractive for a high-throughput scan, but it does not directly supply the full-model estimate and standard error. A score statistic can indicate evidence against \(H_0\); effect estimation and interpretation require an appropriate fitted model or other estimation procedure. Score tests are also not a universal substitute for a model suited to a different outcome or hypothesis: the Gaussian formulation here should not be applied unchanged to a binary trait.

A frequent error is to use the ordinary residuals \(y-X\hat{\beta}\) and an unadjusted genotype variance as if the observations were independent. Under a mixed model, relatedness changes the covariance weighting, so these calculations generally do not equal \(g^\mathsf{T}Py\) and \(g^\mathsf{T}Pg\). The correction is to use the same fitted null covariance and fixed-effect design in both the score and information, rather than treating the mixed model as ordinary least squares.

Key takeaway: A mixed-model score test asks whether the variant’s covariance-adjusted, fixed-effect-adjusted genotype pattern aligns with null-model residuals. Reusing the fitted null model makes this efficient across variants, but validity depends on a sound null fit, consistent samples, positive information, and appropriate calibration.

Check Your Understanding

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

  1. In \(U=g^\mathsf{T}Py\), what does \(P\) account for that an unadjusted genotype–phenotype product does not?
  2. If a variant has \(U=3\) and \(I=1.5\), calculate its score statistic.
  3. Why can the null model usually be reused when testing many variants?
  4. What does \(I=0\) imply for the score test?
  5. Name one situation in which the usual plug-in chi-square calibration may be less reliable.

Solutions. (1) \(P\) accounts for the covariance structure and removes the component explained by fixed effects. (2) \(T_{\mathrm{score}}=3^2/1.5=6\), compared with \(\chi^2_1\) under the null. (3) The null fit is shared when the phenotype, fixed effects, covariance model, and analyzed individuals remain the same; only the genotype vector changes. (4) The variant has no residual information after adjustment, so the statistic cannot be formed by dividing by \(I\). (5) Examples include a small sample, a rare variant with very little information, or a covariance fit at a boundary or singularity.

Clinical Biostats