Why Repeated Efficacy Measurements Need a Longitudinal Model
A patient’s efficacy outcome may be recorded at several visits while the prescribed dose changes. Those records are linked: they come from the same person, and a patient’s earlier response may have influenced a later dose. Treating every visit as an independent observation ignores this structure and can make uncertainty look smaller than it is.
Longitudinal regression describes how the mean efficacy outcome changes over time and across dose histories, while accounting for measurements clustered within patients. Adding genotype terms allows the estimated trajectories to differ by genotype. The resulting coefficients describe conditional associations under the model; they do not, by themselves, show that changing a dose would cause the predicted change in efficacy.
Representing Time and Dose History
Let \(Y_{it}\) be the continuous efficacy outcome for patient \(i\) at visit \(t\), and let \(G_i\) denote that patient’s genotype group or genetic dosage. Let \(T_{it}\) be time since a prespecified origin, such as treatment initiation. A dose history should be represented in a way that matches the scientific question and pharmacology. For example, \(D_{it}\) might be the current dose, a recent average dose, or a prespecified weighted summary of doses received before the visit.
These choices are not interchangeable. If efficacy responds with a delay, current dose may poorly represent relevant exposure; a lagged or weighted history may be more suitable. Define the exposure summary before interpreting its coefficient. In the model below, \(D_{it}\) is treated as a measured, time-varying exposure summary, not as a randomized intervention.
A Linear Mixed Model for Efficacy Trajectories
One useful starting point is a linear mixed model with a patient-specific random intercept and, when supported by the data, a patient-specific random time slope:
The \(\beta\) coefficients describe the population-average mean structure conditional on the included predictors. The random intercept \(b_{0i}\) allows patients to differ in their underlying efficacy level, and the random time slope \(b_{1i}\) allows their time trends to differ. The residual \(\varepsilon_{it}\) is the remaining visit-specific deviation. If \(G_i\) is coded 0 or 1, \(\beta_3\) is the genotype-group difference at \(T_{it}=0\) and \(D_{it}=0\); \(\beta_4\) is the difference in time slope; and \(\beta_5\) is the difference in the dose association. Centering time and dose at meaningful reference values often makes the lower-order coefficients easier to interpret.
A standard version of this model assumes that the patient random effects have mean zero and a multivariate normal distribution, that residuals have mean zero conditional on the random effects and predictors, and that residuals from different patients are independent. It also specifies a within-patient covariance structure for residuals. In a simple model, residuals are conditionally independent across visits with constant variance; if residual autocorrelation remains, a model with an appropriate residual correlation structure may be needed. The mean structure must be adequate for the outcome, including its time and dose relationships. These assumptions should be assessed using study knowledge and model diagnostics, not assumed to hold merely because software returns estimates.
The displayed model is a working linear specification. It may need nonlinear time or dose terms if the scientific pattern and data support them. Adding terms should be driven by the question and prespecified analysis plan, rather than by searching for a convenient result. When dose is adjusted in response to earlier efficacy, the dose coefficient is especially vulnerable to time-varying confounding: patients with poor response may receive higher subsequent doses. Conditioning on measured history does not automatically remove this problem or make the coefficient causal.
Reading Genotype-Specific Trajectories
For a patient group with genotype value \(g\) and a fixed dose summary \(d\), the model-implied mean trajectory, excluding the patient-specific random effects, is
At fixed \(d\), the genotype-specific time slope is \(\beta_1+\beta_4g\). At fixed time \(t\), the dose association per unit of \(D_{it}\) is \(\beta_2+\beta_5g\). Thus, a genotype may be associated with a different starting level, a different time trend, a different dose association, or some combination. A coefficient should be interpreted at the reference values implied by the model; an interaction coefficient alone is not the full predicted outcome for either genotype.
Worked Example: Comparing Predicted Trajectories at a Fixed Dose
Suppose a hypothetical study measures efficacy in points at visits over eight weeks. Genotype is coded \(G_i=0\) or \(G_i=1\), time is measured in weeks, and dose is recorded in units of 10 mg. A fitted model has \(\beta_0=40\), \(\beta_1=1.2\), \(\beta_2=2.0\), \(\beta_3=-3.0\), \(\beta_4=0.8\), and \(\beta_5=1.1\). For illustration, assume the linear mean form is reasonable over the observed range and the fitted covariance structure adequately represents within-patient dependence. Consider the model-implied means at dose \(d=2\), or 20 mg.
For \(G_i=0\), the predicted mean at time \(t\) is \(40+1.2t+2.0(2)=44+1.2t\). Its time slope is 1.2 efficacy points per week. At week 4, the predicted mean is \(44+1.2(4)=44+4.8=48.8\) points.
For \(G_i=1\), the predicted mean is \(40+1.2t+2.0(2)-3.0+0.8t+1.1(2)=43.2+2.0t\). Its time slope is \(1.2+0.8=2.0\) points per week. At week 4, the predicted mean is \(43.2+2.0(4)=43.2+8.0=51.2\) points.
At this dose and time, the model predicts a difference of \(51.2-48.8=2.4\) points between the genotype groups. The predicted trajectories are conditional on the specified dose and the model; they are not evidence that assigning a patient to a genotype or changing that patient’s dose would cause this difference.
Contrasts and Their Uncertainty
A scientific question often concerns a contrast rather than a single coefficient. For example, the difference between the two genotype groups’ dose associations when \(G_i\) is coded 0 or 1 is \(\beta_5\). More generally, a linear contrast is a weighted sum of fitted coefficients. If its estimate is \(c^\mathsf{T}\hat{\beta}\), its estimated variance is \(c^\mathsf{T}\widehat{\mathrm{Var}}(\hat{\beta})c\), where \(c\) specifies the contrast and \(\widehat{\mathrm{Var}}(\hat{\beta})\) is the estimated coefficient covariance matrix. This covariance matters: uncertainty in a sum of coefficients is not generally found by adding their standard errors.
A confidence interval for a contrast quantifies uncertainty under the fitted model and its inferential assumptions. It does not give the probability that the fixed contrast lies in the particular interval. When an analysis uses a large-sample normal approximation, a test statistic can be formed by dividing the estimated contrast by its standard error; small-sample procedures may instead use a reference distribution with suitable degrees of freedom.
Worked Example: Testing a Genotype Difference in Dose Association
Use the hypothetical model above, and suppose the estimated interaction is \(\hat{\beta}_5=1.10\) efficacy points per 10 mg, with standard error \(SE=0.45\) points per 10 mg. Assume the model’s large-sample normal approximation is appropriate for this illustration. The null hypothesis of equal dose associations is \(H_0:\beta_5=0\), against the two-sided alternative \(H_a:\beta_5\ne 0\).
The test statistic is \((1.10-0)/0.45=2.444\). The two-sided normal-approximation p-value is \(2P(Z\geq 2.444)\approx 0.0145\), where \(Z\sim N(0,1)\). A 95% confidence interval is \(1.10\pm1.96(0.45)=1.10\pm0.882=[0.218,1.982]\) efficacy points per 10 mg.
Under this model, the estimated dose association for genotype 1 is 1.10 points per 10 mg greater than for genotype 0, and the interval excludes zero. This is evidence of a difference in conditional dose associations under the stated model. It is not, on its own, evidence that increasing dose causes the stated improvement; dose adjustment may be related to prior response or other patient characteristics.
Why Repeated Measurements Cannot Be Counted as Independent
Repeated records from the same patient often share persistent characteristics, so their errors are correlated. Ignoring that correlation can produce standard errors that are too small and tests that are too optimistic. The following calculation shows the issue in a simplified setting; a mixed model uses its specified covariance structure rather than this shortcut.
Worked Example: The Effect of Within-Patient Correlation
Imagine a hypothetical study with 30 patients and four efficacy visits per patient. For a simplified calculation, suppose each visit has variance \(\sigma^2\) and within-patient correlation \(\rho=0.60\). These values describe a model for illustration, not results from a real study.
The variance inflation factor is \(1+(4-1)(0.60)=1+1.80=2.80\). Thus, the standard error for an average based on the clustered observations is inflated by a factor of \(\sqrt{2.80}=1.673\) compared with the independence calculation under these assumptions. The 120 records contain less independent information than 120 unrelated observations would.
A commonly used effective-sample-size calculation in this simplified setting is \(120/2.80=42.86\) independent-observation equivalents. This is an illustration of information loss, not a replacement for fitting the longitudinal model or for using the correct number of patients in inference. It shows why counting visits as independent can overstate precision.
Practical Interpretation and Common Pitfalls
Longitudinal genotype-by-dose analyses matter because a single efficacy measurement can hide changes in response over time and differences in how response tracks dose. They can summarize trajectories and quantify genotype-specific associations while keeping the patient, rather than each visit, as the source of repeated observations. The meaning of the estimates nevertheless depends on the chosen time origin, dose-history summary, outcome scale, model form, and covariance assumptions.
- Pitfall: Treating each visit as a new independent patient. This ignores within-patient correlation. Model the repeated structure and use an appropriate covariance specification.
- Pitfall: Interpreting a genotype-by-time coefficient as the entire genotype effect. It is a difference in time slopes. Predicted group means also depend on the intercept, dose terms, and reference values.
- Pitfall: Calling a dose coefficient causal because dose appears in a regression. In titration settings, earlier outcomes can affect later doses. Interpret the coefficient as conditional association unless the design and analysis justify a causal interpretation.
- Pitfall: Using current dose without considering exposure timing. If efficacy reflects earlier exposure, a prespecified lagged or weighted dose-history summary may better match the question.
Check Your Understanding
Use the model definitions and interpretation rules above to answer these questions.
- In a model with binary genotype coding, what does the genotype-by-time coefficient represent?
- Why can a current-dose coefficient be difficult to interpret causally when clinicians adjust dose in response to earlier efficacy?
- If the dose-by-genotype coefficient is positive, what does that say about the difference in dose associations between the genotype groups?
- How does positive within-patient correlation affect the uncertainty calculation compared with treating visits as independent?
- Name one reason to use a lagged or weighted dose-history summary instead of current dose.