Tutorials › Quantitative Systems Pharmacology (QSP) › Propagating Uncertainty Through Nonlinear Clinical Endpoints

Propagating Uncertainty to Clinical Predictions · Tutorial 720 of 799

Propagating Uncertainty Through Nonlinear Clinical Endpoints

You will learn to apply nonlinear endpoint definitions to each uncertain mechanistic trajectory before summarizing, and to identify when a mean trajectory gives a misleading result.

Advanced 10 min read

What You'll Learn

  • Define an endpoint as a transformation of an uncertain mechanistic trajectory.
  • Distinguish the mean of transformed outcomes from the endpoint of a mean trajectory.
  • Use curvature to explain the discrepancy for saturable endpoints.
  • Calculate threshold-excess and threshold-crossing endpoints from virtual trajectories.
  • Check endpoint assumptions, weights, crossing behavior, and numerical stability.
  • Choose between ensemble-based endpoint calculation and simpler approximations.

Why Endpoint Definitions Matter

A mechanistic model may predict a biomarker trajectory for each plausible parameter set or virtual patient. The clinical quantity of interest is often not a point on that trajectory itself. It may be a saturable change, an amount above a threshold, or the time at which a threshold is crossed. These endpoint definitions can be nonlinear: applying one to an average trajectory need not give the average endpoint.

This distinction matters whenever uncertainty is propagated from model inputs to a clinical prediction. The earlier material on mapping parameter ensembles to clinical predictions establishes the trajectory-to-prediction workflow; here the emphasis is on what happens when the final endpoint transformation is nonlinear. In calculations, preserve each joint parameter draw and its corresponding trajectory rather than combining values from unrelated draws.

Definition: Let \(\theta\) denote uncertain model inputs, and let \(x(t;\theta)\) be the resulting mechanistic trajectory. A clinical endpoint is a function \(Y=G[x(\cdot;\theta)]\) of that trajectory (and, when specified, other inputs such as dose or baseline). The endpoint distribution is obtained by applying \(G\) to each trajectory generated under the uncertainty model. In general, its mean \(E[Y]\) is not equal to \(G[E\{x(\cdot;\theta)\}]\), the endpoint calculated from the mean trajectory.

The expectation here is with respect to the chosen uncertainty distribution or weighted virtual population. Thus its interpretation depends on what those draws represent, such as parameter uncertainty, between-patient variability, or a deliberately combined source. The endpoint definition and the uncertainty represented by the ensemble should be stated before calculating a result.

Why Transforming and Averaging Do Not Usually Commute

Suppose an endpoint at a fixed time is \(Y=g(X)\), where \(X\) is the uncertain model-predicted state. If \(g\) is linear, then averaging and transforming commute: \(E[g(X)]=g(E[X])\). For a nonlinear \(g\), the values of \(X\) on different parts of the curve receive different transformations, so the mean generally changes.

For a smooth function near \(\mu=E[X]\), a Taylor expansion makes the role of curvature explicit. Write \(X=\mu+(X-\mu)\), and expand around \(\mu\):

$$ g(X)=g(\mu)+g'(\mu)(X-\mu)+\frac{1}{2}g''(\mu)(X-\mu)^2+R(X). $$

Taking expectations removes the first-order term because \(E[X-\mu]=0\). Since \(E[(X-\mu)^2]=\operatorname{Var}(X)\), this gives

$$ E[g(X)]=g(\mu)+\frac{1}{2}g''(\mu)\operatorname{Var}(X)+E[R(X)]. $$

When \(g\) is sufficiently smooth and the uncertainty is concentrated near \(\mu\), the remainder may be small, making the curvature term a useful explanation of the discrepancy. It is not a general substitute for transforming the ensemble: the approximation can fail for broad uncertainty, strong curvature, boundaries, or threshold discontinuities.

A related exact result is Jensen's inequality. If \(g\) is concave throughout the range of \(X\), then \(E[g(X)]\leq g(E[X])\); if \(g\) is convex throughout that range, then \(E[g(X)]\geq g(E[X])\). These inequalities require the relevant expectations to exist and the function to have the stated curvature over the values being averaged. They give a direction of discrepancy, not its size.

Worked Example: A Saturable Biomarker Endpoint

Suppose two equally weighted hypothetical virtual patients have biomarker changes \(X=2\) and \(X=8\) \(\mu\text{mol/L}\). Define the clinical endpoint as the saturable percent change \(g(X)=100X/(4+X)\), where the constant \(4\) has units \(\mu\text{mol/L}\). Calculate the average endpoint and compare it with the endpoint of the average biomarker change.

Transform each draw first. For the first virtual patient, \(g(2)=100(2)/(4+2)=33.33\%\). For the second, \(g(8)=100(8)/(4+8)=66.67\%\). Thus the mean endpoint is

$$ E[g(X)] = \frac{33.33\%+66.67\%}{2}=50.00\%. $$

Now transform the mean state. The mean biomarker change is \(\bar{x}=(2+8)/2=5\ \mu\text{mol/L}\), so \(g(\bar{x})=100(5)/(4+5)=55.56\%\). The results differ by \(5.56\) percentage points. The saturable function is concave for \(X>-4\), since \(g''(X)=-800/(X+4)^3<0\) over the two positive values and the interval between them. Jensen's inequality therefore predicts \(E[g(X)]\leq g(E[X])\), consistent with the calculation. These are hypothetical values; the difference arises from the endpoint's curvature, not from a change in the underlying ensemble.

Threshold-Defined Endpoints

Thresholds introduce a different form of nonlinearity. A threshold-excess endpoint records only the amount by which a state exceeds a clinically chosen level \(c\), for example \(g(X)=\max(0,X-c)\). This function is linear above \(c\), flat below \(c\), and has a kink at \(c\). Averaging the state can conceal how much of the ensemble lies on either side of the threshold.

For a threshold-crossing time, the endpoint is a property of the whole trajectory rather than a single state. A crossing time is well-defined as a unique number only when the specified crossing exists and is unique under the chosen rule. Non-monotone trajectories may cross repeatedly; a protocol must then say whether the endpoint is the first crossing, a sustained crossing, or something else. Trajectories that never cross need an explicit handling rule rather than an invented crossing time.

Worked Example: Threshold-Excess Magnitude

Consider two equally weighted hypothetical virtual patients with predicted biomarker states at a prespecified visit of \(0.8\) and \(1.2\ \text{mmol/L}\). Define the endpoint as excess above \(c=1.0\ \text{mmol/L}\): \(g(X)=\max(0,X-c)\). Compare the mean endpoint with the endpoint of the mean state.

For \(X=0.8\), \(g(0.8)=\max(0,0.8-1.0)=0\ \text{mmol/L}\). For \(X=1.2\), \(g(1.2)=\max(0,1.2-1.0)=0.2\ \text{mmol/L}\). Therefore,

$$ E[g(X)]=\frac{0+0.2}{2}=0.10\ \text{mmol/L}. $$

The mean state is \((0.8+1.2)/2=1.0\ \text{mmol/L}\), and its excess is \(g(1.0)=0\ \text{mmol/L}\). The two calculations disagree because the endpoint truncates values below the threshold rather than allowing them to offset values above it. The endpoint is convex, so the nonnegative mean excess is also consistent with Jensen's inequality.

Worked Example: Mean Crossing Time Versus Crossing of the Mean Trajectory

Suppose two equally weighted hypothetical trajectories are \(x(t;A)=A e^{-t/10}\), where \(x\) is in arbitrary concentration units, \(t\) is in days, and \(A\) is either \(2\) or \(8\) concentration units. Define the endpoint as the time at which the decreasing trajectory first reaches \(1\) concentration unit. Both trajectories start above the threshold, decrease monotonically, and cross it once.

Solving \(A e^{-t/10}=1\) gives \(t=10\ln(A)\) days. For \(A=2\), the crossing time is \(10\ln(2)=6.931\) days. For \(A=8\), it is \(10\ln(8)=20.794\) days. The mean of the individual crossing times is therefore

$$ \frac{6.931+20.794}{2}=13.863\ \text{days}. $$

The mean trajectory is \(\{2e^{-t/10}+8e^{-t/10}\}/2=5e^{-t/10}\). Its crossing time solves \(5e^{-t/10}=1\), so it is \(10\ln(5)=16.094\) days. Thus the crossing of the mean trajectory occurs \(2.231\) days later than the mean of the two crossing times. The crossing-time operation is nonlinear in \(A\); the mean trajectory answers a different question from the mean individual crossing time.

Practical Calculation and Diagnostics

For a virtual population or a parameter ensemble, the direct calculation is usually simple: calculate the endpoint from each matching trajectory, then summarize those endpoint values using the ensemble's intended weights. If the draws have weights \(w_i\) that sum to one, the weighted mean endpoint is \(\sum_i w_i G[x_i(\cdot)]\). This preserves the mapping between each parameter set, its trajectory, and its endpoint. Replacing that set of trajectories by a pointwise mean trajectory before applying a nonlinear endpoint changes the estimand.

Before interpreting the result, check the endpoint implementation and the trajectory behavior. Useful diagnostics include:

  • Verify definitions and units. Confirm threshold direction, strict versus inclusive comparison, baseline, visit time, and endpoint units. A threshold in one unit cannot be applied directly to a state in another.
  • Inspect values near thresholds and saturation regions. Small state changes near a kink can change a threshold endpoint abruptly, while values deep in a saturating region can contribute little additional change.
  • Check crossing existence and uniqueness. Plot representative trajectories and count crossings. If crossing times are not unique or some trajectories never cross, report that feature and apply a prespecified rule.
  • Check numerical resolution. Repeat interpolation or integration with a finer time grid where the endpoint depends on a crossing or trajectory integral. A coarse grid can shift crossing times or miss short-lived crossings.
  • Check weights and joint draws. Ensure that endpoint summaries use the intended virtual-population weights and that correlated inputs remain paired within each simulation. Independently recombining input values can create trajectories absent from the modeled joint distribution.

A discrepancy between \(E[G(x)]\) and \(G(E[x])\) is not by itself a model failure. It is expected for nonlinear endpoints. A more concerning sign is instability: for example, the estimated endpoint changes materially with a modest time-grid refinement, or the result depends on an undocumented rule for trajectories that fail to cross. In those cases, resolve the definition or numerical issue before interpreting the clinical prediction.

Choosing an Approach and Recognizing Its Limits

The appropriate calculation depends on the question. Direct transformation of each ensemble trajectory targets the mean or distribution of the defined endpoints. Applying the endpoint to a mean trajectory instead describes the endpoint of that mean curve; it may be useful when that is specifically the target, but it is not generally a shortcut for the mean patient-level endpoint. For a linear endpoint, such as a fixed weighted sum of states, averaging and transforming do commute, provided the same weights and integrable values are used. A local curvature approximation can explain a small discrepancy for a smooth endpoint, but threshold kinks and broad uncertainty favor direct calculation.

ApproachWhat it calculatesMain caution
Transform each trajectory, then summarizeSummary of the defined endpoint values across the ensembleRequires adequate ensemble coverage and a precise endpoint rule
Transform the mean trajectoryEndpoint of the pointwise mean trajectoryUsually differs from the mean endpoint when the transformation is nonlinear
Use a local curvature approximationAn approximate discrepancy near the mean stateMay be inaccurate for wide uncertainty, strong curvature, or thresholds

Direct transformation does not remove uncertainty or guarantee that the ensemble represents the intended population. It only applies the endpoint definition consistently to the supplied trajectories. Sparse sampling of important regions, uncertain threshold choices, model misspecification, and ambiguous handling of non-crossing trajectories remain limitations. The endpoint summary must therefore be read in the context of both its definition and the uncertainty represented by the input ensemble.

Key takeaway: For a nonlinear clinical endpoint, transform each appropriately weighted mechanistic trajectory before summarizing endpoint values. The endpoint of the mean trajectory is a different quantity unless the transformation is linear or special conditions make the two coincide.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. If \(X\) has mean \(10\) and \(g(x)=3x+2\), compare \(E[g(X)]\) with \(g(E[X])\). What property explains the result?
  2. A saturable endpoint is concave over the full range of a nonconstant \(X\). Which is larger, \(E[g(X)]\) or \(g(E[X])\)? State the condition on the function's range that matters.
  3. Two equally weighted biomarker predictions are \(3\) and \(7\ \text{mg/L}\), and the endpoint is excess above \(5\ \text{mg/L}\). Calculate the mean endpoint and the endpoint of the mean state.
  4. For a non-monotone trajectory that crosses a threshold three times, why is “the crossing time” not yet a fully defined endpoint?

Solutions. (1) Linearity gives \(E[3X+2]=3E[X]+2=3(10)+2=32\), and \(g(E[X])=3(10)+2=32\); the two commute. (2) Jensen's inequality gives \(E[g(X)]\leq g(E[X])\), provided the relevant expectations exist and \(g\) is concave throughout the range of \(X\). (3) The individual excesses are \(\max(0,3-5)=0\) and \(\max(0,7-5)=2\ \text{mg/L}\), so their mean is \(1\ \text{mg/L}\). The mean state is \(5\ \text{mg/L}\), whose excess is \(0\ \text{mg/L}\). (4) The endpoint rule must specify which crossing is intended, such as the first crossing or a crossing followed by sustained time on the specified side; otherwise different valid calculations produce different times.

Clinical Biostats