Why Compare Functions on the Same Data?
A covariate relationship can look convincing under more than one mathematical form. A straight-line increase, a constant proportional increase, a power relationship, and a flexible spline may all follow the same observed trend over a limited range. They need not imply the same parameter values between observations, or the same behavior at the edges of the data. Comparing functions on a shared dataset makes these differences visible.
The examples use a hypothetical pharmacometric setting in which body weight \(x\), measured in kilograms, is related to a typical clearance parameter \(\theta(x)\), measured in liters per hour. The values are illustrative, not from a real study. We compare functions fitted to the same seven observations; the goal is to examine what each functional form implies, not to declare one universally best.
Earlier material on additive, exponential, power, and spline effects defines these forms individually. Here the emphasis is on how their predictions and interpretations compare when they are applied to identical data.
One Dataset, Four Candidate Functions
Suppose the hypothetical observations are as follows. The four prediction columns come from illustrative fitted functions. Values are rounded to three decimal places; calculations below use the displayed coefficients and unrounded function evaluations.
| Weight \(x\) (kg) | Observed clearance (L/h) | Additive (L/h) | Exponential (L/h) | Power (L/h) | Linear spline (L/h) |
|---|---|---|---|---|---|
| 40 | 3.800 | 3.650 | 4.176 | 3.887 | 3.800 |
| 55 | 4.300 | 4.325 | 4.570 | 4.486 | 4.379 |
| 70 | 5.000 | 5.000 | 5.000 | 5.000 | 4.965 |
| 85 | 5.500 | 5.675 | 5.471 | 5.456 | 5.550 |
| 100 | 5.900 | 6.350 | 5.986 | 5.871 | 5.885 |
| 115 | 6.200 | 7.025 | 6.550 | 6.252 | 6.220 |
| 130 | 6.400 | 7.700 | 7.167 | 6.606 | 6.400 |
All four predictions equal 5.00 L/h at the reference weight of 70 kg, except the illustrative spline, whose fitted value there is 4.965 L/h. The shared reference makes it easier to compare how each function changes away from 70 kg. The additive, exponential, and power examples are:
The additive slope is 0.0450 L/h per kg: each additional kilogram adds the same amount to the predicted clearance. The exponential coefficient gives a constant change in log clearance per kilogram; it does not add a fixed amount to clearance. In the power function, the exponent 0.450 is the elasticity: locally, a 1% increase in weight corresponds to about a 0.450% increase in clearance.
Worked Example: Comparing Predictions at 100 kg
At \(x=100\) kg, calculate the predictions from the additive, exponential, and power functions, then compare them with the observed clearance of 5.900 L/h.
Additive. Substitute \(x=100\) into the line:
The additive prediction is 0.450 L/h above the observed value.
Exponential. Substitute into the exponential function:
This prediction is about 0.086 L/h above the observation.
Power. Substitute the weight ratio:
This prediction is about 0.029 L/h below the observation. At 100 kg, therefore, the exponential and power predictions are close, while the additive prediction is higher. This single comparison does not establish which function is preferable: the pattern across the range, model assumptions, uncertainty, and scientific plausibility also matter.
How the Interpretations Differ
The models can be compared by considering what they say about a change from the reference weight, not just by looking at a single predicted value. For the additive function, a 30 kg increase from 70 to 100 kg adds \(0.0450(30)=1.35\) L/h. For the exponential function, the ratio of the two predictions is:
Thus, the exponential function predicts about 19.7% greater clearance at 100 kg than at 70 kg. For the power function, the ratio is \((100/70)^{0.450}\approx1.1741\), or about 17.4% greater. The models share the same reference prediction but imply different changes because their coefficients describe different scales.
A short derivative calculation explains the distinction. For the exponential function, differentiating with respect to weight gives:
Its absolute increase per kilogram grows with the current predicted clearance, while its proportional increase per kilogram remains constant. For the power function, taking logarithms gives \(\log\theta=\log(5.00)+0.450\log(x/70)\). Differentiating with respect to \(\log x\) shows that \(d\log\theta/d\log x=0.450\), the constant elasticity. The additive function instead has the constant absolute slope \(d\theta_{\mathrm{add}}/dx=0.0450\) L/h per kg.
A spline can represent changing slopes, so its meaning is usually expressed through predicted values and local changes over specified intervals rather than one global slope or elasticity. For a transparent comparison here, the spline is a piecewise-linear function with knots at the seven observed weights. At those knots, its fitted predictions are the spline column in the table; between adjacent knots, it linearly interpolates the two endpoint predictions. This flexible illustrative fit is not a claim that seven knots are generally advisable.
Worked Example: Interpolating With the Spline
The spline predictions at 40 kg and 55 kg are 3.799905 and 4.379055 L/h before rounding. Find its prediction at 50 kg, which lies between those knots.
Here \(t=(50-40)/(55-40)=10/15=2/3\). Substituting in the interpolation formula gives:
The local slope on this interval is \((4.379055-3.799905)/15\approx0.03861\) L/h per kg. It differs from the 0.0450 L/h per kg additive slope, and the spline can have a different slope in the next interval. This prediction is interpolation within the observed range, not extrapolation.
Boundary Behavior, Diagnostics, and Alternatives
The predictions near the observed boundaries expose differences that can be obscured around the reference value. At 130 kg, the additive function predicts 7.700 L/h, while the exponential, power, and spline predictions are 7.167, 6.606, and 6.400 L/h. The additive function continues at the same absolute rate; the exponential function accelerates in absolute terms; the power function increases more gradually here; and the spline follows its final fitted segment.
Worked Example: What Happens Just Beyond the Data?
For illustration only, evaluate each function at 145 kg, 15 kg above the largest observed weight. These values are extrapolations: there are no observations at 145 kg to check them.
The additive prediction is \(5.00+0.0450(145-70)=8.375\) L/h. The exponential prediction is \(5.00\exp\{0.00600(75)\}=5.00\exp(0.450)\approx7.842\) L/h. The power prediction is \(5.00(145/70)^{0.450}\approx6.940\) L/h.
The spline uses the final segment from 115 to 130 kg, whose slope is \((6.400380-6.220035)/15\approx0.012023\) L/h per kg. Extending that line gives \(6.400380+0.012023(145-130)\approx6.581\) L/h. This extension is a consequence of the chosen linear-spline boundary rule, not evidence that clearance will follow that trend above 130 kg. The four predictions differ substantially despite being evaluated on the same data.
Useful diagnostics begin with plots of observed values and each fitted function against the covariate, using the same axes and units. Residuals—the observed values minus fitted predictions—can reveal systematic curvature, changing spread, or a few observations that dominate the apparent fit. A residual pattern does not by itself identify the correct function, but it can show that a candidate misses structure. In this example, the additive predictions rise far above several high-weight observations; that is a visible reason to inspect its upper-range fit rather than relying on its simple interpretation alone.
For the illustrative spline, the unrounded residuals at 40, 55, 70, 85, 100, 115, and 130 kg are approximately 0.000095, −0.079055, 0.035, −0.050045, 0.014955, −0.020035, and −0.000380 L/h. Their squared sum is approximately \(0.0106044\;(\text{L/h})^2\). A small residual sum of squares is not, by itself, enough to justify a flexible function: additional flexibility can follow noise, and predictions may be unstable where data are sparse.
The main alternatives have different trade-offs. An additive function is simple and directly interpretable in parameter units, but its absolute slope is constant. Exponential and power functions preserve positivity when their scale parameter is positive and encode proportional changes, but each imposes a particular global shape. A spline can accommodate changing slopes without requiring one global curve shape, but its behavior depends on knot placement and boundary specification, and flexible versions may require more information to estimate reliably. Compare candidates using scientific plausibility, fit over the observed range, parameter uncertainty, and a suitable model-selection or validation strategy—not a single row or prediction.
- Check the scale and units. Confirm that the covariate is in the units used to define the coefficients and reference value. Changing kilograms to grams without changing the coefficient changes the model.
- Inspect the edges. Look for sparse observations or systematic residual patterns near the minimum and maximum covariate values, where functions can separate most sharply.
- Distinguish interpolation from extrapolation. A prediction between supported observations is not the same as a prediction outside their range; uncertainty and model dependence generally increase outside the data.
- Do not interpret all coefficients alike. The additive coefficient is an absolute slope, the exponential coefficient is a log-scale rate per covariate unit, and the power exponent is an elasticity.
Common mistake: “The functions predict nearly the same value at 70 kg, so they are interchangeable.” They share a reference prediction, not a shape. At 130 kg, the additive and power predictions differ by more than 1 L/h, and beyond the observed range their implications diverge further. Compare predictions and interpretations across the covariate range that matters.
Check Your Understanding
Answer each question, then check the brief solutions.
- What does the coefficient 0.0450 mean in the additive function, including its units?
- Using the exponential function, what is the predicted ratio of clearance at 100 kg to clearance at 70 kg?
- Why is the 145 kg spline prediction less secure than the 50 kg spline prediction?
- Name one diagnostic that could reveal a systematic lack of fit near the upper observed boundary.
Solutions. (1) It is the constant increase in predicted clearance per kilogram: 0.0450 L/h per kg. (2) The ratio is \(\exp\{0.00600(100-70)\}=\exp(0.180)\approx1.1972\), so the prediction is about 19.7% higher at 100 kg. (3) The 50 kg value is interpolation between observed-range knots, whereas 145 kg is beyond the largest observed weight and depends on extending the last segment without supporting data. (4) Plot residuals against weight, or plot observed values and fitted curves together; a systematic residual trend near the upper weights would signal a possible lack of fit.