1 INTRODUCTION
The linear mixed model (LMM) has emerged as an effective tool in controlling for population structure and relatedness in a study sample to reduce false positives in genetic association studies [
1]. Consider a standard LMM in genetic association literature
where contains conventional covariates such as age and sex, including a column of ; contains genetic variant(s) to be tested for association; and is the random effect with as its loading matrix and , whose ‐th entry is twice the kinship between samples and , as its covariance matrix (both and are known). denotes an n‐dimensional multivariate normal distribution, is n‐dimensional identity matrix. In genetic association studies, the random effect is a nuisance term that absorbs part of the phenotype that is attributable to population stratification and relatedness. Here is a hyperparameter, measuring the ratio between two dispersion terms (random effect and random noise ).
In classical literature,
is known [
2]. In Genome‐Wide Association Study applications, however,
is an important parameter to be estimated, either using maximum likelihood (ML) or restricted maximum likelihood (REML) approaches [
3]. Conditioning on
estimates of
and
can be obtained and either the likelihood ratio test or Wald test can be used to compute a
p‐value to test against the following null model
where the hyperparameter
was estimated from the alternative Model (1). IDUL algorithm is an efficient and asymptotically exact algorithm to estimate
[
3], and IDUL software can compute likelihood ratio test
p‐value using ML estimate of
or Wald test
p‐value using REML estimate of
.
Bayes factors have advantages over
p‐values, particularly for comparing multiple non‐nested alternative models [
4]. An efficient method to compute Bayes factors for LMM in the context of genetic association studies is missing. Our main objective here is to develop an efficient method to evaluate Bayes factors for the LMM. In order to do that, we first transform the LMM Model (1) to a Bayesian linear regression with a specific prior, then use standard normal inverse gamma priors on regression parameters to express Bayes factors in a closed form, which can be evaluated efficiently. The transformed Bayesian linear regression can be used for prediction, and we show that the Bayesian prediction is identical to that of best linear unbiased prediction (BLUP) [
5].
2 RESULTS
2.1 Bayesian linear regression
With reference to Model (1), the genetic relatedness matrix can be computed as . Let the eigen decomposition of as , where with and . Model (1) can be rewritten as
where the prior on has been specified. Model (3) is equivalent to Model (1). To see this, Similarly, Model (2) can be rewritten as
Note the priors on
are the same between the null and the alternative models. The hyperparameter
can be estimated and plugged in. Its ML estimate can be efficiently computed [
3].
2.2 Priors and Bayes factors
Let
. By specifying a Gamma prior on
, we have the standard normal‐inverse‐gamma on a linear model [
6,
7].
For Model (4), after integrating out and and letting , we have
where . Similarly, for Model (3), we have
where . The Bayes factor , after letting is
Note that, by letting
, we used improper priors, but both the posterior and Bayes factors are proper [
6]. The Bayes factor can be evaluated efficiently (Section 4).
In practice, we need to specify
to compute Bayes factors. Following prior works [
6], we used
. With this choice, the prior
puts a probability of
for effect size to be in interval
a probability of
for effect size to be in interval
and a probability of
for effect size to be in interval
One can also learn prior effect sizes from a histogram estimates of past study and use it as prior for the current study.
2.3 Numerical examples
Figure 1 shows comparisons between Bayes factors computed using Equation (8) and
p‐values from the likelihood ratio test calculated using IDUL software [
3], stratified according to minor allele frequencies (MAF) of the SNPs. The data, consisting
whole genome sequenced samples with high level of relatedness and 79 protein assay phenotypes, were described previously [
8]. We make the following observations: (1) In general, large Bayes factors correspond to small
p‐values. (2) Different Bayes factors might have the same
p‐values, and different
p‐values might have the same Bayes factors. (3) The left panel shows that, for SNPs with the same
p‐values, those having larger MAF tend to have larger Bayes factors than those having smaller MAF. This is because Bayes factors penalize SNPs of small MAF for their lower information contents through the prior effect size [
9]. (4) Previously, it has been demonstrated that asymptotically
, where
increases with the SNP MAF and is also a function of prior effect size [
7]. The right panel reflects the mathematical insight between Bayes factors and their corresponding
‐values.
2.4 Bayesian prediction and BLUP
From Model (4) we estimate parameters of and by (Section 4). Note both are column vectors. For a new sample, we have a row vector for covariates and a row vector for genetic relatedness between the new sample with existing samples. Then the Bayesian prediction for the new sample is
where is the least square prediction (based on genetic relatedness) of the new sample onto (Section 4). For an existing sample , is the ‐th row of the matrix .
We now show that the BLUP is identical to Bayesian prediction. From the frequentist point of view,
is a random vector instead of a fixed parameter, it can only be
predicted instead of
estimated. The Bayesian interpretation of BLUP is well known [
5]. Here we offer a new derivation that is perhaps more natural from the perspective of genetic association studies. For BLUP one first estimates
where
and then estimate
. Note both are column vectors. Thus for the new sample, BLUP prediction is
where is the least square prediction (based on genetic relatedness) of the new sample onto (Section 4). For an existing sample , is the ‐th row of the matrix .
To show Bayesian prediction in Equation (9) is identical to BLUP in Equation (10), it is sufficient to show that and , which we defer to Section 4. Therefore, BLUP is identical to Bayesian prediction under a specific prior. For the existing samples, we can compute residuals using either Bayesian estimates or BLUP as following:
Residuals are useful in removing spurious correlations due to population structure and (cryptic) relatedness for subsequent analysis, such as studying gene‐gene interaction and gene networks using gene expression values.
3 DISCUSSION
It is a common practice to control for top principal components (PCs, the columns of the matrix) in genetic association study to control for population stratification. It is self‐evident that if a putative causal SNP is correlated with both phenotype and top PCs, this practice of controlling for top PCs will reduce power. Our derivation suggests that when controlling for top PCs, one should put prior on their effect sizes , where is a submatrix of corresponding to the top PCs. Intuitively, the prior will keep some variations of PCs in the phenotypes for the putative causal SNPs, and a priori, the eigenvalues are the right amount of variation to be controlled for.
In classical literature dealing with LMM [
2,
5], the covariance structure of the error term is a more general
instead of our diagonal
. We can left multiplying
(where
is a generalized inverse) to convert the classical form to the form in Model (1). In fact, we can rotate the system further and compute the (empirical) Bayes factor based on a rotated simple linear regression. Multiplying both side of Model (4) by
we get
, where
and
. Let
and scale
and
by left multiplying
, we get
where and . Similarly Model (3) becomes
where
. Then using priors specified in Equation (5), we can compute Bayes factors [
6]. This rotation approach was briefly mentioned by Wen [
10]. Bayes factors from this approach is equivalent to Equation (8), but this approach obscures insights on Bayesian prediction and its equivalence to BLUP.
We took an empirical Bayesian approach and plugged in ML estimate of the hyperparameter
. Of course, we can take the full Bayesian approach by coming up with a prior for
. One sensible choice is to define
and assign a uniform prior
on
. Then
has a probability density function
which is heavy tailed [
9]. This full Bayesian approach is advantageous in principle, as it accounts for variation of
, but the computation is difficult, as this prior cannot be integrated out analytically, and either sampling or numerical integration are required for computation. For example, Wen [
10] took a full Bayesian approach assigning priors on
and
, and elected to compute approximate Bayes factors for LMM. On the other hand, by plugging in ML estimate
, the subsequent computation can be done analytically. And this empirical Bayes approach is considered approximation to the full Bayesian treatment.
Finally, Bayes factor is more desirable than
p‐values in applications that require comparing multiple non‐nested alternative models. One such example is comparing genotype effect, paternal effect, and maternal effect, and paternal‐maternal joint effects of the same SNP. To compare two alternative models such as paternal effect and maternal effect, one can simply divide two Bayes factors to obtain a valid Bayes factor between two models [
4], while it is difficult to derive a valid
p‐value (from two
p‐values) to compare the two models. More details can be found in our manuscript on parent‐of‐origin effect eQTL [
11]. Methods developed here are implemented in a software package IDUL [
3].
4 METHODS
4.1 Computation
Bayes factor Equation (8) can be evaluated efficiently. This computation was documented previously [
8], and we reproduced it here for context clarity. As
and denote
,
we compute its determinant using the identity
to get
Using the identities
we get
Note that for large matrices the computation only involves an inexpensive matrix multiplying vector, without expensive matrix multiplication and matrix inversion. Specifically, in computing , is by , is by with . So that computing consists of matrix‐vector multiplication. Since is a diagonal, computing is just linearly scaling the rows of . For small matrices such and , which are by , the multiplication and inversion are inexpensive. The only expensive calculation is the eigen decomposition to obtain Q and D, which only needs to be done once. Similarly, both and can be efficiently computed. Finally,
4.2 Least square projection
Let be the ‐th column of , and consider model . The least square estimates of . For a new observation , the prediction on the is . Since this is true for each , we have the least square prediction onto based on genetic relatedness is . The same arguments apply to as well.
4.3 Equivalence
With the notations defined in the main text, we aim to show and . With reference to Equation (15) and the fact that we have
and
Published 2026. This article is a U.S. Government work and is in the public domain in the USA. Quantitative Biology published by John Wiley & Sons Australia, Ltd on behalf of Higher Education Press.