Tutorials › Statistical Genetics › Power and Sample Size for Gene–Environment Interaction

Gene–Environment Interaction · Tutorial 805 of 989

Power and Sample Size for Gene–Environment Interaction

Translate a planned gene–environment interaction into a power or sample-size calculation, and see why rare joint-exposure groups can dominate the design.

Advanced 12 min read

What You'll Learn

  • Define power for a specified interaction effect, significance level, and model scale
  • Calculate the standard error of a binary-genotype by binary-exposure interaction contrast
  • Relate sample size to genotype frequency and exposure prevalence or variance
  • Approximate power and sample size for a logistic interaction on the log-odds scale
  • Diagnose how imbalance and sparse joint-exposure groups reduce interaction information

Why Interaction Studies Need Deliberate Design

A study can have a large overall sample and still provide little evidence about a gene–environment interaction. The interaction is informed by how the outcome changes across combinations of genotype and exposure. If one combination is rare, its outcome mean or event rate is estimated imprecisely, and that uncertainty can dominate the interaction test. Planning therefore requires more than specifying a total sample size: it requires the genotype and exposure distributions, the outcome model and scale, and a scientifically meaningful interaction effect.

Power is always tied to a particular test and alternative. The same data can have different power for an additive interaction in mean outcome and a multiplicative interaction in odds, because those are different parameters with different standard errors. The calculations below use standard large-sample approximations. They are useful for planning and for understanding which design features matter; when cell probabilities, covariate adjustment, or sampling are complex, simulation or model-specific software is preferable.

Definition: For a specified alternative value of an interaction parameter, power is the probability that the planned test rejects \(H_0\) when that alternative is true. The type II error probability at that alternative is \(\beta\), so power is \(1-\beta\). Power depends on the significance level \(\alpha\), sample size, the parameter being tested, and the assumed data-generating model.

Binary Genotype and Binary Exposure: Mean-Scale Interaction

Let \(G\) indicate genotype group (0 or 1) and \(E\) indicate exposure status (0 or 1). Write \(n_{ge}\) for the number of participants in joint group \((G=g,E=e)\), and let \(\mu_{ge}\) be that group's mean quantitative outcome. The mean-scale interaction is the difference in exposure effects between genotype groups:

$$ \delta=(\mu_{11}-\mu_{10})-(\mu_{01}-\mu_{00}) =\mu_{11}-\mu_{10}-\mu_{01}+\mu_{00}. $$

This is also the coefficient of \(GE\) in a linear model with an intercept, \(G\), \(E\), and \(GE\), when \(G\) and \(E\) are coded 0/1. Suppose outcomes have independent, normally distributed errors with common variance \(\sigma^2\), and observations are independent across participants. With fixed group sizes, the four cell means are independent and have variances \(\sigma^2/n_{ge}\). Therefore:

$$ \operatorname{Var}(\hat{\delta}) =\sigma^2\left( \frac{1}{n_{11}}+\frac{1}{n_{10}}+ \frac{1}{n_{01}}+\frac{1}{n_{00}} \right), \qquad SE(\hat{\delta})= \sigma\sqrt{\frac{1}{n_{11}}+\frac{1}{n_{10}}+ \frac{1}{n_{01}}+\frac{1}{n_{00}}}. $$

The variance follows because each cell mean contributes once to the contrast, with coefficient either \(+1\) or \(-1\); squaring those coefficients gives 1 in every variance term. If genotype and exposure are independent in the target population, with \(P(G=1)=q\) and \(P(E=1)=r\), expected cell sizes are \(Nqr\), \(Nq(1-r)\), \(N(1-q)r\), and \(N(1-q)(1-r)\). Substituting these expected sizes gives the planning approximation:

$$ SE(\hat{\delta})\approx \frac{\sigma}{\sqrt{Nq(1-q)r(1-r)}}. $$

From Standard Error to Power and Sample Size

For a two-sided test at level \(\alpha\), a large-sample normal approximation rejects when the absolute test statistic exceeds \(z_{1-\alpha/2}\), the \(1-\alpha/2\) quantile of the standard normal distribution. Under a true interaction \(\delta\), the statistic is approximately normal with mean \(\lambda=\delta/SE(\hat{\delta})\) and variance 1. Thus its power is:

$$ P\left(Z<-z_{1-\alpha/2}\right) + P\left(Z>z_{1-\alpha/2}\right) = \Phi(-z_{1-\alpha/2}-\lambda) +1-\Phi(z_{1-\alpha/2}-\lambda), \quad Z\sim N(\lambda,1). $$

For a negative interaction, \(\lambda\) is negative, but the two-sided power is unchanged if the sign is reversed. A convenient approximation for a target power \(1-\beta\) is to require \(\lvert\lambda\rvert\approx z_{1-\alpha/2}+z_{1-\beta}\). Solving for the total sample size yields:

$$ N\approx \frac{(z_{1-\alpha/2}+z_{1-\beta})^2\sigma^2} {\delta^2 q(1-q)r(1-r)}. $$

The squared effect size makes this expression apply to either direction of interaction. It assumes independent genotype and exposure, the stated binary coding, a common outcome variance, and the large-sample approximation. With genotype–exposure dependence, replace the expected cell frequencies with appropriate joint frequencies; the simple product formula no longer applies.

Worked Example: Power With Unequal Genotype and Exposure Frequencies

Suppose a hypothetical study plans \(N=800\) participants. The genotype-group frequency is \(q=0.25\), exposure prevalence is \(r=0.10\), outcome standard deviation is \(\sigma=10\) units, and the interaction worth detecting is \(\delta=4\) outcome units. Assume the independent sampling, genotype–exposure independence, and common-variance conditions above hold. Find approximate two-sided power at \(\alpha=0.05\).

The expected cell counts are 20, 180, 60, and 540 for \((1,1),(1,0),(0,1),(0,0)\), respectively. The standard error is:

$$ SE(\hat{\delta})= 10\sqrt{\frac1{20}+\frac1{180}+\frac1{60}+\frac1{540}} =10\sqrt{0.07407}=2.722\text{ outcome units}. $$

The noncentrality parameter is \(\lambda=4/2.722=1.470\), and \(z_{0.975}=1.960\). The approximate power is:

$$ \Phi(-1.960-1.470)+1-\Phi(1.960-1.470) =\Phi(-3.430)+1-\Phi(0.490) \approx 0.312. $$

Thus the design has about 31% power for a 4-unit interaction under these assumptions. The small exposed-genotype group, with an expected count of only 20, contributes \(1/20\) to the variance sum and is the largest single contribution. The calculation does not establish that this effect exists; it describes the probability of rejecting \(H_0\) if this specified effect and model are correct.

Exposure Variance and Genotype Coding

An exposure need not be binary. For a quantitative exposure \(E\), consider a linear mean model with \(G\), \(E\), and their product, and let \(G\) and \(E\) be independent. Centering either variable changes the interpretation of main effects but not the product-term interaction coefficient. If \(G\) is binary with frequency \(q\), and the exposure has variance \(v=\operatorname{Var}(E)\), the residual variation in the product after accounting for the intercept and main effects is \(q(1-q)v\). Under the same independent, constant-variance outcome model, this gives:

$$ SE(\hat{\beta}_{GE})\approx \frac{\sigma}{\sqrt{Nq(1-q)v}}. $$

Here \(\beta_{GE}\) is measured in outcome units per exposure unit per genotype-group difference. For a binary exposure, \(v=r(1-r)\), recovering the earlier formula. A more variable exposure can provide more information about a linear interaction, but only relative to the chosen exposure scale and model. If genotype and exposure are correlated, or the exposure-response relationship is nonlinear, this simple variance expression is not sufficient.

For an additive genotype dosage coded 0, 1, 2, the same logic uses the genotype variance in place of \(q(1-q)\), under independence of genotype and exposure and the stated linear model. Under Hardy–Weinberg equilibrium with allele frequency \(f\), dosage variance is \(2f(1-f)\). The model, not just the label “genotype,” determines which variance belongs in the calculation.

Worked Example: Sample Size With a Quantitative Exposure

A hypothetical study plans to test a linear interaction for a binary genotype group with frequency \(q=0.40\) and an independently distributed quantitative exposure with variance \(v=4\) exposure-units squared. Suppose \(\sigma=12\) outcome units, and the target interaction is \(\beta_{GE}=0.80\) outcome units per exposure unit per genotype-group difference. Find the approximate sample size for 90% power at two-sided \(\alpha=0.05\).

The interaction information per participant is proportional to \(q(1-q)v=0.40(0.60)(4)=0.96\). Using \(z_{0.975}=1.960\) and \(z_{0.90}=1.282\):

$$ N\approx \frac{(1.960+1.282)^2(12)^2} {(0.80)^2(0.96)} = \frac{10.51(144)}{0.6144} \approx 2463. $$

The planning estimate is about 2,463 participants. It assumes the specified exposure variance is present in the analyzed sample, genotype and exposure are independent, and the linear mean and constant-variance assumptions are adequate. If the exposure is measured on a different scale, both its variance and the numerical interaction coefficient change; the implied outcome contrast must remain the same for the design to be equivalent.

Binary Outcomes and the Logistic Interaction Scale

For a binary outcome, a common target is the product-term coefficient in a logistic model:

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

The parameter \(\beta_{GE}\) is a log-odds interaction: it describes how the exposure-associated change in log odds differs between genotype groups. It is not an additive risk difference. In a saturated model with four genotype–exposure cells, the large-sample variance of the interaction estimate is approximately the sum of the four inverse cell informations. If the event probability in cell \((g,e)\) is \(p_{ge}\), that is:

$$ \operatorname{Var}(\hat{\beta}_{GE}) \approx \sum_{g=0}^{1}\sum_{e=0}^{1} \frac{1}{n_{ge}p_{ge}(1-p_{ge})}. $$

This expression reflects that a cell's information for its log odds is approximately \(n_{ge}p_{ge}(1-p_{ge})\), and the interaction contrast combines the four cell logits with coefficients \(+1\) or \(-1\). If all cell event probabilities are close to a common value \(p\), and genotype and exposure are independent, it simplifies to:

$$ SE(\hat{\beta}_{GE})\approx \frac{1}{\sqrt{Np(1-p)q(1-q)r(1-r)}}. $$

A rough sample-size calculation then replaces \(\sigma^2\) by \(1/[p(1-p)]\) in the normal-outcome formula and replaces the mean interaction \(\delta\) by the log-odds interaction \(\beta_{GE}\). This approximation can be poor when event probabilities differ substantially across cells. In that case, calculate information using the anticipated \(p_{ge}\) values and joint cell frequencies, or use a simulation that matches the proposed analysis.

Worked Example: Approximate Logistic-Scale Sample Size

Consider a hypothetical study with binary genotype frequency \(q=0.30\), exposure prevalence \(r=0.20\), and an anticipated event probability near \(p=0.10\) in each cell. The target interaction is an odds-ratio interaction of 1.50, so \(\beta_{GE}=\log(1.50)=0.4055\) on the log-odds scale. Estimate the sample size for 80% power at two-sided \(\alpha=0.05\), using the common-event-probability approximation.

The joint-frequency factor is \(q(1-q)r(1-r)=0.30(0.70)(0.20)(0.80)=0.0336\), and \(p(1-p)=0.10(0.90)=0.09\). Therefore:

$$ N\approx \frac{(1.959964+0.841621)^2} {(\log(1.50))^2(0.09)(0.0336)} = \frac{7.8489}{0.00049715} \approx 15{,}788. $$

A rough target is therefore about 15,800 participants. At these frequencies, the joint genotype-and-exposure group has expected size \(Nqr\approx 15{,}790(0.06)=947\), and its expected event count under the common-rate assumption is about 95. These are expectations, not guaranteed realized counts. If the event probabilities vary by cell, the common-\(p\) calculation may misstate the information, so the cell-specific variance expression should be used for refinement.

Imbalance, Assumptions, and a Common Pitfall

For the binary mean-scale interaction, the frequency factor \(q(1-q)r(1-r)\) is largest when both frequencies are 0.5. Moving either frequency toward 0 or 1 reduces information at a fixed total \(N\). The same pattern has a direct cell-count interpretation: when a joint group is rare, its reciprocal count in the variance formula is large. Increasing total sample size can compensate, but the required increase can be substantial. For a continuous exposure, low exposure variance similarly weakens information for the product term.

These calculations presume the outcome model is correctly specified and that the interaction effect is the one the study intends to detect. They also presume independent participants and the assumed genotype–exposure distribution. Population structure, relatedness, clustering, covariate adjustment, missing data, unequal sampling, and exposure measurement error can change the effective information. A planning calculation should reflect the analyzed sample rather than merely the number recruited; for example, if only a proportion \(c\) is expected to have complete data, recruitment needs to be roughly \(N/c\) to yield the calculated analyzable sample size.

  • Wrong reasoning: “The total sample is large, so the interaction must be well powered.”
  • Correction: Interaction precision depends on outcome information across joint genotype–exposure groups. Calculate expected cell sizes and inspect their contributions to the standard error.
  • Wrong reasoning: “The interaction effect is negative, so a positive critical-value sum cannot be used for sample size.”
  • Correction: For a two-sided test, use \(\lvert\lambda\rvert\approx z_{1-\alpha/2}+z_{1-\beta}\), or equivalently square the signed effect when solving for \(N\). The sample-size approximation depends on \(\delta^2\) or \(\beta_{GE}^2\), so either interaction direction is covered.
Key takeaway: Power for gene–environment interaction is determined by the scale-specific effect, outcome variability or event information, and the distribution of genotype and exposure together. State those assumptions explicitly, calculate the interaction standard error, and check whether rare joint groups make the proposed target unrealistic.

Check Your Understanding

Use the assumptions stated in each question, and distinguish mean-scale effects from log-odds effects.

  1. For a binary genotype and exposure, explain why the expected-cell standard error contains the factor \(q(1-q)r(1-r)\).
  2. In a two-sided test, what change is needed when the true interaction is negative in the noncentrality parameter used for an approximate sample-size calculation?
  3. How does changing exposure prevalence from 0.50 toward 0 affect the binary-exposure interaction information, with total sample size held fixed?
  4. For the logistic interaction model, what does \(\beta_{GE}\) measure, and why is it not an additive risk difference?
  5. Name two reasons the common-\(p\) logistic sample-size approximation might need refinement.
Clinical Biostats