Why Model a Nonlinear Covariate Association?
Within a dropout pattern, a baseline covariate need not have a constant association with a longitudinal outcome. For example, symptom scores might rise gradually with baseline severity at low values but rise more sharply at high values. A straight-line term cannot represent that change in slope. A quadratic term or a spline can, while retaining a conditional mean that is interpretable across covariate values.
Let \(Y_{it}\) be the outcome for individual \(i\) at visit \(t\), \(X_i\) a continuous baseline covariate, and \(G_i=g\) the individual’s dropout pattern. Write the pattern- and visit-specific conditional mean as
This curve describes the mean outcome at visit \(t\) among individuals in pattern \(g\) with baseline covariate value \(x\). It is conditional on dropout pattern; it is not automatically a population-wide or causal relationship. Pattern-specific curves should be evaluated at visits where the outcome is observed for that pattern, unless additional assumptions are used to model outcomes after dropout.
Quadratic Curves Within Patterns
A quadratic model is a compact way to allow curvature. To make the intercept easier to interpret and reduce unnecessary correlation between the linear and squared terms, it is often useful to center the covariate at a meaningful value \(c\). Define \(u=x-c\). One visit-specific model is
Here \(\beta_{0gt}\) is the mean at \(x=c\), \(\beta_{1gt}\) is the local slope at \(x=c\), and \(\beta_{2gt}\) controls curvature. The slope at any covariate value \(x\) is the derivative
Thus, a positive \(\beta_{2gt}\) means the slope increases as \(x\) increases; a negative value means the slope decreases. If \(\beta_{2gt}\ne0\), the quadratic’s stationary point is \(x=c-\beta_{1gt}/(2\beta_{2gt})\). That point is a minimum when \(\beta_{2gt}>0\) and a maximum when \(\beta_{2gt}<0\), but it is substantively useful only if it lies in a region with adequate data support.
Worked Example: Interpreting a Pattern-Specific Quadratic
Suppose a hypothetical study measures a continuous symptom score at visit 2. Larger scores indicate more severe symptoms. Baseline severity \(x\) ranges from 0 to 10, and the visit-2 outcome is observed for both the early-dropout and completer patterns. In the early-dropout pattern, a fitted conditional mean is
The covariate is centered at \(c=5\). The fitted mean at baseline severity 5 is \(42\) symptom-score points. At \(x=8\), \(u=8-5=3\), so
The fitted mean is therefore 49.2 symptom-score points at baseline severity 8. The slope at \(x=8\) is \(1.8+2(0.20)(3)=3.0\) symptom-score points per baseline severity point. At \(x=2\), \(u=-3\), giving a slope of \(1.8+2(0.20)(-3)=0.6\). The curve therefore rises more steeply at the higher covariate value. These are conditional mean descriptions, not evidence that changing baseline severity would cause a change in symptoms.
The model’s positive curvature implies a minimum at \(x=5-1.8/(0.40)=0.5\). That value is within the stated covariate range, but a useful interpretation still requires enough early-dropout individuals near 0.5. The range alone does not establish adequate local support.
Spline Curves and Their Interpretation
A quadratic imposes one overall curvature pattern: its slope changes linearly across the full covariate range. A spline allows the slope to change more flexibly. A simple choice is a continuous piecewise-linear spline with fixed knots \(\kappa_1,\ldots,\kappa_K\). Its hinge basis uses terms \((x-\kappa_k)_+=\max(0,x-\kappa_k)\). For example, with two knots, a pattern-specific mean can be written as
The curve is continuous at each knot. Before the first knot its slope is \(\beta_{1gt}\); between the knots its slope is \(\beta_{1gt}+\gamma_{1gt}\); after the second knot it is \(\beta_{1gt}+\gamma_{1gt}+\gamma_{2gt}\). The hinge coefficients are changes in slope, not slopes themselves. More elaborate spline bases can provide smoother curves, but the same principle applies: the basis functions combine to define a fitted curve, and individual basis coefficients may not have simple stand-alone interpretations.
Worked Example: Evaluating a Piecewise-Linear Spline
In a hypothetical completer pattern, suppose the fitted mean at a particular observed visit is
The knots are at 4 and 7. At \(x=3\), both hinge terms are zero:
At \(x=6\), the first hinge is \(6-4=2\), and the second is zero:
At \(x=9\), the hinge values are 5 and 2:
The slope is 1.2 outcome units per covariate unit below 4, \(1.2+2=3.2\) between 4 and 7, and \(1.2+2-1.5=1.7\) above 7. The curve is continuous at both knots: at 4 the first hinge is zero, and at 7 the second hinge is zero. The slope changes at the knots, as intended. The fitted values should not be extrapolated beyond the stated 0-to-10 range without a defensible model for behavior there.
Allowing Curves to Differ by Pattern
To assess whether covariate associations vary across dropout patterns, model the covariate basis and its interactions with pattern. For a quadratic basis, one pattern can be the reference and the other pattern’s curve can differ in its intercept, linear term, and squared term. In a spline model, the pattern interactions can similarly allow different slopes or different changes in slope. Allowing only a pattern-specific intercept assumes parallel covariate curves; it does not allow the nonlinear association itself to differ.
A common-curve model is a useful alternative when pattern-specific curves are not supported by the data. It shares the covariate-basis coefficients across patterns, possibly retaining pattern-specific intercepts. A more flexible model estimates separate basis coefficients. Comparing these models asks whether the data support the additional pattern-by-basis terms. Such a comparison requires an appropriate inferential procedure and a correctly specified covariance model for repeated outcomes; it should not be decided solely by which fitted curves look more different.
Worked Example: Contrasting Two Pattern-Specific Curves
Consider hypothetical fitted visit-2 means for a symptom score, with \(u=x-5\). Both patterns have observed outcomes at visit 2, and baseline severity values around 3 through 7 occur in each pattern. The fitted curves are
At \(x=3\), \(u=-2\). The pattern A fitted mean is \(40+1.0(-2)+0.10(4)=38.4\); the pattern B fitted mean is \(44+0.5(-2)+0.25(4)=44.0\). The B-minus-A contrast is \(44.0-38.4=5.6\) symptom-score points.
At \(x=7\), \(u=2\). The fitted means are \(40+2+0.4=42.4\) in pattern A and \(44+1+1=46.0\) in pattern B, for a B-minus-A contrast of \(46.0-42.4=3.6\) points. More generally, subtracting the two fitted curves gives
The estimated difference varies with baseline severity, so an intercept-only pattern contrast would not describe these fitted curves. These numerical contrasts are descriptive conditional comparisons. Dropout patterns may differ in who belongs to them; the curve difference alone does not establish a treatment effect or a causal effect of pattern membership.
Deriving the Slope and Checking the Model
The spline slope interpretation follows directly by differentiating within each interval. For the two-knot model, when \(x<\kappa_1\), both hinge terms equal zero, so the derivative is \(\beta_{1gt}\). When \(\kappa_1<x<\kappa_2\), the first hinge equals \(x-\kappa_1\) and the second equals zero; differentiating adds \(\gamma_{1gt}\). When \(x>\kappa_2\), both hinges vary with \(x\), adding both coefficients. Therefore,
At a knot, a piecewise-linear spline is continuous, though its derivative can change abruptly. This is not a defect if the aim is a flexible mean curve, but a sharp estimated slope change may be unstable or implausible. Smoother spline bases can reduce that abruptness, at the cost of additional modeling choices.
Before interpreting a fitted curve, check that the modeling and data conditions are reasonable:
- Support within each pattern. Plot or tabulate the covariate distribution separately by pattern. Knots and reported contrasts should lie in regions with data, not just in the overall covariate range.
- Outcome and visit availability. Use the pattern-specific curve at visits where outcomes are observed in that pattern. A curve for an unobserved post-dropout outcome requires extra assumptions and is not identified merely by fitting observed outcomes.
- Repeated observations. When several visits from an individual enter the model, account for within-individual dependence in estimation and uncertainty. Treating all visit records as independent can give incorrect standard errors.
- Functional form and complexity. Inspect residual patterns and fitted curves, and assess sensitivity to reasonable knot choices or polynomial degree. Too few basis terms can miss curvature; too many can fit noise, especially in small pattern strata.
- Confounding and interpretation. If other baseline covariates or treatment are relevant, the model may need to adjust for them. The resulting curve is conditional on included variables, and does not by itself justify a causal interpretation.
Common Pitfalls and Limitations
A frequent mistake is to read \(\beta_{2gt}\) as the change in outcome for a one-unit increase in \(x\). It is not: in the centered quadratic model, the slope is \(\beta_{1gt}+2\beta_{2gt}(x-c)\), so the association depends on the covariate value. Another mistake is to compare raw coefficients from different spline bases as though they were directly comparable. Compare fitted curves, slopes, or predicted contrasts at stated covariate values instead.
Pattern-specific flexibility also costs information. A pattern with few individuals may not support a separate nonlinear curve, and sparse covariate regions can produce extreme or unstable fitted values. A shared curve can be more stable but imposes the assumption that the covariate association has the same shape across patterns. Neither choice is universally preferable: the model should reflect the scientific question, available support, and uncertainty.
Finally, conditioning on dropout pattern is central to pattern-mixture modeling, but pattern membership is not a randomized group assignment. A pattern-specific association describes observed conditional distributions. It does not establish that dropout caused the association, and observed outcomes within a pattern do not reveal outcomes that would have been measured after dropout without additional identifying assumptions.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- For \(\mu(x)=20+2(x-4)-0.25(x-4)^2\), what is the fitted mean at \(x=6\), and what is the slope there?
- In a hinge spline with knots at 3 and 8, what is the slope between the knots if the linear coefficient is 1.5 and the first hinge coefficient is \(-0.4\)?
- Why does a pattern-specific curve at a visit not automatically describe that pattern’s outcome after dropout?
- A model includes pattern-specific intercepts but common linear and quadratic covariate coefficients. What aspect of the curves is constrained to be the same across patterns?
Solutions. (1) Here \(u=6-4=2\), so the fitted mean is \(20+2(2)-0.25(4)=23\). The slope is \(2+2(-0.25)(2)=1\) outcome unit per covariate unit. (2) Between the knots, the slope is \(1.5-0.4=1.1\) outcome units per covariate unit. (3) The outcome after dropout is unobserved for that pattern; modeling observed outcomes alone does not identify the missing values. Additional assumptions are needed to extend the curve to those outcomes. (4) The covariate association’s shape and slopes are constrained to be the same; only the curves’ vertical levels may differ through their intercepts.