Why Allow a Covariate Slope to Differ by Group?
A continuous covariate may relate to a pharmacokinetic or pharmacodynamic parameter differently across categorical groups. For example, clearance may change with body weight, but the rate of that change may differ between two treatment formulations or clinical subgroups. An additive model that gives every group the same slope cannot represent that pattern. A continuous-by-categorical interaction allows the slope to vary by group.
The interaction is part of a model for an NLME parameter, not necessarily a direct regression of the measured response on the covariates. The parameter then enters the structural model that describes the response. The introductory material on reference-cell coding gives the indicator-variable setup used here; the key additional step is to multiply each group indicator by the continuous covariate.
Model and Interpretation
Consider a categorical covariate with two groups, A and B. Let \(x_i\) be a continuous covariate for individual \(i\), and define its centered and scaled form as \(z_i=(x_i-x_0)/c\), where \(x_0\) is a meaningful reference value and \(c\) is a chosen scale, such as 10 kg. Let \(I_{Bi}=1\) for group B and \(0\) for group A. A linear model for a parameter on its log scale is:
Here \(CL_i\) is individual clearance, \(\eta_i\) is the individual random effect on log clearance, and the \(\beta\) terms are fixed-effect coefficients. A common NLME specification assumes that individual random effects have mean zero, are independent across individuals, and follow a specified distribution, often a normal distribution with estimated variance. The observation model must also be specified for the data at hand. The fixed-effect predictions below set \(\eta_i=0\); if \(\eta_i\) is normal and centered at zero, these are typical, median-scale predictions, not arithmetic population means.
Because \(I_{Bi}=0\) in group A and \(I_{Bi}=1\) in group B, substitution gives the group-specific equations:
Thus, \(\beta_0\) is the group A intercept at \(z=0\), and \(\beta_B\) is the difference between group B and A at that reference value. The group A slope is \(\beta_x\); the group B slope is \(\beta_x+\beta_{xB}\). The interaction coefficient \(\beta_{xB}\) is the difference between the group B and group A slopes, measured per unit of \(z\).
The centering value matters for interpreting the intercept and group contrast. Choosing \(x_0\) within a clinically relevant range makes the intercept and \(\beta_B\) interpretable at that value; it does not change the model’s fitted values when the coefficients are correspondingly re-expressed. Scaling \(z\) also determines the units of the slopes and interaction. If \(c=10\) kg, a slope is the change in log clearance per 10 kg, not per kilogram.
Worked Predictions
Worked Example: Two Groups with Different Weight Slopes
Suppose a hypothetical NLME analysis models clearance in L/h using \(z=(WT-70)/10\), where \(WT\) is weight in kg. The illustrative fixed-effect coefficients are \(\beta_0=2.30\), \(\beta_x=0.08\), \(\beta_B=0.18\), and \(\beta_{xB}=-0.05\). Calculate the typical clearance for each group at 70 kg and 80 kg. These coefficients are hypothetical and are not results from a real study.
For group A, the log-clearance equation is \(2.30+0.08z\). For group B, it is \((2.30+0.18)+(0.08-0.05)z=2.48+0.03z\). At 70 kg, \(z=(70-70)/10=0\). Therefore, group A has typical clearance \(\exp(2.30)=9.974\) L/h, while group B has \(\exp(2.48)=11.94\) L/h.
At 80 kg, \(z=(80-70)/10=1\). Group A has log clearance \(2.30+0.08(1)=2.38\), so its prediction is \(\exp(2.38)=10.80\) L/h. Group B has log clearance \(2.48+0.03(1)=2.51\), so its prediction is \(\exp(2.51)=12.30\) L/h. The predicted weight slope is 0.08 log units per 10 kg in A and 0.03 in B. The negative interaction, \(-0.05\), is the difference between these slopes.
Worked Example: How the Group Contrast Changes with Weight
Use the same hypothetical model. Calculate the typical B-to-A clearance ratio at 60 kg and 80 kg, and explain how the ratios reflect the interaction.
At 60 kg, \(z=(60-70)/10=-1\), so the log-scale contrast B minus A is \(0.18+(-0.05)(-1)=0.23\). The clearance ratio is \(\exp(0.23)=1.259\). Thus, at 60 kg, the typical clearance prediction for B is 1.259 times that for A, or about 25.9% higher.
At 80 kg, \(z=1\), so the contrast is \(0.18+(-0.05)(1)=0.13\), and the ratio is \(\exp(0.13)=1.139\). The typical prediction for B is about 13.9% higher at 80 kg. The B-to-A ratio decreases as weight increases because the B slope is lower than the A slope on the log-clearance scale. These are model-based contrasts, not evidence that group membership causes a clearance difference.
Worked Example: Three Groups with Reference-Cell Coding
Suppose a hypothetical model for a positive parameter \(V_i\), measured in L, uses group A as the reference and \(z=(WT-70)/10\). The fixed-effect model is \(\log(V_i)=1.80+0.06z+0.20I_{Bi}-0.02zI_{Bi}-0.10I_{Ci}+0.04zI_{Ci}+\eta_i\). Find the typical predictions for all three groups at 90 kg.
At 90 kg, \(z=(90-70)/10=2\). In group A, both indicators are zero, giving log prediction \(1.80+0.06(2)=1.92\), so the typical \(V\) prediction is \(\exp(1.92)=6.821\) L.
In group B, \(I_B=1\) and \(I_C=0\). Its intercept is \(1.80+0.20=2.00\), and its slope is \(0.06-0.02=0.04\). The log prediction is \(2.00+0.04(2)=2.08\), and the typical prediction is \(\exp(2.08)=8.004\) L.
In group C, \(I_B=0\) and \(I_C=1\). Its intercept is \(1.80-0.10=1.70\), and its slope is \(0.06+0.04=0.10\). The log prediction is \(1.70+0.10(2)=1.90\), and the typical prediction is \(\exp(1.90)=6.686\) L. Each group has its own intercept and slope, while the reference group’s coefficients remain \(\beta_0\) and \(\beta_x\).
Why the Interaction Formula Works
The group contrast and the slope difference follow directly from the model. Write the fixed part of the two-group model as \(f(z,g)\), where \(g\) identifies the group. Substituting the two indicator values and subtracting gives the contrast; taking the change in that contrast per unit of \(z\) gives the slope difference:
This also distinguishes an interaction model from an additive model. Without the product term, the group contrast is \(\beta_B\) at every \(z\), so the groups have parallel lines on the modeled parameter scale. With the product term, the contrast changes linearly with \(z\), and the lines need not be parallel.
Assumptions, Diagnostics, and Alternatives
The interaction specification is useful only when its assumptions are plausible over the covariate range used for modeling and prediction. In particular, it assumes a linear relationship between \(z\) and the modeled parameter scale within each group. A log parameter model also implies that predictions on the original scale remain positive. It does not guarantee that a straight line on the log scale is adequate for every group.
Inspect covariate coverage and model behavior separately by group. Sparse observations at one end of the weight range can make a group-specific slope uncertain, while observations from only one group near that end cannot establish how the slopes differ there. Useful checks include plotting observed covariate values by group, examining model fit and residual patterns against the covariate and group, and checking whether residual patterns suggest curvature or systematic group-specific bias. In an NLME analysis, also assess whether the fitted model and its individual-level variability are adequate; an interaction does not repair a misspecified structural or observation model.
The principal simpler alternative is an additive model with a group effect but no interaction. It is more parsimonious and assumes a common slope, so it can be preferable when the data do not support group-specific slopes. Another possibility is to fit separate covariate relationships by group, but this does not automatically provide the partial pooling or shared structure of a joint NLME model, and it may be unstable when some groups are small. The interaction model shares a reference framework while allowing slopes to differ. It can still be imprecise if the data provide little information about the interaction.
Predictions far outside the observed range for a group are extrapolations: the assumed linear group-specific slope may not continue there. The model also describes conditional parameter relationships, not causal effects. A group contrast can reflect other differences between groups unless the study design and analysis justify a causal interpretation.
- Wrong reasoning: “The interaction coefficient is negative, so group B has lower clearance than group A for every weight.”
- Correction: The coefficient is the difference in slopes, not the group contrast at every covariate value. The contrast is \(\beta_B+\beta_{xB}z\); its sign depends on both coefficients and \(z\).
- Another pitfall: Reading \(\beta_B\) as the group difference at an arbitrary covariate value. It is the contrast at \(z=0\), which corresponds to \(x_0\) under the stated centering.
Check Your Understanding
Answer the questions, then compare your work with the solutions below.
- For \(\log(P_i)=1.5+0.04z_i+0.3I_{Bi}+0.02z_iI_{Bi}+\eta_i\), state the group A and group B intercepts and slopes on the log scale.
- Using the model in question 1, calculate the typical \(P\) prediction for group B at \(z=2\).
- In a two-group model, what does an interaction coefficient of \(-0.06\) mean if \(z\) is measured per 5 kg?
- Write the two-group model without an interaction and state what assumption it makes about the group slopes.
- Why should a prediction at a weight far beyond the observed range in one group be treated cautiously?
Solutions. 1. Group A has intercept \(1.5\) and slope \(0.04\). Group B has intercept \(1.5+0.3=1.8\) and slope \(0.04+0.02=0.06\), all on the log scale. 2. At \(z=2\), group B’s log prediction is \(1.8+0.06(2)=1.92\), so its typical prediction is \(\exp(1.92)=6.821\) in the units of \(P\). 3. The non-reference group’s slope is 0.06 log units per 5 kg lower than the reference group’s slope; the coefficient alone does not give the group contrast at every weight. 4. One form is \(\log(P_i)=\beta_0+\beta_xz_i+\beta_BI_{Bi}+\eta_i\). It assumes a common slope \(\beta_x\) for both groups and a constant group contrast on the log scale. 5. The prediction extrapolates the group-specific relationship beyond its observed support. If the linear form does not continue there, the predicted parameter and group contrast may be unreliable.