Why Local Ancestry Uncertainty Belongs in the Likelihood
A local ancestry call assigns ancestry labels to the chromosome copies near a genomic locus. Such calls are often uncertain: the available genotype and surrounding haplotype data may support several ancestry configurations with different probabilities. Replacing those probabilities by a single best call discards information before testing association. A more direct approach is to calculate the outcome likelihood under each possible ancestry state and average those likelihood contributions using their posterior probabilities.
This averaging is not the same as putting the average ancestry state into a regression predictor. In general, averaging probabilities or densities is different from evaluating a probability or density at an average predictor. The distinction matters particularly for nonlinear models, such as logistic regression, and whenever ancestry states imply different outcome means.
For a diploid locus with two possible ancestral sources, \(S_i\) can be the number of chromosome copies assigned to source A, taking values 0, 1, or 2. A richer state may record the ancestry of each phased chromosome copy, or the ancestry-specific allele counts. The state space must retain the distinctions needed by the outcome model. For example, a model with ancestry-specific genotype effects may require more information than the count of copies from one ancestry alone.
The posterior weights are calculated from genomic information, not from the outcome, under the usual conditional likelihood approach. The outcome is then modeled given the latent state, observed covariates, and any observed genotype quantities used by the association model. If the model depends on several linked loci, the relevant weights are generally probabilities for their joint ancestry configurations, not a product of separate marginal probabilities. The earlier material on local ancestry association under linkage disequilibrium motivates preserving that joint structure when the outcome model requires it.
Model and Assumptions
Write \(C_i\) for observed covariates and \(G_i(S_i)\) for any genotype components whose ancestry assignment depends on the state. A conditional outcome model might have a mean or success probability determined by \(C_i\), \(G_i(S_i)\), and parameters \(\theta\). For instance, a Gaussian model could specify a conditional mean \(\mu_i(s;\theta)\) and variance \(\sigma^2\). A binary-outcome model could specify a logistic conditional probability.
To use the weighted likelihood, the following conditions should be understood. First, the possible states and their weights describe the uncertainty in the local ancestry state conditional on the genomic data \(D_i\). Second, conditional on the state and modeled covariates, the outcome distribution follows the specified model. Third, the weights do not depend on the outcome or on the association parameters being estimated. Finally, if individuals are treated as independent, their outcomes and states must be independent across individuals conditional on the modeled information. If outcomes have residual dependence, the joint outcome model and the joint distribution of the relevant ancestry states must be used instead.
Under these conditions, the likelihood conditional on the genomic data is
The order of operations is important: calculate the outcome likelihood in each state, weight those likelihoods, sum across states, and then take the product across individuals. One must not generally average the state-specific predictors first and then evaluate a single outcome likelihood.
Worked Example: A Gaussian Likelihood Contribution
Suppose an individual has outcome \(y_i=1.1\), with three possible ancestry counts \(S_i=0,1,2\). Assume the hypothetical posterior weights are \(0.20, 0.60, 0.20\), respectively. For illustration, take a Gaussian model with known standard deviation \(\sigma=1\), conditional mean \(\mu_i(s)=0.8s\), and no additional covariates. These are illustrative values, not data from a real study.
The state-specific means are \(0, 0.8,\) and \(1.6\). The Gaussian density at \(y_i\), for each state, is
The three densities are approximately \(0.2179\), \(0.3814\), and \(0.3521\). Thus the marginalized likelihood contribution is
The most likely state is \(s=1\). Treating that state as known would give a contribution of \(0.3814\), not \(0.34284\). The two values are different because the marginal likelihood incorporates all three supported states; the MAP calculation uses only one.
Deriving the Score
The marginal likelihood follows from the law of total probability: conditional on \(D_i\), the outcome distribution is a mixture over the possible states. The score also has a useful interpretation. Define the state-specific score as \(u_i(s;\theta)=\partial\log f_i(y_i\mid s;\theta)/\partial\theta\). Differentiating the log of an individual's marginal contribution gives
where
These \(r_{is}(\theta)\) are the state probabilities after combining the genomic posterior weights with how well each state explains the observed outcome under the current parameter values. They are often called posterior responsibilities. They are not the same as \(q_{is}\): an outcome can make some states more compatible with the fitted model than others. The total score is the sum of these individual scores over \(i\).
Worked Example: State Responsibilities and the Score
Continue with the Gaussian example above, at the specified parameter values. The weighted density contributions for states \(0,1,2\) were \(0.04358, 0.22884,\) and \(0.07042\), with total \(0.34284\). The responsibilities are therefore
For \(\mu_i(s)=\beta s\) and known \(\sigma=1\), the state-specific score for \(\beta\) is \(s(y_i-\beta s)\). At \(\beta=0.8\), the scores for states \(0,1,2\) are \(0\), \(0.3\), and \(-1.0\). The marginal score is
The value is close to zero at these illustrative parameter values. It is a weighted average of the state-specific scores, but the weights are the responsibilities \(r_{is}\), which account for both the genomic uncertainty and the outcome likelihood.
Nonlinear Models and Plug-In Predictors
The distinction between marginalizing and plugging in an average is especially clear for a binary outcome. Suppose \(Y_i\) is Bernoulli with logistic success probability \(P(Y_i=1\mid S_i=s)=\operatorname{logit}^{-1}(\alpha+\beta s)\), where \(\operatorname{logit}^{-1}(x)=1/(1+\exp(-x))\). The marginalized probability of a case is \(\sum_s q_{is}\operatorname{logit}^{-1}(\alpha+\beta s)\). In general, this is not \(\operatorname{logit}^{-1}(\alpha+\beta\sum_s q_{is}s)\).
Worked Example: Logistic Mixture Versus Mean Dosage
Suppose a hypothetical individual has \(P(S_i=0\mid D_i)=0.5\) and \(P(S_i=2\mid D_i)=0.5\), with no other possible states. Set \(\alpha=0\) and \(\beta=2\), and suppose the observed outcome is \(Y_i=1\). Under state 0, the case probability is \(\operatorname{logit}^{-1}(0)=0.5\). Under state 2, it is \(\operatorname{logit}^{-1}(4)\approx0.9820\). The marginalized case probability is
The posterior mean ancestry count is \(0.5(0)+0.5(2)=1\). Substituting that mean into the logistic model instead gives \(\operatorname{logit}^{-1}(2)\approx0.8808\). For the observed case, these are different likelihood contributions: \(0.7410\) under state marginalization and \(0.8808\) under the mean-dosage plug-in. The plug-in does not preserve the uncertainty mixture.
Estimation, Diagnostics, and Alternatives
Parameters can be estimated by maximizing the marginal likelihood or its logarithm. In practice, calculate each individual’s weighted sum on a numerically stable scale, then sum the log contributions. A mixture likelihood may have multiple local optima, particularly when several states have appreciable weight and the outcome provides limited information. Use suitable starting values and check that numerical optimization converges to a stable solution.
Several checks help reveal whether the procedure is being applied appropriately:
- Confirm that each individual’s state weights are nonnegative and sum to one, allowing only small numerical rounding differences.
- Check that the state definition matches the outcome model. If the model uses ancestry-specific alleles, a posterior over ancestry counts alone may not contain enough information.
- Review the spread of the weights. Concentrated weights imply little state uncertainty; diffuse or multimodal weights mean that replacing the mixture by one state can discard substantial information.
- Check whether the ancestry inference used the outcome. If it did, treating its outcome-informed posterior as fixed weights can reuse outcome information; a coherent joint model is needed instead.
- Inspect sensitivity to reasonable changes in ancestry inference or posterior weights. Large changes in association estimates indicate that ancestry uncertainty is consequential.
Uncertainty in estimated association parameters should reflect the marginal likelihood, rather than treating the latent states as observed. If posterior weights themselves are estimated and their uncertainty is material, inference conditional on fixed weights may understate total uncertainty. Resampling or a joint model can be considered to propagate uncertainty from ancestry inference as well.
The main alternatives answer related but distinct questions. A maximum-posterior (MAP) call uses only the state with the largest \(q_{is}\); it is simple but discards the remaining probability mass. A posterior-mean predictor uses an average such as \(\sum_s q_{is}s\); it summarizes ancestry uncertainty but generally does not reproduce the mixture likelihood. Multiple imputation draws complete states from the posterior and fits the model repeatedly, which can be useful but requires appropriate combination of estimates and uncertainty. A joint Bayesian model can represent uncertainty in both ancestry states and model parameters, but requires specifying and computing the joint model. Marginal likelihood is a direct likelihood-based method when the weights are available and its assumptions are credible.
Common Mistakes and Limitations
Common mistake: “The state with posterior probability 0.60 is the most likely, so I can analyze it as if it were known.” The correction is that 0.60 leaves 0.40 probability on other states. The marginal contribution is the weighted sum of the state-specific outcome likelihoods, not the likelihood under the most likely state alone.
A second mistake is to average the ancestry state first and assume the resulting predictor carries the same information as the state distribution. The logistic example shows why that is generally false. Even when a linear conditional mean makes the mean predictor relevant to the marginal mean, the complete outcome distribution and likelihood need not be determined by that mean alone.
Marginalizing over states does not fix a misspecified outcome model, poorly calibrated ancestry probabilities, or omitted confounding. Nor does it make every ancestry-specific effect estimable: how much information the data provide about separate effects is a distinct question. The method accounts for uncertainty represented by the supplied state weights; it cannot recover uncertainty or dependence omitted when those weights were constructed.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- An individual has posterior weights 0.25 and 0.75 for two states. Their outcome likelihoods at a fixed parameter value are 0.10 and 0.30. What is the marginalized likelihood contribution?
- Why can a posterior-mean predictor give a different likelihood from state marginalization in logistic regression?
- What are the responsibilities \(r_{is}\), and how do they differ from the ancestry weights \(q_{is}\)?
- What should be used if an outcome model at two linked loci depends on their joint local ancestry configuration?
Solutions. (1) The contribution is \(0.25(0.10)+0.75(0.30)=0.025+0.225=0.250\). (2) The inverse-logit function is nonlinear, so the average of state-specific probabilities generally differs from the probability evaluated at the average predictor. (3) Responsibilities are \(r_{is}=q_{is}f_i(y_i\mid s;\theta)/\sum_t q_{it}f_i(y_i\mid t;\theta)\); they combine ancestry weights with state-specific outcome likelihoods at the current parameter values. (4) Use posterior probabilities for joint ancestry configurations and sum the outcome likelihood over those configurations.