Tutorials › Statistical Genetics › Gene–Environment Correlation and Conditional Effects

Gene–Environment Interaction · Tutorial 810 of 989

Gene–Environment Correlation and Conditional Effects

Distinguish a model’s conditional interaction coefficient from a population-average contrast, and choose adjustments that target the intended comparison.

Advanced 10 min read

What You'll Learn

  • Define genotype–environment correlation and distinguish it from interaction.
  • Interpret a product-term coefficient as a conditional contrast under a specified model.
  • Calculate how differing exposure distributions change a marginal genotype comparison.
  • Explain how covariate composition can create a crude interaction absent from conditional means.
  • Choose adjustment and standardization strategies to match a stated estimand.

Why Genotype–Exposure Correlation Matters

A genotype and an exposure need not occur independently. People with different genotypes may have different exposure distributions because of ancestry, family or social processes, or chance. This dependence is called gene–environment correlation. It matters for interaction analysis because the exposure levels represented among one genotype group may differ from those represented among another.

Correlation alone does not establish interaction, confounding, or a causal mechanism. Interaction concerns how an outcome contrast changes across levels of another variable, on a specified scale. Correlation concerns how the variables are distributed together. The two can coexist, but they answer different questions. In particular, an interaction coefficient from a regression model describes a contrast conditional on the model’s other variables; it is not automatically the population-average effect one might want to report.

We begin with a binary genotype indicator \(G\), coded 0 for the reference genotype and 1 for the comparison genotype, and a binary exposure \(E\), coded 0 and 1. The outcome \(Y\) is quantitative. These simple codings make the distinction between conditional and marginal contrasts explicit. The same principle applies to other genotype codings, exposure categories, and outcome scales, but their contrasts must be defined for the chosen model.

Definition: Gene–environment correlation means that the distribution of an exposure differs across genotype values, or equivalently that genotype and exposure are statistically dependent. A genotype-by-exposure interaction is a change in an outcome contrast across exposure or genotype levels, defined on a stated scale. Correlation is a feature of the joint distribution; interaction is a feature of outcome contrasts.

Conditional Interaction in a Linear Mean Model

For a quantitative outcome, consider the correctly specified conditional mean model

$$ E(Y\mid G,E)=\beta_0+\beta_GG+\beta_EE+\beta_{GE}GE. $$

The model assumes that the conditional mean is linear in the included terms and that the product term is included alongside both main effects. It does not require \(G\) and \(E\) to be independent. The coefficient \(\beta_{GE}\) is the change in the genotype contrast for a one-unit increase in \(E\); with binary coding, it is a difference of differences. This is an association in the conditional mean unless additional causal assumptions justify a causal interpretation.

$$ \begin{aligned} E(Y\mid G=0,E=0)&=\beta_0,\\ E(Y\mid G=1,E=0)&=\beta_0+\beta_G,\\ E(Y\mid G=0,E=1)&=\beta_0+\beta_E,\\ E(Y\mid G=1,E=1)&=\beta_0+\beta_G+\beta_E+\beta_{GE}. \end{aligned} $$

Thus the genotype contrast at \(E=0\) is \(\beta_G\), while at \(E=1\) it is \(\beta_G+\beta_{GE}\). Subtracting the first contrast from the second gives \(\beta_{GE}\). This interpretation is conditional on the model’s variables and the identity-link mean scale; it does not say how common each genotype–exposure combination is.

Worked Example: Correlation and a Conditional Interaction

Suppose a hypothetical sample has 100 people in four genotype–exposure groups. The group counts and mean outcome values (in outcome units) are: \(G=0,E=0\), 40 people with mean 10; \(G=0,E=1\), 10 people with mean 14; \(G=1,E=0\), 10 people with mean 13; and \(G=1,E=1\), 40 people with mean 19. Treat these stated means as the cell means for this illustration.

The exposure prevalence differs by genotype: among \(G=0\), it is \(10/(40+10)=0.20\); among \(G=1\), it is \(40/(10+40)=0.80\). This is strong positive genotype–exposure correlation in the sample.

The genotype contrast at \(E=0\) is \(13-10=3\) outcome units. At \(E=1\), it is \(19-14=5\) outcome units. Therefore, the conditional difference-in-differences is

$$ (19-13)-(14-10)=6-4=2\text{ outcome units}. $$

The model-based interaction contrast is 2 outcome units, even though the genotype and exposure are correlated. Correlation does not itself determine the interaction coefficient. However, the comparisons rely on having observations in all four cells; sparse or absent cells can make the contrast imprecise or unsupported by the data.

A different calculation compares the observed genotype-group means, each averaged over that group’s own exposure distribution. For \(G=0\), the mean is \(0.80(10)+0.20(14)=10.8\). For \(G=1\), it is \(0.20(13)+0.80(19)=17.8\). Their difference is \(17.8-10.8=7.0\) outcome units. This is not the conditional genotype contrast at either exposure value: it also reflects that the exposure distributions differ between genotype groups.

Marginal Effects Depend on the Distribution Being Averaged Over

A marginal contrast averages predicted outcomes over a specified distribution of other variables. The target distribution must be stated: for example, the exposure distribution in a defined population, or a common exposure distribution used to compare genotype values. A contrast that averages each genotype group over its own exposure distribution answers a different question from one that uses the same exposure distribution for both groups.

Under the linear mean model above, standardizing both genotype values to the same exposure distribution produces a simple result. Let \(q=P(E=1)\) in the chosen target distribution. The standardized genotype contrast is the average of the genotype contrasts at \(E=0\) and \(E=1\), weighted by that distribution:

$$ (1-q)\beta_G+q(\beta_G+\beta_{GE}) =\beta_G+q\beta_{GE}. $$

This is generally not just \(\beta_G\), which is the genotype contrast at the reference exposure \(E=0\). It is also generally not the difference between observed genotype-group means when those groups have different exposure distributions. With a common target distribution, the contrast has a clear, specified averaging rule.

Worked Example: Standardizing to a Common Exposure Distribution

Suppose a hypothetical study uses the conditional mean model \(E(Y\mid G,E)=5+2G+4E+3GE\), with \(Y\) measured in outcome units. Exposure prevalence is 0.20 among \(G=0\) and 0.70 among \(G=1\). The conditional genotype contrast is 2 units at \(E=0\) and \(2+3=5\) units at \(E=1\).

First calculate the observed mean for each genotype group using that group’s own exposure distribution. For \(G=0\), the exposure-specific means are 5 and 9, so the group mean is \(0.80(5)+0.20(9)=5.8\). For \(G=1\), the means are 7 and 14, so the group mean is \(0.30(7)+0.70(14)=11.9\). The observed group-mean difference is \(11.9-5.8=6.1\) outcome units.

Now standardize both genotype values to a common target population in which \(q=0.40\) have \(E=1\). The standardized mean for \(G=0\) is \(0.60(5)+0.40(9)=6.6\). For \(G=1\), it is \(0.60(7)+0.40(14)=9.8\). The standardized contrast is \(9.8-6.6=3.2\) outcome units. Equivalently, \(0.60(2)+0.40(5)=3.2\).

The 6.1-unit observed contrast and 3.2-unit standardized contrast differ because the first averages over different exposure distributions and the second over the same target distribution. Neither number is universally preferable: the appropriate one depends on the question. A causal interpretation additionally requires appropriate causal assumptions; standardizing predictions alone does not supply them.

Adjustment Can Change the Contrast Through Composition

A covariate can be distributed differently across genotype–exposure groups. If it is related to the outcome, unadjusted cell means then combine outcome differences with differences in covariate composition. This can alter a crude difference-in-differences, even when the conditional interaction is zero.

Adjustment should therefore be tied to a target estimand and a defensible model, not applied mechanically. A covariate that is a common cause of an exposure and outcome may need control for a causal exposure contrast. Other covariates may be useful for precision. By contrast, adjustment for a mediator or a collider can change the target or induce bias in a causal analysis. Which variables are appropriate depends on the causal question and the assumed causal structure.

Worked Example: Covariate Composition Creates a Crude Interaction

Consider a hypothetical binary covariate \(C\) and the conditional mean model \(E(Y\mid G,E,C)=10+2G+3E+4C\), with \(Y\) in outcome units. This model has no \(GE\) term, so at either fixed value of \(C\), the genotype contrast is 2 units at both exposure levels and the conditional interaction is zero. Suppose the proportions with \(C=1\) are 0.10, 0.20, 0.60, and 0.90 in the \(G,E\) cells \(00,01,10,11\), respectively.

Because the conditional mean is 4 units higher when \(C=1\), a cell with proportion \(r\) having \(C=1\) has mean equal to its \(C=0\) mean plus \(4r\). The four crude means are therefore:

  • \(G=0,E=0:\ 10+4(0.10)=10.4\).
  • \(G=0,E=1:\ 13+4(0.20)=13.8\).
  • \(G=1,E=0:\ 12+4(0.60)=14.4\).
  • \(G=1,E=1:\ 15+4(0.90)=18.6\).

The crude difference-in-differences is \((18.6-14.4)-(13.8-10.4)=4.2-3.4=0.8\) outcome units. It is nonzero because the \(C\) composition changes across the four cells. Conditioning on \(C\) in the stated model recovers an interaction contrast of zero. This example shows how composition can create a crude interaction; it does not show that every adjusted estimate is causally valid.

Choosing an Adjustment Strategy

Before fitting or interpreting an interaction model, specify the target comparison. Is the goal a genotype contrast at a particular exposure level, an exposure contrast within genotype groups, a conditional interaction at fixed covariates, or a population-average contrast standardized to a defined distribution? These are distinct estimands. An adjustment set suitable for one may not answer another.

1
State the contrast and scale.
Name the variables being compared, the outcome scale, and whether the contrast is conditional or averaged over a population.
2
Identify covariates relevant to that target.
Use the causal question and plausible causal structure to decide which variables need control. Do not treat every available variable as an automatic adjustment variable.
3
Fit a model that represents the intended contrasts.
For a binary \(G\) and \(E\) on the linear mean scale, include both main effects and their product when estimating their conditional difference-in-differences. Add covariate terms as appropriate to the model and target.
4
Average predictions if the target is marginal.
Predict under each comparison value for the same individuals or target covariate distribution, then average the predictions and take the stated contrast.
5
Check support and interpret within the target.
Assess whether relevant genotype–exposure combinations are represented and avoid extrapolating beyond the observed support without a justified model.

On a nonlinear link scale, such as the logit scale, a coefficient is conditional on the model’s covariates and is expressed on that link scale. Marginalizing predicted probabilities and then comparing them is a different operation: applying an inverse link and averaging generally does not yield the same contrast as interpreting a conditional coefficient. Thus, for a population-average risk contrast, calculate predicted risks under the relevant comparison and average them over the target distribution. Keep the scale explicit rather than treating a coefficient as though it were automatically a marginal risk effect.

Genotype–exposure correlation can also affect how much information the data contain for estimating interaction. If one genotype is rare at one exposure level, the corresponding comparison may be imprecise; if a cell is empty, a saturated four-cell contrast cannot be obtained directly from observed cell means. A fitted model may produce predictions in such cases, but those predictions rely more heavily on modeling assumptions. Correlation is therefore relevant to both interpretation and support, even when it does not itself invalidate a correctly specified conditional mean model.

Common Pitfall

Wrong reasoning: “Genotype and exposure are correlated, so the product-term coefficient must be biased or must represent their joint causal effect.” Correlation alone implies neither conclusion. It describes the distribution of \(G\) and \(E\), not the correctness of the outcome model, the causal structure, or the estimand.

Correction: First identify what the coefficient estimates under the fitted model: for the binary linear mean model, \(\beta_{GE}\) is the conditional difference-in-differences in mean outcome. Then separately assess whether the model is adequate, whether the relevant cells have support, and whether the causal assumptions and adjustment set justify a causal interpretation. If the target is marginal, define the target distribution and standardize predictions to it. Never substitute the observed genotype-group difference for a conditional interaction contrast without checking how exposure distributions enter that calculation.

Key takeaway: Gene–environment correlation is about who has which exposure; interaction is about how an outcome contrast varies across exposure or genotype levels. Conditional model coefficients and marginal population contrasts answer different questions. State the estimand, choose adjustment accordingly, and use a common target distribution when the desired comparison is population-average.

Check Your Understanding

Use the distinction between joint distributions, conditional contrasts, and target-population averages to answer the following.

  1. In the binary linear mean model, what outcome contrast does \(\beta_{GE}\) represent?
  2. Why can an observed genotype-group mean difference combine a genotype contrast with differences in exposure distributions?
  3. Under the model \(E(Y\mid G,E)=5+2G+4E+3GE\), calculate the standardized genotype contrast when the target exposure prevalence is 0.25.
  4. How can a covariate create a nonzero crude difference-in-differences when the conditional model has no \(GE\) term?
  5. Why does a nonzero correlation between genotype and exposure not, by itself, establish either interaction or confounding?
  6. What additional information is needed to give a causal interpretation to a standardized contrast?
Clinical Biostats