From a Genetic Question to a Binary-Outcome Analysis
A gene–environment interaction analysis asks whether the association between a genetic characteristic and an outcome differs across exposure levels, or equivalently whether the exposure–outcome association differs across genotype groups. The answer depends on the scale: a product term in a logistic model describes departure from multiplicativity of the odds, while a contrast of risks describes departure from additivity of risk. The two questions are related but not interchangeable.
This worked analysis uses a deliberately simple hypothetical cohort. It begins with binary coding, estimates interaction on both scales, and then checks what the estimates do and do not support. The example is not evidence about any real variant, exposure, or disease.
Hypothetical Data and Coding
Suppose investigators follow 800 participants and ascertain the outcome over a common follow-up period. The genotype and exposure categories are defined before analysis. Assume for this example that each participant contributes one independent observation, outcome status is measured without error, and the cohort data represent the risks in the four genotype–exposure groups. The observed counts are:
| Genotype \(G\) | Exposure \(E\) | Outcome cases | No outcome | Total | Observed risk |
|---|---|---|---|---|---|
| 0 | 0 | 10 | 190 | 200 | 0.050 |
| 1 | 0 | 20 | 180 | 200 | 0.100 |
| 0 | 1 | 24 | 176 | 200 | 0.120 |
| 1 | 1 | 60 | 140 | 200 | 0.300 |
The reference cell is \(G=0,E=0\), and its risk is \(p_{00}=10/200=0.050\). The other observed risks are \(p_{10}=20/200=0.100\), \(p_{01}=24/200=0.120\), and \(p_{11}=60/200=0.300\). These are risks over the stated follow-up period, not odds or incidence rates.
Worked Example: Translate the Coding Into Cell Risks
Use the table to describe the observed outcome risk for each genotype–exposure group and the genotype risk difference at each exposure level.
For \(E=0\), the observed genotype risk difference is \(p_{10}-p_{00}=0.100-0.050=0.050\), or 5 percentage points. For \(E=1\), it is \(p_{11}-p_{01}=0.300-0.120=0.180\), or 18 percentage points.
The difference between those risk differences is \(0.180-0.050=0.130\), or 13 percentage points. This is the additive interaction contrast. The calculation describes these four observed risks; by itself, it does not establish that changing genotype or exposure would cause the risks to change.
Logistic Interaction: Departure From Multiplicativity of the Odds
For binary \(G\) and \(E\), the logistic model with a product term is
This model is saturated for the four cells: it assigns one fitted probability to each genotype–exposure combination. The coefficient \(\beta_{GE}\) is a difference of log odds differences. Its exponential is the ratio of the genotype odds ratio at \(E=1\) to the genotype odds ratio at \(E=0\). Thus \(\exp(\beta_{GE})=1\) represents no multiplicative interaction of the odds for these binary codings. It does not represent no additive interaction.
Worked Example: Estimate the Logistic Interaction
Use the four cell counts to estimate \(\beta_{GE}\), its standard error, and a 95% Wald confidence interval. For a saturated four-cell logistic model with independent binomial cell counts, the interaction estimate is the log odds ratio ratio. The estimated odds in cell \((g,e)\) are cases divided by non-cases.
The four odds are \(10/190=0.05263\), \(20/180=0.1111\), \(24/176=0.1364\), and \(60/140=0.4286\). Therefore,
The estimated interaction odds ratio is \(\exp(0.398)=1.489\). For example, the genotype odds ratio is \((60/140)/(24/176)=3.143\) among exposed participants and \((20/180)/(10/190)=2.111\) among unexposed participants; their ratio is \(3.143/2.111=1.489\).
For independent binomial cell counts, the approximate variance of the log odds ratio ratio is the sum of the reciprocals of the case and non-case counts in all four cells:
The Wald statistic is \(z=0.398/0.4817=0.826\), giving a two-sided normal-approximation \(p\)-value of about 0.409. The 95% interval on the log-odds scale is \(0.398\pm1.96(0.4817)=(-0.546,1.342)\). Exponentiating its endpoints gives an interval of approximately \((0.579,3.826)\) for the interaction odds ratio. The interval includes 1, so this analysis does not provide strong evidence against no multiplicative odds interaction at the 0.05 level.
Additive Interaction: Departure From Additivity of Risk
The risk-scale contrast compares the genotype risk difference among exposed participants with the genotype risk difference among unexposed participants. Equivalently, it compares the exposure risk difference among carriers with the exposure risk difference among non-carriers. A positive contrast means that the joint-cell risk exceeds the sum expected by adding the two separate risk differences, relative to the reference cell.
Worked Example: Estimate Additive Interaction and Its Uncertainty
For the hypothetical cohort, the estimate is
The estimated additive interaction is 0.130, or 13 percentage points of outcome risk over the specified follow-up. To obtain a simple Wald standard error, treat the four group risk estimates as independent binomial proportions. For a proportion based on \(n_{ge}\) observations, the estimated variance is \(\hat{p}_{ge}(1-\hat{p}_{ge})/n_{ge}\). Because the contrast coefficients are \(+1,-1,-1,+1\), their squared coefficients are all 1, so the estimated variances add:
The 95% Wald interval is \(0.130\pm1.96(0.04760)\), which is \((0.0367,0.2233)\). In context, the estimated contrast is 13 percentage points, with an approximate 95% confidence interval from 3.67 to 22.33 percentage points. Under the binomial sampling assumptions and this interval method, the interval quantifies uncertainty in the estimated additive contrast; it is not a 95% probability statement about a fixed parameter.
The corresponding Wald statistic is \(0.130/0.04760=2.731\), with a two-sided normal-approximation \(p\)-value of about 0.0063. This provides evidence against a zero additive contrast under the stated model and sampling assumptions. The Wald approximation should still be treated cautiously: the smallest cell has 10 cases, and interval coverage can be imperfect in modest samples. A likelihood-based or resampling interval may be preferable when its assumptions and implementation suit the design.
Why the Two Results Are Not Contradictory
The logistic estimate concerns a ratio of odds ratios; the additive estimate concerns a difference of risk differences. They answer different scale-specific questions, so one can be estimated with a confidence interval that includes its null value while the other does not. In these data, the risk rises across the four cells, but the estimated degree of departure from additivity is relatively precise compared with the degree of departure from multiplicativity of the odds.
A short algebraic argument shows what the logistic product term represents. Let \(o_{ge}=p_{ge}/(1-p_{ge})\) be the odds in cell \((g,e)\). Under the saturated logistic model, the log odds ratio for genotype at \(E=0\) is \(\log(o_{10}/o_{00})=\beta_G\). At \(E=1\), it is \(\log(o_{11}/o_{01})=\beta_G+\beta_{GE}\). Subtracting the first from the second gives
This identity justifies the odds ratio ratio calculated above. It also makes clear why \(\beta_{GE}=0\) does not require \(\Delta_{\mathrm{add}}=0\): the former constrains odds, while the latter constrains risks. Even when the outcome is uncommon, the scales may be numerically similar only as an approximation, not by definition.
Diagnostics and Limits of the Worked Analysis
The numerical calculations are only as credible as the data structure and model assumptions. In the example, each cell contains both cases and non-cases, so none of the four cell-specific odds is zero or infinite. There is no complete separation in this four-cell table. Counts are not extremely sparse, but 10 events in the smallest cell still warrant caution about Wald approximations and sensitivity to a few observations.
The saturated model has four fitted cell probabilities for four observed cell patterns. It therefore cannot provide a meaningful residual goodness-of-fit test across those four patterns: there are no extra cell patterns left to test against. This does not mean the analysis is free of problems. Investigators should verify genotype and exposure coding, outcome and follow-up definitions, missingness, independence, and whether the cohort sampling supports risk estimation. If observations are clustered, the standard errors must account for that dependence. If covariate adjustment is needed, the model must include a justified adjustment set and its uncertainty; the four unadjusted cell calculations above do not accomplish that.
The risk interpretation also depends on the sampling scheme. These proportions estimate risks because the hypothetical data are presented as a cohort with group denominators. Under case-control sampling, the sampled case and control fractions generally do not estimate population risks, so this direct calculation of \(\Delta_{\mathrm{add}}\) from sample proportions would not be justified without additional information or methods. Finally, neither an observed interaction contrast nor a logistic product term alone establishes a causal gene–environment interaction. Causal claims require defensible assumptions about selection, confounding, measurement, and the meaning of the intervention or exposure contrast.
Worked Example: Diagnose a Zero-Event Cell
Suppose a separate hypothetical dataset has 0 cases and 25 non-cases in the \(G=1,E=1\) cell, while the other three cells have both cases and non-cases. The observed odds in that cell are \(0/25=0\), so the log odds for that cell is not finite. In a saturated logistic model, the ordinary finite maximum-likelihood estimate for the corresponding cell log odds, and therefore the product-term estimate, does not exist.
The diagnosis is separation or boundary estimation, not evidence that the true risk is exactly zero. Reporting an ordinary finite logistic interaction estimate and standard error from the reciprocal-count formula would be invalid because that formula includes \(1/0\). The analyst should report the sparse-cell problem and consider an approach suited to the design, such as a justified penalized or exact method, alongside sensitivity analyses. A continuity correction that silently adds cases changes the data and is not a substitute for diagnosing the estimation problem.
Common Mistake and Scientific Interpretation
- Mistake: “The logistic interaction \(p\)-value is not significant, so there is no gene–environment interaction.”
- Correction: The logistic result addresses multiplicative interaction of the odds, not additive interaction of risks. Here the estimated additive contrast is 13 percentage points and its approximate interval excludes zero, while the odds interaction interval includes 1. State the scale, estimate, uncertainty, and assumptions rather than treating “interaction” as a scale-free conclusion.
- Mistake: Calling the 13-percentage-point contrast a causal effect of genotype or exposure.
- Correction: It is an observed risk-scale contrast in the hypothetical cohort. Causal interpretation needs additional design and identification assumptions, not just a fitted model.
Check Your Understanding
Answer these questions using the definitions and calculations in this analysis.
- For the hypothetical table, calculate the genotype risk difference among exposed participants and compare it with the genotype risk difference among unexposed participants.
- What does \(\exp(\beta_{GE})=1\) mean in the binary logistic model, and what does it not imply about additive interaction?
- Why can the additive contrast have an interval excluding zero while the logistic interaction interval includes 1?
- What feature of a zero-case cell makes the ordinary saturated logistic estimate problematic?
- Why would the four sample proportions not generally estimate population risks under case-control sampling?