Why the Interaction Changes the Question
In a repeated-measures expression analysis, a condition-by-time interaction asks whether expression changes over time differently across conditions. This is not the same as asking whether the conditions differ at one selected time, or whether expression changes over time within one condition. Those questions concern particular contrasts; the interaction concerns a difference between temporal responses.
The interpretation depends on the model’s coding and scale. In a log-link count model, the interaction describes a difference in slopes on the log-mean scale. It can also be expressed as a ratio of temporal rate ratios. The condition coefficient alone is the condition contrast only at the time coded as zero, not an overall treatment effect across all times.
Model and Coefficient Meanings
Suppose \(Y_{ij}\) is the pseudobulk count for a gene from donor \(i\) at observation \(j\), \(C_{ij}=0\) for control and \(C_{ij}=1\) for treatment, and \(t_{ij}\) is time measured from a defined zero point. A common model has a negative-binomial response and a log link:
Here \(L_{ij}\) is the library size, so \(\log(L_{ij}/10^6)\) is an offset; \(b_i\) is a donor-level random intercept; and \(\phi\) is the negative-binomial dispersion. For interpretation, define \(q_{ij}=\mu_{ij}/(L_{ij}/10^6)\), the model’s normalized expected expression in counts per million (CPM). The fixed-effect part predicts this rate, while a nonzero donor effect multiplies it by \(\exp(b_i)\).
This interpretation assumes the count distribution and offset are suitable, donor dependence is represented adequately for the fitted model, and the log mean is linear in time within each condition over the period being interpreted. It also assumes that time is recorded in the stated units and that the condition and time effects are identifiable from the design. A repeated-measures model does not by itself remove confounding: for example, if every control sample is measured only early and every treatment sample only late, condition and time cannot be separated reliably.
At time \(t\), the fitted log normalized rate in control is \(\beta_0+\beta_Tt+b_i\); in treatment it is \(\beta_0+\beta_C+(\beta_T+\beta_{CT})t+b_i\). Subtracting the control expression from the treatment expression on the log scale gives the treatment-versus-control log rate ratio:
Thus \(\beta_C\) is the log rate ratio at \(t=0\), and \(\beta_T\) is the control log-rate slope. The treatment log-rate slope is \(\beta_T+\beta_{CT}\). A positive \(\beta_{CT}\) means the treatment slope is greater than the control slope; it does not necessarily mean treatment expression is higher at every time. The difference in slopes is an additive difference on the log scale, while the corresponding change per time unit is multiplicative on the expression-rate scale.
Worked Example: Reading Coefficients and Fitted Rates
Suppose a hypothetical fitted model, with time measured in weeks, gives \(\beta_0=\log(5)\), \(\beta_C=-0.20\), \(\beta_T=0.08\), and \(\beta_{CT}=0.05\). Consider predictions for a donor with \(b_i=0\), so that rates are not multiplied by a donor-specific deviation.
At week 0, control expression is \(\exp(\log(5))=5.000\) CPM. Treatment expression is \(\exp(\log(5)-0.20)=5\exp(-0.20)=4.094\) CPM. The week-0 treatment-versus-control rate ratio is \(\exp(-0.20)=0.8187\), or about 18.1% lower in treatment at that time.
The control log-rate slope is \(0.08\) per week; the treatment slope is \(0.08+0.05=0.13\) per week. The interaction implies a ratio of temporal rate ratios of \(\exp(0.05)=1.051\) per week. In other words, the treatment rate’s multiplicative change per week is about 5.13% greater than the control rate’s multiplicative change per week.
At week 4, the control rate is \(5\exp(0.08\times4)=5\exp(0.32)=6.886\) CPM. The treatment rate is \(5\exp[-0.20+(0.08+0.05)\times4]=5\exp(0.32)=6.886\) CPM. Their equality at week 4 follows because the treatment-control log rate ratio is \(-0.20+0.05\times4=0\). The rates are therefore equal at that specific time in this fitted model; this does not make the slopes equal.
Contrasts, Uncertainty, and Tests
The coefficient \(\beta_{CT}\) directly tests whether the linear time slopes differ. A different question is whether the conditions differ at a chosen time \(t^\ast\). That contrast is \(\Delta(t^\ast)=\beta_C+t^\ast\beta_{CT}\), whose uncertainty depends on both coefficient variances and their covariance. Treating the two estimates as independent when they are not can give an incorrect standard error.
For an estimated coefficient vector \(\hat{\boldsymbol{\beta}}\) with estimated covariance matrix \(\widehat{\mathbf V}\), a linear contrast \(\mathbf a^\mathsf{T}\hat{\boldsymbol{\beta}}\) has estimated variance \(\mathbf a^\mathsf{T}\widehat{\mathbf V}\mathbf a\). For the time-specific condition contrast, the coefficients on \(\beta_C\) and \(\beta_{CT}\) are 1 and \(t^\ast\), respectively. A Wald interval can be constructed on the log rate-ratio scale and exponentiated to obtain an interval for the rate ratio. Its reference distribution and degrees of freedom should follow the fitted model’s inference procedure.
Worked Example: A Condition Contrast at a Chosen Time
For a hypothetical fit, suppose \(\hat{\beta}_C=-0.20\), \(\hat{\beta}_{CT}=0.05\), \(\widehat{\operatorname{Var}}(\hat{\beta}_C)=0.0400\), \(\widehat{\operatorname{Var}}(\hat{\beta}_{CT})=0.0009\), and \(\widehat{\operatorname{Cov}}(\hat{\beta}_C,\hat{\beta}_{CT})=-0.0030\). Consider the treatment-control contrast at week 2.
The estimated log rate ratio is \(-0.20+2(0.05)=-0.10\), giving a rate ratio of \(\exp(-0.10)=0.9048\). The fitted treatment rate is about 9.52% lower than the control rate at week 2. Its contrast variance is:
Using a two-sided normal-approximation Wald interval, the log rate-ratio interval is \(-0.10\pm1.96(0.1778)=[-0.4484,0.2484]\). Exponentiating the endpoints gives a rate-ratio interval of approximately \([0.6387,1.282]\). It includes 1, so these hypothetical results do not provide strong evidence of a condition difference at week 2 at the conventional 5% level. The interval describes uncertainty in the fitted contrast; it is not a probability statement about whether a fixed parameter lies in this particular interval.
An interaction test and a time-specific contrast answer distinct questions. Testing \(H_0:\beta_{CT}=0\) asks whether the modeled slopes differ. Testing \(H_0:\beta_C+t^\ast\beta_{CT}=0\) asks whether the conditions differ at the selected time. A significant interaction can coexist with a nonsignificant condition contrast at a particular time, and a condition contrast at one time does not establish that the temporal responses differ.
Worked Example: Reporting Evidence for Differential Temporal Response
In a separate hypothetical analysis, suppose the estimated interaction is \(\hat{\beta}_{CT}=0.050\) per week with standard error \(0.020\), and the model uses a large-sample normal Wald test. For \(H_0:\beta_{CT}=0\), the test statistic is \(z=0.050/0.020=2.50\), giving a two-sided \(p\)-value of approximately 0.0124.
The 95% Wald interval is \(0.050\pm1.96(0.020)=[0.0108,0.0892]\) log-rate units per week. Exponentiating gives an estimated ratio of temporal rate ratios of \(\exp(0.050)=1.051\), with interval \([\exp(0.0108),\exp(0.0892)]=[1.011,1.093]\) per week. Under the stated model and reference distribution, these results provide evidence that the treatment temporal response is steeper on the log-rate scale than the control response. They do not establish a causal treatment effect or imply a higher treatment rate at every time.
Centering Time and Choosing a Time Representation
The zero point for time determines the meaning of the condition coefficient. If time is recentered by defining \(t'=t-c\), the interaction coefficient and the difference in slopes stay the same, but the condition coefficient becomes the condition contrast at the original time \(c\). Specifically, \(\beta'_C=\beta_C+c\beta_{CT}\). Centering time at a scientifically useful visit can make the main condition coefficient directly answer a relevant comparison. It does not change fitted values when the model is reparameterized correctly.
A linear time term assumes a constant slope on the log-rate scale across the modeled interval. When measurements occur at a small number of visits and the shape may be nonlinear, representing time categorically allows each visit to have its own condition contrast. This uses more parameters and requires a joint test of the condition-by-visit terms for an overall interaction. Separate analyses at each visit can summarize local contrasts, but they do not by themselves provide a single test of whether the full temporal patterns differ, and repeated testing raises multiplicity concerns.
Diagnostics, Limitations, and Common Mistakes
Inspect fitted values and residual patterns across time separately by condition, and compare observed and fitted expression trends on a scale appropriate to the model. Systematic curvature, a sharp change restricted to one interval, or residual patterns that vary with time can indicate that a straight line in log mean is inadequate. Check whether both conditions are represented across the time range; extrapolated contrasts beyond observed support depend heavily on the model. Also consider whether a few influential donors or a poorly estimated covariance structure materially change the interaction estimate. A good diagnostic fit cannot resolve a design in which condition and time are confounded.
- Mistake: calling \(\beta_C\) the overall treatment effect. It is the treatment-control log rate ratio specifically at \(t=0\). State the time point or recenter time to a meaningful reference.
- Mistake: interpreting a positive interaction as higher treatment expression at every time. The interaction compares slopes. Calculate \(\beta_C+\beta_{CT}t\) to determine the condition contrast at the time of interest.
- Mistake: comparing separate significance decisions. “Significant change in treatment” and “not significant change in control” do not prove the changes differ. Test the interaction or the appropriate difference in slopes.
- Mistake: reporting only a coefficient without units or scale. State the time unit and that the coefficient is on the log-rate scale, or report its exponentiated ratio-of-rate-ratios interpretation.
The interaction is model-dependent: it summarizes the selected time scale and functional form, not every possible feature of the response curve. Likewise, a fitted normalized expression contrast is not automatically a biological or causal effect. Its interpretation depends on study design, normalization, model adequacy, and the uncertainty calculation used.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A fitted model has \(\hat{\beta}_C=0.30\), \(\hat{\beta}_{CT}=0.04\), and time is measured in days from baseline. Find the treatment-control rate ratio on day 5.
- If the control log-rate slope is \(-0.10\) per time unit and \(\beta_{CT}=0.03\), what is the treatment log-rate slope? Interpret the interaction’s exponentiated value.
- With the coefficients in Question 1, what is the new condition coefficient if time is recentered at day 4? Does the interaction change?
- Explain why a significant condition contrast at one visit does not, on its own, demonstrate a condition-by-time interaction.
Solutions. (1) The log rate ratio is \(0.30+5(0.04)=0.50\), so the rate ratio is \(\exp(0.50)=1.649\); fitted treatment expression is about 1.65 times control at day 5. (2) The treatment slope is \(-0.10+0.03=-0.07\) per time unit. The interaction exponentiates to \(\exp(0.03)=1.030\), so the treatment multiplicative change per time unit is about 3.05% greater than the control multiplicative change. (3) The recentered condition coefficient is \(0.30+4(0.04)=0.46\), the contrast at day 4. The interaction remains \(0.04\), since recentering shifts the reference contrast but does not alter the slope difference. (4) A single-visit contrast tests whether conditions differ at that visit; an interaction tests whether their temporal slopes or patterns differ. The former does not compare temporal changes.