Tutorials › Pharmacometric Workflows and Reproducible Modeling › Computing Individual Exposure Metrics From Profiles

Simulation Pipelines · Tutorial 265 of 399

Computing Individual Exposure Metrics From Profiles

Learn to turn a simulated concentration–time profile into clearly defined individual exposure metrics, with calculation choices that can be reproduced and checked.

Advanced 11 min read

What You'll Learn

  • Calculate AUC over a specified time window using the linear trapezoidal rule.
  • Distinguish profile-based peak and trough values from extrema that a sparse grid may miss.
  • Interpolate profile values at analysis-window boundaries.
  • Calculate time above a threshold by locating within-interval crossing times.
  • Compare linear interpolation with log-linear and model-based alternatives.
  • Identify choices and diagnostics needed for reproducible individual metrics.

From a Simulated Profile to an Individual Metric

A simulated concentration–time profile is a set of values, not yet a unique summary of exposure. The area under the concentration–time curve depends on the interval being summarized and on how values between simulated times are handled. Time above a threshold also depends on an interpolation rule, because a profile usually crosses the threshold between recorded points. Peak and trough values depend on whether they mean extrema among simulated values or extrema of a continuous curve.

A reproducible calculation therefore starts by defining the individual profile, the analysis window, the concentration scale, and the interpolation or integration rule. This tutorial uses a piecewise-linear concentration profile as its default: adjacent simulated values are joined by straight lines. This choice is transparent and permits direct calculation of AUC and threshold-crossing times. It is a numerical convention, not a claim that the underlying pharmacokinetic trajectory is exactly linear between simulation times.

Definition: For individual \(i\), a simulated profile is a set of ordered pairs \((t_{ij},C_{ij})\), where \(t_{ij}\) is time and \(C_{ij}=C_i(t_{ij})\) is concentration. A piecewise-linear profile joins each adjacent pair with a straight line. An individual exposure metric is a summary computed from that profile over a stated time window, using explicitly specified rules for integration, extrema, or interpolation.

Assume the times are strictly increasing, all concentrations use the same units and definition, and the profile covers the requested window. The examples use nonnegative concentrations and time in hours. AUC then has units of concentration multiplied by hours, while peak and trough retain concentration units and time above threshold has time units. If the requested window extends beyond the simulated profile, these calculations alone do not justify extrapolating the profile.

AUC Under Piecewise-Linear Interpolation

For two adjacent points at times \(t_a\) and \(t_b\), with concentrations \(C_a\) and \(C_b\), the linear trapezoidal contribution to AUC is the interval width multiplied by the average of its endpoint concentrations. Summing those contributions gives the AUC across the profile. The concentrations need not increase or decrease monotonically.

$$ \operatorname{AUC}_{[t_0,t_m]} =\sum_{j=0}^{m-1}\frac{C_{ij}+C_{i,j+1}}{2}(t_{i,j+1}-t_{ij}) $$

This formula follows by integrating the straight line connecting the endpoints. On an interval of width \(\Delta t=t_b-t_a\), write \(C(t)=C_a+(C_b-C_a)(t-t_a)/\Delta t\). Integrating the constant term gives \(C_a\Delta t\); integrating the linear term gives \((C_b-C_a)\Delta t/2\). Their sum is \((C_a+C_b)\Delta t/2\), the trapezoid formula.

For a window whose boundary falls between simulated times, first calculate the concentration at that boundary using the same linear interpolation rule, then integrate only over the portion inside the window. This avoids silently including exposure outside the requested interval.

Worked Example: AUC, Peak, and Trough on a Simulated Profile

Suppose a hypothetical individual's concentrations are 0, 6, 3, and 1 mg/L at 0, 2, 5, and 8 hours, respectively. Calculate AUC from 0 to 8 hours and the profile-based peak and trough.

AUC. The three trapezoids contribute:

$$ \begin{aligned} \operatorname{AUC}_{[0,8]} &=\frac{0+6}{2}(2-0)+\frac{6+3}{2}(5-2)+\frac{3+1}{2}(8-5)\\ &=6+13.5+6\\ &=25.5\ \text{mg}\cdot\text{h}/\text{L}. \end{aligned} $$

The peak among the simulated values is 6 mg/L at 2 hours, and the trough among them is 1 mg/L at 8 hours. Because a straight line between two points cannot exceed both endpoint values or fall below both, these are also the extrema of the piecewise-linear profile on this window. They are not necessarily the extrema of the underlying continuous pharmacokinetic trajectory.

Peak, Trough, and Threshold-Crossing Time

For a specified window, the peak on the piecewise-linear profile is its maximum concentration and the trough is its minimum. With linear interpolation between knots, these values occur at simulated points or at window boundaries: a straight segment has no interior maximum or minimum beyond its endpoints. If the window cuts through an interval, include interpolated concentrations at both boundaries before taking the maximum or minimum.

Time above a threshold \(T\) is the total duration in the window for which \(C_i(t)>T\). On an interval that crosses \(T\), linear interpolation locates the crossing. If \(C_a<T<C_b\), the crossing time is found by solving the line equation for \(C(t)=T\). The descending case has the same expression and gives a time between \(t_a\) and \(t_b\).

$$ t_* = t_a+\frac{T-C_a}{C_b-C_a}(t_b-t_a) $$

For a rising segment, the time above threshold is from \(t_*\) to \(t_b\); for a falling segment, it is from \(t_a\) to \(t_*\). If both endpoints are above the threshold, the full interval contributes; if neither is above and there is no crossing, it contributes zero. A segment that only touches the threshold contributes no positive duration at that single instant. Summing interval contributions gives total time above threshold.

Worked Example: Time Above a Threshold With Multiple Crossings

A hypothetical profile has concentrations 1, 5, 2, 6, and 1 mg/L at times 0, 1, 3, 4, and 6 hours. Calculate time above 4 mg/L from 0 to 6 hours using linear interpolation.

The first rising segment crosses 4 mg/L between 0 and 1 hour: \(t_*=0+(4-1)/(5-1)(1-0)=0.75\) hours. The following fall, from 5 mg/L at 1 hour to 2 mg/L at 3 hours, crosses at \(1+(4-5)/(2-5)(3-1)=1.6667\) hours. Thus the first above-threshold duration is \(1.6667-0.75=0.9167\) hours.

The rise from 2 mg/L at 3 hours to 6 mg/L at 4 hours crosses at \(3+(4-2)/(6-2)(4-3)=3.5\) hours. The fall from 6 mg/L at 4 hours to 1 mg/L at 6 hours crosses at \(4+(4-6)/(1-6)(6-4)=4.8\) hours. This second above-threshold duration is \(4.8-3.5=1.3\) hours.

Adding the two separate intervals gives \(0.9167+1.3=2.217\) hours above 4 mg/L. The profile is not above threshold continuously, so using only its first and last crossing would give an incorrect duration.

Window Boundaries and Integration Choices

An analysis window need not coincide with simulated times. Suppose adjacent profile points are \((t_a,C_a)\) and \((t_b,C_b)\). For a boundary \(t\) between them, use \(C(t)=C_a+(C_b-C_a)(t-t_a)/(t_b-t_a)\). Insert that interpolated point as a boundary knot, then calculate AUC, peak, trough, or time above threshold only inside the requested window. This procedure also applies if a window boundary lies at an exact knot, in which case no interpolation is needed.

Worked Example: AUC and Extrema on a Window Inside the Profile

A hypothetical individual has concentrations 2, 8, 4, and 1 mg/L at 0, 1.5, 4, and 7 hours. Calculate AUC, peak, and trough from 1 to 5 hours using the piecewise-linear rule.

At 1 hour, interpolation between 0 and 1.5 hours gives \(2+(8-2)(1/1.5)=6\) mg/L. At 5 hours, interpolation between 4 and 7 hours gives \(4+(1-4)(1/3)=3\) mg/L.

The AUC from 1 to 1.5 hours is \((6+8)(0.5)/2=3.5\) mg·h/L. From 1.5 to 4 hours it is \((8+4)(2.5)/2=15\) mg·h/L. From 4 to 5 hours it is \((4+3)(1)/2=3.5\) mg·h/L. Therefore, AUC from 1 to 5 hours is \(3.5+15+3.5=22\) mg·h/L. The peak is 8 mg/L and the trough is 3 mg/L on this window.

Alternatives, Diagnostics, and Common Pitfalls

Linear trapezoidal integration is not the only defensible choice. A log-linear interval assumes concentration changes exponentially between positive endpoint concentrations; integrating that exponential gives a different area from the linear trapezoid. It is unsuitable when an endpoint is zero or negative without an additional, explicitly defined rule. A model-based calculation may integrate the model's continuous prediction directly, or use its dense output between requested times. These approaches can be preferable when that continuous prediction is the intended target, but they answer a different numerical question from integrating a piecewise-linear profile.

The selected method should match the purpose of the metric and be recorded with the result. In particular, specify the time window, profile source, concentration and time units, integration method, boundary interpolation rule, threshold comparison convention, and whether peak and trough refer to simulated knots or an interpolated/model-based curve. AUC from a residual-error-added profile can differ from AUC from the model-predicted concentration profile; do not switch between them without stating why.

Useful checks include verifying that times are strictly increasing, checking for missing or nonfinite values, confirming that the requested window is covered, and inspecting the profile near peaks, troughs, and threshold crossings. A coarse time grid can miss a brief peak or a short excursion above threshold. Refining the grid or evaluating the model at additional times can reveal this sensitivity, but does not remove the need to state the interpolation rule.

  • Wrong reasoning: “The maximum simulated concentration must be the true model peak.” Correction: It is the peak of the sampled profile; a peak between sample times can be missed. State whether the metric is grid-based, piecewise-linear, or model-based.
  • Wrong reasoning: “Time above threshold is the time from the first crossing to the last.” Correction: Profiles may cross repeatedly. Add the duration of each above-threshold interval.
  • Wrong reasoning: “The trapezoid rule gives an exact AUC for any profile.” Correction: It is exact for the chosen piecewise-linear interpolant, but can differ from the integral of the underlying continuous trajectory.
  • Wrong reasoning: “AUC over a window can use the nearest simulated points.” Correction: That changes the window. Interpolate at the stated boundaries and integrate only within them.
Key takeaway: An individual exposure metric is reproducible only when its window and numerical definition are explicit. For a piecewise-linear profile, use trapezoids for AUC, endpoint extrema for peak and trough, and interpolated crossing times for time above threshold.

Check Your Understanding

For each question, use piecewise-linear interpolation unless stated otherwise. Solutions are included below the questions.

  1. A profile has concentrations 2 and 6 mg/L at 0 and 2 hours. What is the AUC from 0 to 2 hours?
  2. For that same profile, when does concentration first reach 5 mg/L?
  3. A profile is 7 mg/L at 1 hour and 3 mg/L at 3 hours. How long is it above 5 mg/L on that interval?
  4. Why can the largest simulated concentration fail to equal the peak of the underlying continuous model profile?

Solutions. (1) AUC is \((2+6)(2-0)/2=8\) mg·h/L. (2) The crossing time is \(0+(5-2)/(6-2)(2-0)=1.5\) hours. (3) The downward crossing is \(1+(5-7)/(3-7)(3-1)=2\) hours, so the profile is above 5 mg/L from 1 to 2 hours, a duration of 1 hour. (4) The model may reach a higher value between simulated times; the sampled maximum summarizes only the observed grid values unless an interpolation or continuous-model rule is used.

Clinical Biostats