Why the Between-Measurement Rule Matters
A time-varying covariate is often measured only at selected times, while an NLME model may require a covariate value at other times on an individual's timeline. The observations alone do not determine every value between them. An interpolation rule supplies those values by adding an assumption about how the covariate changed over time.
That assumption can matter even when all methods use the same measurements. A stepwise history holds a value constant over an interval; linear interpolation assumes a constant rate of change; a model-based history follows a specified trajectory, such as exponential decline or recovery toward a limit. The resulting covariate values can differ, and so can any later model calculations that use them. Here the focus is how to construct and assess the covariate history, not how to attach it to an individual model parameter.
The rule applies within the time range covered by measurements. Estimating values before the first measurement or after the last is extrapolation, not interpolation, and requires additional assumptions. At a measurement time, the observed value should be represented consistently with the data and the chosen event-time convention.
Three Ways to Fill an Interval
Suppose two consecutive measurements for one individual are \(x_0\) at \(t_0\) and \(x_1\) at \(t_1\), where \(t_0<t_1\). The following methods give different definitions of the history between those times.
| Method | Rule between observations | Main assumption |
|---|---|---|
| Stepwise, forward-held | Use \(x_0\) from \(t_0\) up to but not including \(t_1\) | The value is treated as unchanged until a new measurement is recorded |
| Linear | Connect \((t_0,x_0)\) and \((t_1,x_1)\) with a straight line | The covariate changes at a constant rate over the interval |
| Model-based | Evaluate a specified function \(g(t;\theta)\) | The covariate follows the chosen functional form and parameter constraints |
“Stepwise” needs a declared convention. In the forward-held version shown here, the most recent measurement is used until the next measurement time. Another stepwise convention could assign a different constant within an interval, but it must be stated explicitly. The measurement at \(t_1\) becomes the value from \(t_1\) onward under the forward-held rule, subject to the data's event-time ordering.
A model-based rule instead specifies a trajectory and its parameters. For example, a nonnegative exponential decline from \(x_0\) at \(t_0\) can be written \(x_i(t)=x_0\exp[-k(t-t_0)]\), with \(k\geq0\). A different scientific process may require a different function, such as a recovery curve approaching an asymptote. “Model-based” does not mean that one particular equation is universally correct: the function and constraints must follow from the covariate's meaning and the scientific question.
Worked Example: Three Histories From the Same Measurements
Worked Example: Three Histories From the Same Measurements
Consider hypothetical measurements of an individual's renal-function marker: \(x_0=40\) units at \(t_0=0\) hours and \(x_1=70\) units at \(t_1=6\) hours. Find the value at \(t=2\) hours under three rules.
Forward-held stepwise. The value measured at 0 hours is held until the next measurement, so \(x_i(2)=40\) units.
Linear. The rate is \((70-40)/(6-0)=5\) units per hour. Thus \(x_i(2)=40+5(2)=50\) units.
Model-based recovery. For illustration, suppose a recovery curve is scientifically justified and has a specified limiting value of 80 units: \(x_i(t)=80-(80-40)\exp(-kt)\). Use the measurement at 6 hours to determine \(k\): $$ 70=80-40\exp(-6k),\qquad \exp(-6k)=\frac{10}{40}=\frac14,\qquad k=\frac{\ln(4)}{6}=0.2310\ \text{h}^{-1}. $$ At 2 hours, $$ x_i(2)=80-40\exp[-(0.2310)(2)] \approx 80-40(0.6300)=54.80\ \text{units}. $$
The three values—40, 50, and about 54.80 units—are not competing measurements. They are consequences of different assumptions. The model-based result also depends on the stipulated limiting value of 80 units; changing that assumption would generally change the fitted rate and the interpolated value.
What the Formulas Assume
Linear interpolation follows directly from the equation of the line through the two observed points. Its slope is \((x_1-x_0)/(t_1-t_0)\). Starting from \(x_0\), the line has moved by that slope multiplied by elapsed time \(t-t_0\), giving the formula above. Substitution of \(t=t_0\) gives \(x_0\), and substitution of \(t=t_1\) gives \(x_1\), so both endpoints are matched exactly. The derivation establishes the arithmetic, not the scientific truth of a constant rate.
A model-based formula has its own conditions. The functional form must be appropriate over the interval, parameters must satisfy their stated constraints, and units must be compatible. If \(t\) is in hours, for example, an exponential rate \(k\) has units of inverse hours so that \(kt\) is dimensionless. A curve that violates a known bound or predicts a direction of change inconsistent with well-supported physiology is not made suitable merely because it is smooth.
Endpoint matching also requires care. For the nonnegative exponential decline \(x_i(t)=x_0\exp[-k(t-t_0)]\), two positive endpoint values at distinct times imply $$ k=\frac{\ln(x_0/x_1)}{t_1-t_0}. $$ This value satisfies \(k\geq0\) only when \(x_1\leq x_0\). If the later measurement is larger, then \(\ln(x_0/x_1)<0\), so the required \(k\) is negative and the pair cannot be matched by the stated model with \(k\geq0\). A model with a nonnegative decline rate must not be used to force an increasing pair into a declining trajectory.
Worked Example: Checking an Exponential-Decline Constraint
Suppose a hypothetical marker is 100 units at 0 hours and 64 units at 8 hours. Under the model \(x_i(t)=100\exp(-kt)\) with \(k\geq0\), $$ k=\frac{\ln(100/64)}{8} =\frac{\ln(1.5625)}{8} =\frac{0.4463}{8} =0.05579\ \text{h}^{-1}. $$ At 4 hours, the model gives \(100\exp[-(0.05579)(4)]\approx80.00\) units. The positive fitted rate is consistent with the decline from 100 to 64.
Now consider 80 units at 0 hours and 100 units at 8 hours. The endpoint formula would require $$ k=\frac{\ln(80/100)}{8} =\frac{\ln(0.8)}{8} =\frac{-0.2231}{8} =-0.02789\ \text{h}^{-1}. $$ That contradicts \(k\geq0\). Therefore no allowed parameter in this nonnegative-decline model matches both endpoints. The appropriate response is to reconsider the model or the data context, not to report the negative rate as a valid fit under the stated constraint.
In actual data, measurements may include error, so a model-based trajectory need not be forced through every observed point. One can estimate its parameters using the observations and a stated error model, then evaluate the fitted curve at intermediate times. In that setting, residual discrepancies between measurements and the curve are expected; the model should be assessed against the full data and scientific assumptions. A curve fitted to two points exactly provides little evidence that its form is correct.
Worked Example: Uneven Measurement Times
Worked Example: Uneven Measurement Times
A hypothetical covariate is measured as 12.0 mg/L at 3 hours and 9.0 mg/L at 11 hours. Find the linear-interpolated value at 8 hours and compare it with forward-held stepwise assignment.
The interval is 8 hours long, and the slope is \((9.0-12.0)/(11-3)=-3.0/8=-0.375\) mg/L per hour. Since 8 hours is 5 hours after the first measurement, $$ x_i(8)=12.0+(-0.375)(8-3) =12.0-1.875 =10.125\ \text{mg/L}. $$ Rounded to three significant figures, this is 10.1 mg/L. Under the forward-held stepwise rule, the assigned value at 8 hours is 12.0 mg/L because the 11-hour observation has not yet occurred. The methods differ by 1.875 mg/L before rounding.
The linear result is within the observed endpoint range and changes proportionally to elapsed time. That does not establish that the actual covariate changed steadily; it only verifies that the calculation follows the linear rule. If abrupt changes are plausible, the smooth intermediate value may be misleading.
Diagnostics, Alternatives, and Limitations
A useful check begins with a plot of the measured covariate against time for each individual, with the proposed interpolated segments overlaid. Inspect whether the implied path crosses observed values, respects known bounds, has plausible direction and rate, and behaves sensibly over long gaps. Check that units and time origins are consistent, and calculate a few intermediate values independently. For a model-based rule, also inspect parameter constraints and whether the fitted function can represent the observed pattern.
The alternatives answer different questions. Stepwise assignment is transparent and avoids inventing a gradual trend, but it assumes no change within each interval and produces jumps at measurement updates. Linear interpolation is simple, matches endpoints, and permits increasing or decreasing intervals, but assumes constant rate and can create values that are inappropriate for bounded, threshold-driven, or rapidly changing processes. A model-based trajectory can encode curvature, bounds, or a hypothesized mechanism, but adds structural assumptions and parameter uncertainty. No method can recover unobserved changes from measurements alone.
For example, linear interpolation between two positive measurements stays between them, but it may still be biologically implausible if a covariate is known to change abruptly. Conversely, a smooth mechanistic curve may be plausible but poorly identified when observations are sparse. Report the rule used and retain the distinction between observed and derived values. If conclusions are sensitive to the interpolation choice, comparing defensible alternatives is more informative than presenting one assumed history as uniquely determined.
Check Your Understanding
Answer each question using the specified interpolation rule. Solutions follow the questions.
- A covariate is 6 units at 2 hours and 10 units at 10 hours. What does forward-held stepwise assignment give at 7 hours?
- For the same observations, calculate the linear-interpolated value at 7 hours.
- For \(x(t)=x_0\exp[-k(t-t_0)]\), with \(k\geq0\), can the model exactly match positive values 30 at 1 hour and 36 at 5 hours? Justify using the rate formula.
- Name one assumption of linear interpolation and one diagnostic for a model-based history.
Solutions. (1) The forward-held value is 6 units until the 10-hour measurement. (2) The slope is \((10-6)/(10-2)=0.5\) units per hour, so \(x(7)=6+0.5(7-2)=8.5\) units. (3) The required rate is \(\ln(30/36)/(5-1)=\ln(5/6)/4\approx-0.04558\) per hour. Since it is negative, the endpoints cannot be matched with \(k\geq0\). (4) Linear interpolation assumes a constant rate of change within the interval. A model-based diagnostic is to check whether the fitted trajectory respects parameter constraints and produces plausible values between measurements.