Why the Scale of a Trajectory Matters
In a longitudinal model, a smooth curve may be specified for a generalized linear predictor, while the scientific quantity of interest is the conditional mean of the observed response. These curves are related, but they are generally not the same shape. A straight line in a logit predictor, for example, implies a curved probability trajectory; a straight line in a log predictor implies an exponential mean trajectory. The distinction matters when describing rates of change, peaks, and plateaus over time.
The focus here is the mapping from a spline trajectory on the link scale to the implied response scale. The construction of spline bases and the choice of response link are separate modeling decisions. We take the link and the predictor specification as given, then derive what they imply for the conditional mean.
For example, a link-scale predictor may have the form \(\eta_i(t\mid b_i)=\mathbf{x}(t)^\mathsf{T}\boldsymbol{\beta}+\mathbf{z}(t)^\mathsf{T}b_i\), where the time-dependent basis vectors can contain spline basis functions. Once the coefficients and \(b_i\) are fixed, this is a function of time. Applying \(h\) point by point gives the conditional response mean. The inverse link can change slopes, curvature, and visual appearance even though it does not change the underlying predictor specification.
Derivatives and Shape on the Two Scales
Assume that \(\eta_i(t\mid b_i)\) is differentiable at the time considered and that the inverse link \(h\) is differentiable at \(\eta_i(t\mid b_i)\). Holding the random effects fixed, the chain rule gives the response-scale slope:
Thus, the link-scale slope is not itself the response-scale slope. It is multiplied by the local sensitivity \(h'(\eta)\), which can vary over time as the predictor moves through the range of the inverse link. If \(h\) is differentiable and increasing, then \(h'(\eta)\geq 0\); strict increase alone does not guarantee a strictly positive derivative at every point. If \(h'(\eta(t))>0\) at a particular time, the two slopes are zero at exactly the same time and have the same sign there. Without that positive-derivative condition, a response-scale slope of zero need not imply a link-scale slope of zero.
Differentiating again, when the required second derivatives exist, gives:
The first term is curvature introduced by the inverse link; the second carries through curvature already present in the predictor. Consequently, even if the link-scale predictor is linear in time, its second derivative is zero but the response-scale trajectory can still curve because \(h''\) is not zero.
For a common spline construction that is continuous and has continuous first derivatives at its knots, a differentiable inverse link produces a response mean with the same continuity properties. If the predictor has a change in slope at a knot, the response mean's slope can also change there, scaled by \(h'(\eta)\). The actual size of that change on the response scale depends on the predictor level as well as on the change in predictor slope.
Worked Transformations
Worked Example: A Logistic Spline and Its Probability Slope
Suppose a hypothetical binary marker has a logistic conditional model with link-scale trajectory \(\eta(t)=-2+0.8t\), where time \(t\) is measured in years. The response-scale trajectory is the conditional probability \(\mu(t)=1/\{1+\exp[-\eta(t)]\}\). This predictor is linear, a special case of a spline predictor.
At \(t=2\) years, the predictor is \(\eta(2)=-2+0.8(2)=-0.4\), so \(\mu(2)=1/\{1+\exp(0.4)\}=0.4013\). For the logistic inverse link, \(h'(\eta)=\mu(1-\mu)\). Therefore the probability slope is \[ \mu'(2)=0.4013(1-0.4013)(0.8) =0.4013(0.5987)(0.8) =0.1922 \] probability units per year. The value \(0.8\) is the predictor slope in log-odds units per year, not a probability increase of 0.8 per year.
The second derivative for this linear predictor is \(\mu''(t)=\mu(t)\{1-\mu(t)\}\{1-2\mu(t)\}(0.8)^2\). At \(t=2\), substituting gives \(0.4013(0.5987)(1-0.8026)(0.64)\approx0.03035\) probability units per year squared. The predictor has no curvature, yet the probability curve is locally curving upward at this time.
The predictor crosses zero when \(-2+0.8t=0\), or \(t=2.5\) years. At that time the probability is \(0.5\), and its slope is \(0.5(1-0.5)(0.8)=0.2000\) probability units per year. The logistic curve's greatest slope occurs at this midpoint, illustrating how its changing sensitivity shapes the response trajectory.
Worked Example: A Log-Link Count Trajectory
Consider a hypothetical count marker with a Poisson model and log link. Suppose its link-scale trajectory is \(\eta(t)=\log(4)+0.3t\), with time in years. The conditional mean count per scheduled assessment is \(\mu(t)=\exp\{\eta(t)\}\).
At \(t=2\), \(\eta(2)=\log(4)+0.6\), so \(\mu(2)=\exp\{\log(4)+0.6\}=4\exp(0.6)=7.288\) expected counts per assessment. For the exponential inverse link, \(h'(\eta)=\exp(\eta)=\mu\). Hence \[ \mu'(2)=\mu(2)(0.3)=7.288(0.3)=2.186 \] expected counts per assessment per year. The predictor's constant slope of \(0.3\) is a log-mean change per year; it is not an increase of 0.3 counts per year.
Here \(\eta''(t)=0\), but \(\mu''(t)=\exp\{\eta(t)\}(0.3)^2\). At \(t=2\), this is \(7.288(0.09)=0.6559\) expected counts per assessment per year squared. The response mean increases at an increasing absolute rate, even though its log-scale trajectory is straight.
Worked Example: Conditional and Random-Effects-Averaged Means
A conditional trajectory fixes a subject's random effects. It should not automatically be read as the population-average response trajectory. To see why, consider a hypothetical logistic random-intercept model with fixed predictor value \(1\) at a particular time and a random intercept taking values \(+1\) and \(-1\), each with probability \(1/2\). This two-point distribution has mean zero.
For the subject with random intercept \(+1\), the conditional mean is \(\operatorname{logit}^{-1}(1+1)=\operatorname{logit}^{-1}(2)=0.8808\). With random intercept \(-1\), it is \(\operatorname{logit}^{-1}(1-1)=\operatorname{logit}^{-1}(0)=0.5000\). Averaging the two conditional means gives the random-effects-averaged mean \[ \frac{0.8808+0.5000}{2}=0.6904. \]
By contrast, setting the random intercept to its mean, zero, gives \(\operatorname{logit}^{-1}(1)=0.7311\). These values differ: averaging the inverse-link means is not the same operation as applying the inverse link to the average predictor. This distinction also applies across time, so the population-average trajectory may differ in level and shape from a trajectory evaluated at \(b_i=0\).
Interpreting and Checking the Trajectories
Before describing a fitted curve, identify which scale is being plotted and which mean is being summarized. A link-scale plot is useful for inspecting the specified predictor and its spline components. A response-scale plot is usually easier to interpret in the units of the marker: probability for a binary outcome, expected count for a count outcome, or an appropriately bounded conditional mean for a bounded response. When discussing a slope, report the scale and units explicitly.
A disciplined interpretation can be organized as follows:
State whether the curve is conditional on fixed random effects, such as a particular \(b_i\), or averaged over their distribution.
Identify \(\eta(t\mid b_i)\), \(h\), and the response-scale quantity \(h\{\eta(t\mid b_i)\}\).
Evaluate the inverse link for response-scale levels and use \(h'(\eta)\eta'\) for response-scale rates of change.
Confirm that the response-scale values satisfy the outcome's constraints and that conclusions are drawn only over the time range supported by the model and data.
The main alternatives differ in what they specify directly. A spline for \(\eta(t)\) models a flexible predictor and obtains a valid mean through the inverse link. A spline specified directly for \(\mu(t)\) instead models the response mean itself; it must be constrained or transformed appropriately if the mean must stay within a range such as \((0,1)\) or remain positive. A third quantity, the mean averaged over random effects, requires averaging conditional means, not merely evaluating the conditional curve at average random effects.
| Trajectory or specification | What it represents | Important qualification |
|---|---|---|
| Spline in \(\eta(t\mid b_i)\) | A flexible conditional generalized linear predictor | Its response-scale shape is determined jointly by the spline and \(h\). |
| Transformed curve \(h\{\eta(t\mid b_i)\}\) | The conditional response mean for fixed \(b_i\) | Levels and slopes are in response units; slopes include the factor \(h'(\eta)\). |
| Mean averaged over random effects | The response mean after averaging conditional means over the random-effects distribution | In general, it is not \(h\) applied to the average predictor. |
| Spline specified directly for \(\mu(t)\) | A response-scale mean curve | Constraints may be needed to keep predictions within the response's allowable range. |
Diagnostics, Limitations, and a Common Mistake
A practical diagnostic is to plot the predictor and the corresponding response mean over the same time range, preferably with the response scale labeled. Check values near the boundaries of the observed time range as well as around spline knots. For a logistic model, probabilities close to zero or one have small \(h'(\eta)=\mu(1-\mu)\), so a noticeable predictor change can correspond to a small probability change. For a log-link model, larger means amplify absolute changes because \(h'(\eta)=\mu\). These are mathematical features of the chosen link, not by themselves evidence that the model fits well.
The derivative calculations rely on differentiability at the time and predictor value in question. At a knot where the predictor is not differentiable, a single ordinary slope may not exist; one-sided slopes can still be examined. Further, a smooth transformed curve does not establish that its functional form is supported by the observed data. Sparse observations, influential boundary behavior, or a chosen link that does not represent the response adequately can make the plotted trajectory misleading. Model fit and uncertainty require attention in addition to the scale transformation.
- Common mistake: reading a predictor coefficient as a response-scale slope. In the logistic example, \(0.8\) is a change in log odds per year. It is not a change of 0.8 in probability per year; the probability slope at two years is approximately \(0.1922\) per year.
- Common mistake: assuming a linear predictor gives a linear mean. The log-link example has a straight predictor but an exponential conditional mean.
- Common mistake: assuming a strictly increasing inverse link always has positive derivative. Strict increase alone does not imply \(h'(\eta)>0\) at every point. Use the positive-derivative condition when claiming equivalence of stationary points.
- Common mistake: treating a mean-zero random effect as if averaging over random effects were the same as setting it to zero. In general, \(E_b[h\{\eta(t\mid b)\}]\neq h\{E_b[\eta(t\mid b)]\}\).
Check Your Understanding
Use the link-scale and response-scale distinction to answer each question. Solutions follow the questions.
- A logistic predictor is \(\eta(t)=0.5+0.2t\). What is the conditional probability at \(t=0\), and what is its probability slope there?
- For a differentiable inverse link, what condition at a time \(t\) guarantees that \(\mu'(t)=0\) if and only if \(\eta'(t)=0\)? Why is strict increase alone insufficient?
- A Poisson model has \(\eta(t)=\log(2)+0.1t\). Find the conditional mean at \(t=0\) and its response-scale slope at that time.
- In a random-effects model, is the response mean averaged over random effects generally equal to the inverse link evaluated at the average predictor? Explain.
Solutions. (1) At \(t=0\), \(\eta=0.5\), so \(\mu=1/\{1+\exp(-0.5)\}=0.6225\). The logistic derivative is \(\mu(1-\mu)\), so \(\mu'(0)=0.6225(0.3775)(0.2)=0.04700\) probability units per unit of time. (2) The required condition is \(h'\{\eta(t)\}>0\): then \(\mu'=h'(\eta)\eta'\) is zero exactly when \(\eta'\) is zero. Strict increase does not rule out a zero derivative at a point, so the product can be zero even when \(\eta'\neq0\). (3) At \(t=0\), \(\eta=\log(2)\) and \(\mu=\exp\{\log(2)\}=2\) expected counts. Since \(\mu'=\mu\eta'\), the slope is \(2(0.1)=0.2000\) expected counts per unit of time. (4) No, not in general. The averaged mean is \(E_b[h\{\eta(t\mid b)\}]\), while the alternative is \(h\{E_b[\eta(t\mid b)]\}\); nonlinear inverse links generally make these unequal.