Tutorials › Statistical Genetics › Treatment-By-Genotype Effects In Drug Trials

Pharmacogenomic Association and Translation · Tutorial 970 of 989

Treatment-By-Genotype Effects In Drug Trials

Use regression contrasts to estimate treatment effects by genotype without confusing subgroup effects with interaction effects.

Advanced 10 min read

What You'll Learn

  • Define genotype-specific treatment effects for a randomized drug trial
  • Fit categorical-genotype and additive-dosage interaction models
  • Interpret treatment coefficients and treatment-by-genotype contrasts
  • Estimate a subgroup treatment effect and its standard error
  • Formulate a joint test of no treatment-by-genotype interaction
  • Recognize why genotype coding should be prespecified

Why Model Treatment Effects by Genotype?

A randomized drug trial can estimate whether treatment effects differ among participants with different genotypes. The key is to distinguish two questions: what is the treatment effect within each genotype group? and how much does that treatment effect differ between groups? Regression models answer both, provided the genotype coding and the contrasts of interest are specified clearly.

The examples use a quantitative outcome measured after treatment, with larger values representing greater improvement. The same contrast logic applies to other outcomes, but the meaning and scale of a coefficient depend on the outcome model. This tutorial focuses on formulating and estimating the contrasts, not on comparing interaction scales.

Definition: Let \(T=1\) denote assignment to the drug and \(T=0\) assignment to control. Let \(G\) denote genotype, measured before treatment, and let \(Y(1)\) and \(Y(0)\) be the outcomes a participant would have under drug and control assignment. The genotype-specific treatment effect for genotype group \(g\) is \(\tau_g=E[Y(1)-Y(0)\mid G=g]\). In a randomized trial, this is a treatment effect within the group, not a causal effect of having that genotype.

Randomization supports a causal interpretation of the treatment contrast within genotype groups when both assignments are possible in each group, outcomes are defined consistently under either assignment, and the analysis respects the trial's assignment and follow-up. In particular, there must be participants assigned to both arms in each genotype group whose effect is to be estimated. Genotype itself is not randomized, so differences between genotype groups should not be interpreted as effects caused by changing genotype.

Categorical Genotypes: Estimate Each Group's Treatment Effect

Suppose a biallelic variant has three genotype groups: \(G=0\), \(G=1\), and \(G=2\), representing zero, one, and two copies of a specified allele. If the scientific aim is to allow each genotype group its own treatment effect, represent genotype categorically. Taking \(G=0\) as the reference group, a linear regression model is

$$ E(Y\mid T,G)=\beta_0+\beta_TT+\beta_1I(G=1)+\beta_2I(G=2)+\delta_1T I(G=1)+\delta_2T I(G=2). $$

Here \(I(\cdot)\) equals 1 when its condition is true and 0 otherwise. The model allows a separate mean outcome in each of the six treatment-by-genotype cells. The group-specific treatment effects follow by subtracting the control-arm mean from the drug-arm mean:

$$ \tau_0=\beta_T,\qquad \tau_1=\beta_T+\delta_1,\qquad \tau_2=\beta_T+\delta_2. $$

Thus, \(\delta_1=\tau_1-\tau_0\) and \(\delta_2=\tau_2-\tau_0\) are differences between treatment effects, each relative to the reference genotype. They are not the treatment effects in groups 1 and 2. A joint test of no treatment-by-genotype interaction is \(H_0:\delta_1=\delta_2=0\). Under the usual large-sample regression approximation, a Wald test uses the estimated interaction coefficients and their covariance matrix and is compared with a chi-squared distribution with 2 degrees of freedom.

Worked Example: Treatment Effects From Categorical Genotype Means

In a hypothetical randomized trial, improvement is measured in points, with larger values indicating greater improvement. The table shows the mean improvement in each cell; suppose there are 30 participants in each cell.

Genotype groupControl mean (points)Drug mean (points)
0 copies48
1 copy57
2 copies43

With genotype 0 as the reference, its treatment effect is \(\hat{\tau}_0=8-4=4\) points, so \(\hat{\beta}_T=4\). The genotype 1 control mean is 1 point above the reference control mean, giving \(\hat{\beta}_1=5-4=1\). Its treatment effect is \(7-5=2\) points, so the interaction contrast is \(\hat{\delta}_1=2-4=-2\) points.

For genotype 2, the control mean equals the reference control mean, so \(\hat{\beta}_2=4-4=0\). Its treatment effect is \(3-4=-1\) point. Therefore \(\hat{\delta}_2=-1-4=-5\) points. The fitted effects are consequently 4, 2, and -1 points for genotypes 0, 1, and 2. In this hypothetical data set, the estimated effect differs from the reference group's effect by -2 points in genotype 1 and by -5 points in genotype 2. The cell means alone do not provide the uncertainty of these estimates; that also requires information about variability within cells.

Additive Dosage: A Prespecified Trend Model

A different model treats dosage \(G\) as the numerical count 0, 1, or 2. The additive interaction model is

$$ E(Y\mid T,G)=\beta_0+\beta_TT+\beta_GG+\delta TG. $$

For dosage \(g\), the model's treatment effect is \(\tau_g=\beta_T+\delta g\). In this specification, \(\beta_T\) is the estimated treatment effect at dosage 0, and \(\delta\) is the change in treatment effect for each additional copy of the allele. The model assumes a linear trend in the treatment effect across dosage: the difference between effects at dosages 1 and 0 equals the difference between effects at dosages 2 and 1. This is a modeling restriction, not a consequence of randomization.

Other prespecified codings answer other questions. For example, a dominant coding \(Z=I(G\geq 1)\) groups carriers together and compares their treatment effect with that in non-carriers. A recessive coding \(Z=I(G=2)\) compares genotype 2 with genotypes 0 and 1 combined. With either coding, including \(T Z\) estimates the difference in treatment effects between the two coded groups. The coding should match the scientific question and be chosen before examining outcome differences; trying several codings and reporting only the most favorable result can overstate the evidence.

Worked Example: Estimating an Additive Treatment-Effect Trend

In a separate hypothetical trial, mean improvement in points is 2, 4, and 6 in the control arm at dosages 0, 1, and 2, and 5, 8, and 11 in the drug arm. Suppose there are 20 participants in each of the six cells. These means follow the additive interaction model exactly.

At dosage 0, the control mean is 2, so \(\hat{\beta}_0=2\). Control means rise by 2 points per allele, giving \(\hat{\beta}_G=2\). The drug-control difference at dosage 0 is \(5-2=3\), so \(\hat{\beta}_T=3\). The treatment effects at dosages 1 and 2 are \(8-4=4\) and \(11-6=5\) points. Each is 1 point larger than the preceding dosage's effect, giving \(\hat{\delta}=1\).

The fitted treatment effect at dosage 1 is \(\hat{\beta}_T+\hat{\delta}(1)=3+1=4\) points; at dosage 2 it is \(3+1(2)=5\) points. The contrast between the treatment effects at dosages 2 and 0 is \(5-3=2\) points, also calculated as \(2\hat{\delta}=2(1)=2\). The interaction coefficient describes a one-point increase in the estimated treatment effect per additional allele under this prespecified linear model. It does not establish that each individual allele biologically changes response by one point.

Estimation, Uncertainty, and Adjusted Models

In a linear regression, the fitted coefficients are estimated from participant-level outcomes. A requested treatment effect is a linear combination of those coefficients. If \(\hat{\boldsymbol{\beta}}\) is the coefficient vector and a contrast is \(c^\mathsf{T}\hat{\boldsymbol{\beta}}\), its estimated standard error is

$$ SE(c^\mathsf{T}\hat{\boldsymbol{\beta}})=\sqrt{c^\mathsf{T}\widehat{\mathrm{Var}}(\hat{\boldsymbol{\beta}})c}. $$

The covariance terms matter: adding two coefficient estimates does not generally mean adding their standard errors. For a sufficiently large sample and an appropriate regression variance estimate, an approximate 95% confidence interval for the contrast is the estimate plus or minus 1.96 standard errors. This interval describes uncertainty from repeated sampling under the model and analysis; it does not assign a 95% probability to the fixed treatment effect being inside the particular interval.

A model may include prespecified baseline covariates to improve precision or address features of the randomization design. The estimated treatment effect for genotype \(g\) must still be calculated as the model-predicted drug outcome minus the model-predicted control outcome for that genotype. If treatment effects also vary with covariates, the contrast may depend on covariate values; an average genotype-specific effect then requires averaging the predicted treatment contrasts over a stated covariate distribution. Standard errors should use a covariance estimator appropriate to the design and model; for example, a robust estimator can be used when constant residual variance is not credible.

Worked Example: Standard Error and Interval for a Genotype-Specific Effect

Suppose a hypothetical categorical-genotype regression, with genotype 0 as reference, estimates \(\hat{\beta}_T=4.0\) points and \(\hat{\delta}_1=-2.0\) points. The model-based variances are \(\widehat{\mathrm{Var}}(\hat{\beta}_T)=0.36\) and \(\widehat{\mathrm{Var}}(\hat{\delta}_1)=0.64\), and their covariance is \(-0.08\). Assume the large-sample normal approximation is suitable.

The estimated treatment effect for genotype 1 is \(\hat{\tau}_1=\hat{\beta}_T+\hat{\delta}_1=4.0+(-2.0)=2.0\) points. Its variance is

$$ \widehat{\mathrm{Var}}(\hat{\tau}_1) =0.36+0.64+2(-0.08)=0.84, \qquad SE(\hat{\tau}_1)=\sqrt{0.84}=0.9165\text{ points}. $$

The approximate 95% confidence interval is \(2.0\pm1.96(0.9165)\), or \(2.0\pm1.796\), giving \([0.204,3.796]\) points. In this hypothetical analysis, the estimated drug effect for genotype 1 is 2.0 points; the interval gives a range of values reasonably compatible with the data and model at the 95% confidence level. The calculation uses the covariance between coefficients; ignoring it would give a different and incorrect standard error for this fitted contrast.

What the Interaction Test Does—and Does Not—Say

A test of no interaction addresses whether the modeled treatment effects are equal across the genotype groups specified by the coding. For the categorical model with three groups, the null is the joint restriction \(\delta_1=\delta_2=0\). For the additive model, the null is \(\delta=0\), which tests for a linear dosage trend in treatment effects under that model. These are not the same hypothesis: an arbitrary pattern across three genotype groups can depart from equality without following a linear trend.

An interaction test is not a test that the drug works in any particular subgroup. Conversely, evidence that a treatment effect differs between genotypes does not by itself show that the treatment effect is beneficial in one group and harmful in another. Estimate and report the group-specific treatment effects and their uncertainty alongside the interaction contrast. A nonsignificant interaction test also does not prove that treatment effects are identical; the estimate's uncertainty and the trial's ability to distinguish effects matter.

Common mistake: “The treatment coefficient is 4, so the drug improves the outcome by 4 points for everyone.” In a categorical interaction model, \(\beta_T\) is the treatment effect only for the reference genotype; other groups' effects are \(\beta_T+\delta_g\). In the additive model, \(\beta_T\) is the effect at dosage 0, and the effect at dosage \(g\) is \(\beta_T+\delta g\). Always identify the genotype coding and calculate the contrast for the group being discussed.

Reporting the Result in Context

A clear report names the treatment comparison, outcome and units, genotype coding, subgroup treatment-effect estimates, and interaction contrast. For example: “In the hypothetical trial, the estimated drug-control difference in improvement was 4 points for genotype 0 and 2 points for genotype 1; the genotype 1 treatment effect was 2 points lower than the genotype 0 effect.” If inference is reported, include the relevant confidence interval or test result and identify whether it concerns a subgroup treatment effect or a difference between treatment effects. This wording keeps the randomized treatment comparison distinct from nonrandomized differences between genotypes.

Check Your Understanding

Use the model and contrast definitions above to answer each question.

  1. In the categorical model with genotype 0 as reference, what does \(\delta_2\) estimate?
  2. For the additive model, write the treatment effect at dosage 2 and the difference between treatment effects at dosages 2 and 0.
  3. Why is a dominant coding not interchangeable with a categorical model that estimates effects separately for all three genotypes?
  4. If a fitted genotype-specific treatment effect is a sum of two coefficients, why can its standard error not generally be found by simply adding their standard errors?
  5. What causal claim about genotype is not supported merely because a randomized trial finds different treatment effects across genotype groups?
Clinical Biostats