Why a Quadratic Trajectory Changes the Slope Association
A linear marker trajectory has a constant slope: its rate of change does not depend on follow-up time. A quadratic trajectory allows that rate to change. Consequently, a hazard association with the marker’s slope can also vary over follow-up, even when the slope-association parameter itself is constant. The key step is to differentiate the latent trajectory correctly, then compare subjects’ slopes at the same time.
This tutorial considers the slope association for a quadratic trajectory. It does not treat the quadratic coefficient itself as the slope, nor does it interpret a change in one subject’s hazard over time as a hazard ratio determined by slope alone.
Model and Assumptions
The coefficients can represent subject-specific trajectories, for example through fixed and subject-level components. The calculations below condition on the trajectory coefficients; they do not require a particular probability distribution for them. The time variable must be measured in a stated unit, such as years, and the same time scale must be used in the trajectory and the hazard model.
For a slope-linked association, consider the conditional hazard model
where \(h_i(t\mid b_i,\mathbf{w}_i)\) is the instantaneous event hazard for a subject still at risk at time \(t\), \(h_0(t)\) is the baseline hazard, \(\mathbf{w}_i\) is a vector of covariates, \(\boldsymbol{\gamma}\) is its coefficient vector, and \(\alpha_s\) is the slope-association parameter. The model assumes that the hazard depends on the latent instantaneous slope through the stated exponential link, conditional on the trajectory and covariates. It also assumes the same \(\alpha_s\) applies throughout the modeled time range. The slope is that of the latent trajectory, not a derivative calculated from noisy observed measurements.
To isolate the slope association when comparing two subjects, compare them at the same time and hold their covariates equal. The baseline hazard and covariate terms then cancel. If the covariates differ, their contribution must also be included in the hazard ratio.
Deriving the Time-Specific Hazard Ratio
For two subjects \(A\) and \(B\), at the same follow-up time \(t\), with equal covariates, the conditional hazard ratio is
Substituting the derivatives of their quadratic trajectories gives a direct formula in terms of the coefficients:
This expression shows why the hazard ratio can change with time: the difference in slopes depends on \(t\) whenever the subjects’ quadratic coefficients differ. The slope association parameter \(\alpha_s\) can remain constant while the time-specific contrast changes.
For \(m_i(t)=b_{0i}+b_{1i}t+b_{2i}t^2\), use \(m_i'(t)=b_{1i}+2b_{2i}t\).
Find \(m_A'(t)\) and \(m_B'(t)\), then subtract in the order matching the hazard ratio \(h_A(t)/h_B(t)\).
Calculate \(\exp\{\alpha_s[m_A'(t)-m_B'(t)]\}\). State the comparison, time, and units.
Worked Calculations
Worked Example: Finding the Slope at Selected Times
Suppose a hypothetical subject has latent marker trajectory \(m(t)=2.4+0.8t-0.15t^2\), where \(t\) is measured in years and the marker is measured in marker units. Find the instantaneous slope at years 1 and 3, and determine when the slope is zero.
Differentiate term by term:
At \(t=1\) year, \(m'(1)=0.8-0.30(1)=0.50\) marker units per year. At \(t=3\) years, \(m'(3)=0.8-0.30(3)=-0.10\) marker units per year. The slope is zero when \(0.8-0.30t=0\), so \(t=0.8/0.30=2.67\) years. Thus the fitted trajectory is increasing at year 1 and decreasing at year 3. The zero slope identifies its turning point; it does not imply that the marker value is zero.
Worked Example: Comparing Two Subjects at Two Times
For two hypothetical subjects, let \(m_A(t)=4+0.6t+0.10t^2\) and \(m_B(t)=3+0.2t+0.25t^2\), with marker units and time in years. Suppose they have equal covariates and the fitted slope association is \(\alpha_s=-0.70\) per marker unit per year. Calculate \(h_A(t)/h_B(t)\) at years 1 and 4.
Their slopes are \(m_A'(t)=0.6+0.20t\) and \(m_B'(t)=0.2+0.50t\), so the difference, in the stated order, is \(0.4-0.30t\) marker units per year. At year 1 this difference is \(0.4-0.30(1)=0.10\) marker units per year. Therefore,
At year 1, subject A’s conditional hazard is about 0.932 times subject B’s, or about 6.76% lower, under this model and conditional comparison. At year 4, the slope difference is \(0.4-0.30(4)=-0.80\) marker units per year, giving
At year 4, subject A’s conditional hazard is about 1.75 times subject B’s. The change in direction follows from the slopes crossing: \(0.4-0.30t=0\) at \(t=1.33\) years. The coefficient \(\alpha_s\) did not change; the time-specific slope contrast did.
Worked Example: Interpreting a Slope Contrast
Consider hypothetical trajectories \(m_C(t)=1+1.2t-0.10t^2\) and \(m_D(t)=0.5+0.4t+0.05t^2\), with time in years. Let \(\alpha_s=1.10\) per marker unit per year, and assume equal covariates. Compare their hazards at years 2 and 5.
The derivatives are \(m_C'(t)=1.2-0.20t\) and \(m_D'(t)=0.4+0.10t\). At year 2 the slopes are \(0.80\) and \(0.60\) marker units per year, respectively. Hence,
At year 2, the model associates C’s higher slope with a conditional hazard about 1.25 times D’s. At year 5 the slopes are \(0.20\) and \(0.90\), respectively, so
At year 5, C’s lower slope corresponds to a conditional hazard about 0.463 times D’s. These are model-based conditional associations, not evidence that changing a subject’s marker slope would cause the stated hazard change.
Interpretation, Checks, and Alternatives
The units help check the calculation. If the marker is measured in milligrams per liter and time in years, then \(m_i'(t)\) is measured in milligrams per liter per year. For \(\alpha_s m_i'(t)\) to be dimensionless inside the exponential, \(\alpha_s\) has reciprocal slope units. A one-unit difference in slope, in the units used to fit the model, corresponds to a hazard ratio of \(\exp(\alpha_s)\), holding time and other covariates fixed.
A few checks are especially useful. First, the derivative of \(b_{2i}t^2\) is \(2b_{2i}t\), not \(b_{2i}t\). Second, check that \(t\) is expressed in the same units as the fitted model; a coefficient per year cannot be used as though it were per month. Third, retain the comparison order throughout: reversing \(A-B\) to \(B-A\) reciprocates the hazard ratio. Finally, inspect whether the quadratic trajectory is plausible over the follow-up interval. A quadratic can imply a turning point and eventually extreme behavior, so extrapolating its slope far beyond the observed interval may be misleading.
A slope link answers a different question from a current-value link: it relates hazard to the marker’s instantaneous rate of change, rather than to its level. A linear trajectory is a special case with \(b_{2i}=0\), in which each subject’s slope is constant. A quadratic trajectory allows that slope contrast, and therefore the time-specific hazard ratio, to vary. These approaches are not interchangeable; which association is scientifically meaningful depends on whether marker level, rate of change, or another feature is relevant.
The ratio derived above compares two subjects at the same time. It is generally not the ratio of one subject’s hazard at two different times: that comparison also involves the baseline hazard at those times. Nor does a point estimate alone express uncertainty. In an analysis, uncertainty in the estimated association and trajectory coefficients must be reflected when reporting uncertainty for a derived time-specific hazard ratio.
Common Mistakes
- Using the quadratic coefficient as the slope. The coefficient \(b_{2i}\) describes curvature; the slope is \(b_{1i}+2b_{2i}t\).
- Comparing slopes at different times. A time-specific between-subject hazard ratio uses both subjects’ slopes evaluated at the same \(t\).
- Ignoring the sign of the slope difference. The ratio \(h_A/h_B\) uses \(m_A'(t)-m_B'(t)\); reversing the order changes the ratio to its reciprocal.
- Calling an association causal. The conditional hazard ratio describes the fitted model’s association, not the effect of intervening to change a subject’s trajectory.
Check Your Understanding
Answer each question, then compare your work with the solutions below.
- For \(m(t)=3+0.5t+0.20t^2\), with time in years, find the slope at year 2.
- Two subjects have slope difference \(m_A'(t)-m_B'(t)=-0.4\) marker units per year at a particular time. If \(\alpha_s=0.8\) per marker unit per year and covariates are equal, calculate \(h_A(t)/h_B(t)\) and interpret it.
- For \(m_A(t)=2+0.3t+0.10t^2\) and \(m_B(t)=1+0.7t\), find the time at which their slopes are equal.
- Explain why \(\exp\{\alpha_s[m_i'(5)-m_i'(2)]\}\) does not generally give subject \(i\)’s hazard ratio at years 5 versus 2.
Solutions. 1. Differentiate to get \(m'(t)=0.5+0.40t\); at year 2 the slope is \(0.5+0.40(2)=1.30\) marker units per year. 2. The ratio is \(\exp\{0.8(-0.4)\}=\exp(-0.32)\approx0.7261\). At that time, A’s conditional hazard is about 0.726 times B’s, or about 27.4% lower. 3. The slopes are \(m_A'(t)=0.3+0.20t\) and \(m_B'(t)=0.7\). Equality requires \(0.3+0.20t=0.7\), so \(t=2\) years. 4. That expression uses a slope difference across two times, not a same-time difference between subjects. A within-subject hazard ratio across times also depends on the baseline hazard ratio \(h_0(5)/h_0(2)\); it cannot generally be obtained from the slope term alone.