Tutorials › High-Dimensional Genomic Data Analysis › Wald Tests with Mixed-Model Standard Errors

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

Wald Tests with Mixed-Model Standard Errors

Compute a variant-effect Wald statistic and confidence interval using the covariance from a fitted linear mixed model, and assess when the resulting inference is reliable.

Advanced 11 min read

What You'll Learn

  • Write the linear mixed model and identify the covariance matrix used for association inference.
  • Derive the generalized least-squares covariance of the fixed-effect estimates.
  • Compute a variant-effect standard error, Wald statistic, p-value, and confidence interval.
  • Distinguish exact known-covariance inference from plug-in inference after variance-component estimation.
  • Diagnose rank, covariance, coding, and calibration problems that can make Wald results misleading.
  • Compare Wald inference with other association-test approaches without confusing their assumptions.

Why the Standard Error Is Part of the Association Test

A variant-effect estimate is not interpretable as evidence of association by itself. The same estimated effect can provide strong or weak evidence depending on its uncertainty. In a linear mixed model (LMM), that uncertainty depends on the covariance among individuals, including covariance induced by genetic relatedness. A Wald test combines the estimated effect with its mixed-model standard error; using an ordinary regression standard error instead can therefore change the test and its interpretation.

The focus here is inference for one variant effect conditional on the covariates and covariance model. The earlier material on conditional association tests under a fitted LMM establishes the setting: the variant is added as a fixed effect while the mixed-model covariance accounts for dependence among observations. The key task is to use the covariance of that fixed-effect estimate correctly.

Model and Conditions for Wald Inference

Let \(y\) be the \(n\)-vector of quantitative phenotypes, \(C\) the design matrix for fixed covariates, and \(g\) the \(n\)-vector of genotype dosages for one variant, usually coded as 0, 1, or 2 copies of an allele. The scalar \(\beta\) is the change in expected phenotype per dosage unit, conditional on the covariates. Write \(X=[C\;g]\) and \(\theta=(\gamma^\mathsf{T},\beta)^\mathsf{T}\), where \(\gamma\) contains the covariate effects.

Model: \(y=X\theta+u+\varepsilon\), where \(u\sim N(0,\tau K)\), \(\varepsilon\sim N(0,\sigma_e^2 I)\), and \(u\) and \(\varepsilon\) are independent. Here \(K\) is the genomic relationship matrix, \(\tau\) is the random-effect variance component, and \(\sigma_e^2\) is the residual variance. Thus \(y\sim N(X\theta,V)\), with \(V=\tau K+\sigma_e^2 I\).

For the formulas below, \(V\) must be positive definite and \(X\) must have full column rank. Full column rank means that no column of \(X\) is an exact linear combination of the others; in particular, the genotype column must contribute information not already contained in the covariates. These conditions make \(X^\mathsf{T}V^{-1}X\) invertible and the fixed effects identifiable. If they fail, the displayed inverse and unique GLS estimate do not exist; a generalized inverse alone does not make a non-identifiable variant effect estimable.

First suppose \(V\) is known. In practice, \(\tau\) and \(\sigma_e^2\) are estimated, commonly from a fitted null model, and the resulting covariance is substituted for \(V\). That distinction matters: the familiar covariance formula is exact when \(V\) is known, while inference using an estimated covariance is generally a plug-in approximation.

GLS Estimate and Its Standard Error

With \(V\) known and the rank and positive-definiteness conditions satisfied, generalized least squares (GLS) gives

$$ \hat{\theta}=(X^\mathsf{T}V^{-1}X)^{-1}X^\mathsf{T}V^{-1}y, \qquad \operatorname{Cov}(\hat{\theta})=(X^\mathsf{T}V^{-1}X)^{-1}. $$

The standard error of \(\hat{\beta}\) is the square root of the diagonal entry of this covariance matrix corresponding to the genotype coefficient. It is not generally the standard error from ordinary least squares (OLS), which treats observations as uncorrelated with a common residual variance.

Definition: For testing \(H_0:\beta=0\), the Wald statistic is \(Z_W=\hat{\beta}/SE(\hat{\beta})\). Under the normal model with known \(V\), \(Z_W\sim N(0,1)\) under \(H_0\). The two-sided p-value is \(2P(Z\geq |Z_W|)\), where \(Z\sim N(0,1)\). A 95% Wald confidence interval is \(\hat{\beta}\pm1.96SE(\hat{\beta})\).

The interpretation is in the units of the phenotype per genotype-dosage unit. For example, if the phenotype is measured in millimetres of mercury (mmHg), \(\beta\) is the conditional mean difference in mmHg for each additional dosage unit. The p-value describes how unusual a statistic at least as extreme would be under the null and stated model; it is not the probability that the null hypothesis is true.

Why the Covariance Formula Holds

The result follows directly from the GLS estimator's linear form. Let \(A=(X^\mathsf{T}V^{-1}X)^{-1}X^\mathsf{T}V^{-1}\), so that \(\hat{\theta}=Ay\). Since \(E(y)=X\theta\), \(E(\hat{\theta})=AX\theta=\theta\). Its covariance is

$$ \begin{aligned} \operatorname{Cov}(\hat{\theta}) &=A\,\operatorname{Cov}(y)\,A^\mathsf{T}\\ &=(X^\mathsf{T}V^{-1}X)^{-1}X^\mathsf{T}V^{-1}V V^{-1}X(X^\mathsf{T}V^{-1}X)^{-1}\\ &=(X^\mathsf{T}V^{-1}X)^{-1}. \end{aligned} $$

The simplification uses the symmetry of \(V\) and \(V^{-1}\), and the inverse exists because \(V\) is positive definite and \(X\) has full column rank. Under normality, a linear transformation of \(y\) is normal, so \(\hat{\theta}\) is normal with this mean and covariance. Dividing the null-centered genotype estimate by its known standard deviation therefore gives the standard normal Wald statistic. This is the justification for the stated reference distribution, not merely a convention attached to the ratio.

Worked Example: A Variant Effect, Wald Test, and Confidence Interval

Suppose a hypothetical fitted LMM reports a per-allele effect estimate of \(0.180\) mmHg. The genotype coefficient's diagonal variance entry in the GLS covariance matrix is \(0.003025\) \((\text{mmHg per dosage})^2\). Assume the covariance matrix used for this calculation is treated as known, the design matrix has full column rank, and the model assumptions above hold.

The standard error is the square root of that variance entry:

$$ SE(\hat{\beta})=\sqrt{0.003025}=0.0550\ \text{mmHg per dosage}. $$

For \(H_0:\beta=0\), the statistic is \(0.180/0.0550=3.2727\). The two-sided standard-normal p-value is \(2P(Z\geq3.2727)\approx0.001065\). Under this model, the data provide evidence against a zero conditional per-allele effect at the 0.05 significance level.

The 95% confidence interval is

$$ 0.180\pm1.96(0.0550)=0.180\pm0.1078=(0.0722,\ 0.2878)\ \text{mmHg per dosage}. $$

In repeated use of this procedure under the stated model, intervals constructed this way would cover the true conditional effect about 95% of the time. This interval estimates a positive effect in the hypothetical example; it does not mean there is a 95% probability that the fixed parameter lies within this particular interval.

Using Estimated Mixed-Model Covariance

In a GWAS, the covariance parameters are not usually known. A common procedure fits the null model, obtains estimates such as \(\hat{\tau}\) and \(\hat{\sigma}_e^2\), forms \(\hat{V}=\hat{\tau}K+\hat{\sigma}_e^2I\), and uses \(\hat{V}\) in the GLS calculation. The resulting estimated covariance is

$$ \widehat{\operatorname{Cov}}(\hat{\theta}) =(X^\mathsf{T}\hat{V}^{-1}X)^{-1}. $$

The genotype component's diagonal entry gives the plug-in variance and its square root gives the reported mixed-model standard error. Because \(\hat V\) is estimated rather than fixed, this expression does not account fully for uncertainty in the variance-component estimates. Wald \(Z\) tests and normal-based intervals using this standard error are often justified as large-sample approximations, but finite-sample calibration can differ. Some software uses a \(t\) reference distribution or a degrees-of-freedom approximation; the reference distribution and method should be reported rather than silently treating all implementations as identical.

Worked Example: Reading a Covariance Matrix Correctly

In a hypothetical two-coefficient model, suppose the reported plug-in covariance matrix for an intercept and a variant effect is

$$ \widehat{\operatorname{Cov}} \begin{pmatrix}\hat{\gamma}\\\hat{\beta}\end{pmatrix} = \begin{pmatrix} 0.0100 & 0.00200\\ 0.00200 & 0.003025 \end{pmatrix}. $$

Assume the design is full rank and the fitted covariance is positive definite. The variant-effect variance is the lower-right entry, not the off-diagonal covariance. Thus \(SE(\hat{\beta})=\sqrt{0.003025}=0.0550\). The off-diagonal value \(0.00200\) describes estimated covariance between the intercept and variant effect; it is not the variant-effect standard error.

If the estimate is \(0.180\) mmHg per dosage, the plug-in Wald statistic is \(0.180/0.0550=3.2727\), and the normal-reference two-sided p-value is approximately \(0.001065\). The calculation is the same as in the previous example, but the interpretation should acknowledge that the reference is approximate because the covariance parameters were estimated.

Worked Example: Changing Genotype Units

Suppose the hypothetical estimate is \(0.180\) mmHg per dosage unit with \(SE=0.0550\), where dosage is coded 0, 1, or 2. Now define a new predictor \(g^*=2g\), so one unit of \(g^*\) represents two original dosage units. The fitted effect and standard error in this new unit are both doubled: \(\hat{\beta}^*=2(0.180)=0.360\) mmHg per new unit and \(SE(\hat{\beta}^*)=2(0.0550)=0.110\).

The Wald ratio does not change: \(0.360/0.110=3.2727\), so its p-value is still approximately \(0.001065\). The interval becomes \(0.360\pm1.96(0.110)=(0.1444,0.5756)\) mmHg per new unit, exactly twice the former interval. The numerical coefficient and standard error depend on coding; the evidence for a zero effect does not, provided estimate and standard error are transformed consistently.

Diagnostics, Alternatives, and Limitations

Before interpreting a Wald result, check that the genotype and covariate design is identifiable, the covariance matrix is valid, and the reported standard error belongs to the intended model. A nearly redundant genotype column can produce a large standard error or unstable estimate even if there is no exact rank failure. Also check allele coding, dosage scale, phenotype units, and whether the model's covariance specification is plausible for the data. Incorrect relatedness or variance-component estimates can distort uncertainty; a small standard error does not by itself establish that the model is well calibrated.

  • Rank failure: If genotype is completely determined by covariates, its separate effect cannot be estimated. Do not report a Wald statistic as though the inverse existed.
  • Wrong covariance: Substituting an OLS standard error ignores modeled dependence and can misstate precision.
  • Plug-in certainty: Treating estimated variance components as known can make the normal reference too optimistic in some settings.
  • Scale mismatch: Reporting an effect per allele when the predictor was rescaled, or omitting phenotype units, gives a misleading interpretation.

A Wald test is convenient because it uses an estimated effect and its standard error, and it directly produces an interval on the effect scale. It is not the only possible association test. Score tests can be advantageous for fast scans because they evaluate a variant under a fitted null model, while likelihood-ratio tests compare fitted likelihoods under null and alternative models. These tests are related but are not interchangeable in every finite sample or under every approximation. Their derivations and implementation choices are distinct; the central point here is to interpret the Wald result using the standard error and reference distribution actually supplied by the fitted LMM.

The key limitation is that a correctly calculated Wald statistic cannot repair a misspecified mean or covariance model, poor phenotype or genotype data, or inadequate calibration. It tests a conditional fixed-effect null under the chosen model. It does not establish causation, and a non-significant result does not prove that the effect is exactly zero.

Key takeaway: For an identifiable genotype effect in an LMM, use the variant coefficient's own diagonal variance from the GLS covariance matrix, take its square root for the standard error, and state whether the Wald reference is exact for known \(V\) or approximate after estimating covariance parameters.

Check Your Understanding

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

  1. A variant estimate is \(0.12\) phenotype units per dosage with standard error \(0.04\). Calculate its Wald statistic and two-sided normal-reference p-value.
  2. Why is full column rank required for the stated GLS inverse formula? Give the consequence if the genotype column is exactly a covariate combination.
  3. A fitted effect has estimate \(-0.10\) trait units and standard error \(0.08\). Calculate its 95% Wald interval and interpret it.
  4. What changes when the covariance matrix is estimated rather than known, and what should be checked when reporting a Wald result?

Solutions. (1) \(Z_W=0.12/0.04=3.00\); the two-sided normal p-value is \(2P(Z\geq3.00)\approx0.00270\). (2) Full column rank makes \(X^\mathsf{T}V^{-1}X\) invertible and the fixed effects uniquely estimable. If genotype is an exact covariate combination, its separate effect is not identifiable, so the displayed inverse and unique estimate do not exist. (3) The interval is \(-0.10\pm1.96(0.08)=-0.10\pm0.1568=(-0.2568,0.0568)\) trait units per stated predictor unit. It includes zero; under this method it does not exclude a zero effect at the 5% level. (4) Replacing \(V\) by an estimate gives a plug-in standard error and generally approximate Wald inference because variance-component uncertainty is not fully represented. Check rank, covariance and model fit, units, coding, and the reference distribution or degrees-of-freedom method used.

Clinical Biostats