Tutorials › Statistical Genetics › Marginal and Conditional Association

Conditional and Joint Association · Tutorial 598 of 989

Marginal and Conditional Association

Learn how marginal and conditional variant coefficients answer different association questions, and how to calculate and interpret their standard errors.

Advanced 12 min read

What You'll Learn

  • Define marginal and conditional variant association using regression models
  • Interpret coefficients in a single-variant model and a model including another locus variant
  • Calculate two-variant regression coefficients from genotype and outcome cross-products
  • Compute standard errors under the homoskedastic linear model
  • Explain why linkage disequilibrium can change both coefficients and precision
  • Identify common interpretation errors when comparing models

Why Distinguish Marginal and Conditional Association?

At a locus, nearby variants may be correlated because of linkage disequilibrium. A regression that includes one variant at a time asks whether that variant is associated with the outcome on its own in the specified model. A regression that includes multiple variants asks whether each is associated with the outcome given the other included variants. Those are different questions, so their coefficients and standard errors need not agree.

This distinction matters when interpreting a locus-wide analysis. A single-variant association can reflect information shared with correlated variants; a conditional coefficient describes the part of the association assigned to that variant after accounting for the other variants in the model. Neither regression, by itself, establishes that a variant causes the outcome.

Models and Definitions

Let \(Y_i\) be a quantitative outcome for individual \(i\), \(G_{1i}\) and \(G_{2i}\) be genotype dosages for two variants, and \(C_i\) be a vector of baseline covariates that does not include an intercept. Each regression below includes its own intercept \(\alpha\). Genotype dosage is commonly measured as the number of copies of a specified allele, on a scale from 0 to 2.

Definition: A marginal association coefficient for a variant is its regression coefficient in a model that includes that variant and the specified baseline covariates, but not the other locus variants being considered. A conditional association coefficient is its coefficient in a model that includes the variant, the same baseline covariates, and the other specified locus variants. “Conditional” refers to the predictors included in that model; it does not mean that the coefficient is a causal effect.

For variant 1, a marginal model and a two-variant conditional model can be written as

$$ Y_i=\alpha_M+\gamma_M^{T}C_i+\beta_{1M}G_{1i}+\varepsilon_{iM} $$

and

$$ Y_i=\alpha_C+\gamma_C^{T}C_i+\beta_{1C}G_{1i}+\beta_{2C}G_{2i}+\varepsilon_{iC}. $$

The subscript \(M\) labels quantities from the marginal model and \(C\) labels quantities from the conditional model. The models generally have different residuals and fitted coefficients. For example, \(\beta_{1M}\) is the outcome difference associated with a one-unit increase in \(G_1\), according to the model that omits \(G_2\). In the conditional model, \(\beta_{1C}\) is the corresponding difference among individuals with the same modeled values of \(G_2\) and \(C_i\).

Model assumptions: For ordinary least-squares estimates and the conventional standard errors below, assume independent observations, a correctly specified linear conditional mean, errors with conditional mean zero and constant variance, and a design matrix with no exact linear dependence among its columns. Normal errors give exact \(t\)-based inference in finite samples; without normality, large-sample inference may be appropriate under additional regularity conditions. If observations are related or the variance is not constant, the conventional standard errors may not be appropriate.

How Coefficients Can Differ

A short derivation makes the role of genotype correlation explicit in a simple setting. Suppose the outcome and the two genotype columns have been centered, so an intercept is not needed in the calculation. Write \(S_{11}=\sum_i G_{1i}^2\), \(S_{22}=\sum_i G_{2i}^2\), \(S_{12}=\sum_i G_{1i}G_{2i}\), and \(S_{1Y}=\sum_i G_{1i}Y_i\), with analogous notation for \(S_{2Y}\). The least-squares normal equations for the two-variant model are

$$ S_{11}\beta_{1C}+S_{12}\beta_{2C}=S_{1Y}, \qquad S_{12}\beta_{1C}+S_{22}\beta_{2C}=S_{2Y}. $$

Solving this pair of equations gives the conditional coefficient for variant 1:

$$ \beta_{1C} = \frac{S_{1Y}S_{22}-S_{2Y}S_{12}}{S_{11}S_{22}-S_{12}^{2}}. $$

In the separate single-variant regressions, \(\beta_{1M}=S_{1Y}/S_{11}\) and \(\beta_{2M}=S_{2Y}/S_{22}\). Substituting these into the expression above yields

$$ \beta_{1C} = \frac{\beta_{1M}-(S_{12}/S_{11})\beta_{2M}} {1-S_{12}^{2}/(S_{11}S_{22})}. $$

This identity applies to centered variables with no additional covariates. It shows that when the genotype columns are correlated, the conditional coefficient generally differs from the marginal coefficient; the size and direction of the difference also depend on how the outcome relates to both variants. If the genotype columns are uncorrelated, \(S_{12}=0\), and the two coefficients for variant 1 are equal in this simple setting. With covariates, the regression coefficients must be obtained from the full specified models rather than this simplified identity.

Worked Example: Uncorrelated Variants

Suppose four hypothetical individuals have centered genotype columns \(G_1=(-1,-1,1,1)\), \(G_2=(-1,1,-1,1)\), and centered outcomes \(Y=2G_1+0.5G_2+E\), where \(E=(1,-1,-1,1)\). Each column has squared length 4, and their pairwise cross-products are zero. The error vector is also orthogonal to both genotype columns. These constructed data satisfy the full-rank condition, and the residuals have mean zero; for this arithmetic illustration, assume the usual independent, equal-variance error model.

In the single-variant model for \(G_1\), its coefficient is

$$ \hat{\beta}_{1M} = \frac{\sum_i G_{1i}Y_i}{\sum_i G_{1i}^{2}} = \frac{2(4)}{4} =2. $$

The residual is \(0.5G_2+E\). Orthogonality gives residual sum of squares \(0.5^2(4)+4=5\), with \(4-2=2\) residual degrees of freedom. Thus \(MSE=5/2=2.5\), and the conventional standard error is \(\sqrt{2.5/4}=0.7906\) outcome units per dosage unit.

In the two-variant model, the coefficients are \(2\) and \(0.5\), because the genotype columns are orthogonal. The residual is \(E\), so the residual sum of squares is 4 and the residual degrees of freedom are \(4-3=1\). The standard error of either coefficient is \(\sqrt{(4/1)(1/4)}=1\) outcome unit per dosage unit. The point estimate for \(G_1\) is unchanged here, but its standard error is not: adding a predictor changes the residual variance estimate and the degrees of freedom.

Worked Example: Correlated Variants and Changed Coefficients

Consider eight hypothetical individuals with centered genotype columns \(G_1=(-1,-1,-1,-1,1,1,1,1)\) and \(G_2=(1,-1,-1,-1,1,1,1,-1)\). Both have squared length 8, and their cross-product is 4. Let \(E=(1,-1,0,0,0,0,-1,1)\), which is centered and orthogonal to both genotype columns. Define the hypothetical centered outcome as \(Y=(5/3)G_1-(1/3)G_2+E\). These columns are not perfectly collinear, and the constructed residual is orthogonal to the included predictors.

The outcome cross-products are \(\sum_iG_{1i}Y_i=12\) and \(\sum_iG_{2i}Y_i=4\). Therefore the two marginal slopes are

$$ \hat{\beta}_{1M}=12/8=1.5, \qquad \hat{\beta}_{2M}=4/8=0.5. $$

For the conditional model, the normal equations are \(8\hat{\beta}_{1C}+4\hat{\beta}_{2C}=12\) and \(4\hat{\beta}_{1C}+8\hat{\beta}_{2C}=4\). Solving gives \(\hat{\beta}_{1C}=5/3=1.667\) and \(\hat{\beta}_{2C}=-1/3=-0.3333\). In particular, the second coefficient is negative: \((8(4)-4(12))/(8(8)-4^2)=-16/48=-1/3\). The residual is \(E\), so the conditional residual sum of squares is 4, with \(8-3=5\) residual degrees of freedom.

For \(G_1\), the marginal-model residual is \(Y-1.5G_1=(1/6)G_1-(1/3)G_2+E\). Its squared length is \(2/3+4=14/3\), so the marginal residual mean square is \((14/3)/6=7/9\). The marginal standard error is \(\sqrt{(7/9)/8}=0.3118\). In the conditional model, the inverse of the genotype cross-product matrix has diagonal entries \(8/(8(8)-4^2)=1/6\). Its standard error for \(G_1\) is therefore \(\sqrt{(4/5)(1/6)}=0.3651\). Here conditioning changes the estimate from 1.5 to 1.667 outcome units per dosage unit, and also changes its standard error.

Standard Errors and What They Measure

A coefficient is an estimate from a particular model; its standard error describes its sampling variability under that model. For a linear regression with design matrix \(X\), \(n\) observations, and \(r\) linearly independent columns, the homoskedastic ordinary least-squares covariance estimate is \(\widehat{\sigma}^{2}(X^{T}X)^{-1}\), where \(\widehat{\sigma}^{2}=SSE/(n-r)\). The standard error of a coefficient is the square root of its corresponding diagonal entry. The marginal and conditional models have different design matrices, residual sums of squares, and residual degrees of freedom, so their standard errors can differ even when their coefficient estimates are similar.

When genotype columns are strongly correlated, there is less independent variation with which to distinguish their coefficients. This can make conditional estimates less precise. It does not guarantee that every conditional standard error will exceed its marginal counterpart: adding a predictor also changes the residual variance estimate and degrees of freedom. Standard errors should therefore be calculated from the fitted model, not inferred from the coefficient change alone.

Worked Example: Comparing Precision in a Hypothetical Locus Analysis

Suppose a hypothetical study has \(n=100\) independent participants, centered genotype columns with \(\sum G_1^2=\sum G_2^2=100\) and \(\sum G_1G_2=90\), and centered outcome cross-products \(\sum G_1Y=9.8\) and \(\sum G_2Y=9.2\). Assume the full-rank linear model conditions described above. The genotype correlation in these centered columns is \(90/\sqrt{100(100)}=0.9\).

The marginal slope for \(G_1\) is \(9.8/100=0.098\) outcome units per dosage unit. Solving the two normal equations, \(100\hat{\beta}_{1C}+90\hat{\beta}_{2C}=9.8\) and \(90\hat{\beta}_{1C}+100\hat{\beta}_{2C}=9.2\), gives conditional estimates \(0.08\) for \(G_1\) and \(0.02\) for \(G_2\). Thus, the \(G_1\) estimate is \(0.098\) in the single-variant model and \(0.08\) in the model holding \(G_2\) fixed.

If the conditional residual sum of squares is 970, its residual degrees of freedom are \(100-3=97\), giving \(MSE=970/97=10\). The inverse cross-product matrix has diagonal entry \(100/(100(100)-90^2)=100/1900=1/19\). Hence the conditional standard error for \(G_1\) is \(\sqrt{10/19}=0.7255\) outcome units per dosage unit.

For comparison, the marginal-model residual sum of squares is \(970+0.02^2(19)=970.0076\). The added term is the reduction in residual sum of squares from including \(G_2\) after \(G_1\), using its conditional coefficient and the remaining squared variation \(100-90^2/100=19\). The marginal residual degrees of freedom are 98, so its standard error for \(G_1\) is \(\sqrt{(970.0076/98)/100}=0.3146\). The conditional estimate is less precise in this example; its standard error is larger, consistent with the strong genotype correlation. Both standard errors are in outcome units per dosage unit, and each pertains to its own model.

Interpretation and Common Pitfalls

A marginal coefficient describes the association captured by a one-variant regression after the stated baseline covariate adjustment. A conditional coefficient describes the association remaining for that variant when the other included variants are held fixed in the model. The latter interpretation is meaningful only to the extent that the data contain enough independent genotype variation to estimate those coefficients. If two genotype columns are perfectly linearly dependent, the separate conditional coefficients cannot be uniquely estimated.

  • Wrong: “The marginal and conditional coefficients estimate the same quantity, so a difference means one calculation is wrong.” Correction: The models condition on different predictors and can estimate different regression parameters.
  • Wrong: “The conditional coefficient is the causal effect of the variant.” Correction: It is a model-based association conditional on included variables; regression adjustment alone does not establish causality.
  • Wrong: “A smaller conditional coefficient must have a smaller standard error.” Correction: Coefficient magnitude and standard error are distinct; calculate uncertainty from the fitted model’s residual variance and design matrix.
  • Wrong: “A marginal association proves the variant has an independent association.” Correction: Independence from other variants is not assessed by a model that omits them.
Key takeaway: Always identify the regression model before interpreting a locus coefficient. A marginal coefficient summarizes association in a single-variant model; a conditional coefficient summarizes association given the other included variants. Their standard errors quantify uncertainty under their respective models.

Check Your Understanding

Answer each question by naming the model and the quantity being interpreted.

  1. In a regression of an outcome on one variant and baseline covariates, what does the variant’s marginal coefficient describe?
  2. What additional predictors are included to obtain a conditional coefficient for a variant at a two-variant locus?
  3. Why can correlated genotype columns lead to different marginal and conditional coefficients?
  4. In a homoskedastic ordinary least-squares model, what ingredients determine a coefficient’s conventional standard error?
  5. Why is a conditional association coefficient not automatically a causal effect?
Clinical Biostats