Tutorials › Nonlinear Mixed-Effects Models (NLME) › Ordering Dose and Observation Events at Shared Times

Time-Varying Covariates and Dosing Complexity · Tutorial 403 of 797

Ordering Dose and Observation Events at Shared Times

You will learn how explicit pre-dose and post-dose ordering determines the predicted concentration at a shared timestamp, and how to encode and check that ordering.

Advanced 11 min read

What You'll Learn

  • Define pre-dose and post-dose concentration as the limits immediately before and after a bolus event.
  • Calculate the concentration jump caused by an intravenous bolus and the subsequent elimination between events.
  • Represent dose and observation records at the same time with an explicit event-order convention.
  • Compare explicit ordering with default conventions and artificial timestamp shifts.
  • Diagnose ambiguous or inconsistent event records using limiting predictions and units.
  • Apply the conventions to hypothetical dose histories and calculate predictions at sample times.

Why Event Order Matters

A concentration sample and an intravenous bolus can carry the same recorded time. That timestamp alone does not say whether the sample was collected just before the dose or just after it. For a bolus, this distinction is consequential: in the usual pharmacokinetic idealization, the dose produces an instantaneous jump in concentration. A prediction immediately before administration can therefore differ from the prediction immediately after administration, even though both refer to the same clock time.

The data need to preserve that distinction. A model may calculate the right dose and use the right sample time yet predict the wrong concentration if the sample is ordered on the wrong side of the dose. The convention is part of the event history, not a small numerical detail.

Definition: Let \(C(t)\) denote the concentration trajectory around an intravenous bolus at time \(t\). The pre-dose concentration, \(C(t^-)\), is the limit immediately before the dose, \(\lim_{s\uparrow t}C(s)\). The post-dose concentration, \(C(t^+)\), is the limit immediately after the dose, \(\lim_{s\downarrow t}C(s)\). For a bolus of amount \(D\) into a well-mixed compartment of volume \(V\), with no other instantaneous change at that time, \(C(t^+)=C(t^-)+D/V\).

The superscripts minus and plus describe which side of the event is intended; they do not mean subtraction or addition of an arbitrary amount of time. In an event record, a sample at \(t\) must be interpreted as a pre-dose observation or a post-dose observation. When the protocol does not establish its order, the timestamp is insufficient to select one prediction.

Bolus Jump and Between-Event Prediction

For a simple one-compartment model with first-order elimination, let \(CL\) be clearance and \(V\) be volume. Between instantaneous inputs, concentration declines at rate \(k=CL/V\). For an individual with fixed \(CL\) and \(V\) over the interval, the concentration after an event at \(t_1\) and just before a later event at \(t_2\) is

$$ C(t_2^-)=C(t_1^+)\exp\left(-\frac{CL}{V}(t_2-t_1)\right), \qquad t_2>t_1. $$

The formula assumes no intervening dose or other input, and constant individual parameters over the interval. At a bolus time, the mass balance is different from the between-event decay: the dose increases the amount in the compartment instantaneously. Since amount equals concentration times volume, \(VC(t^+)=VC(t^-)+D\). Dividing by \(V\) gives the concentration jump.

In an NLME model, individual values of \(CL\) and \(V\) determine each individual's jump and subsequent trajectory. The event-order rule itself is unchanged: first select the appropriate side of the dose for the observation, then evaluate the model prediction on that side. The observation model is applied to that prediction, not to an unspecified concentration “at” the event.

Worked Example: A Sample Just Before or Just After a Bolus

Hypothetical data. Immediately before a 150 mg intravenous bolus, the predicted concentration is 1.8 mg/L. The individual’s volume is 25 L. Calculate the pre-dose and post-dose predictions at the shared time.

The pre-dose prediction is given as \(C(t^-)=1.8\) mg/L. Under the bolus model, the concentration increment is

$$ \frac{D}{V}=\frac{150\ \mathrm{mg}}{25\ \mathrm{L}}=6.0\ \mathrm{mg/L}. $$

Therefore,

$$ C(t^+)=C(t^-)+\frac{D}{V} =1.8+6.0=7.8\ \mathrm{mg/L}. $$

A sample ordered before the administration is compared with a prediction of 1.8 mg/L; a sample ordered after it is compared with 7.8 mg/L. The dose and sample have the same clock time in either case, but the event order changes the predicted concentration by 6.0 mg/L.

Encoding Events at a Shared Time

An event-based record should distinguish an observation from a dose and preserve their within-time order. A practical representation includes the subject, time, event type, dose amount where relevant, and an ordering or convention that says whether a tied observation precedes or follows the dose. The same timestamp can be retained for both records. The order must come from the dosing and sampling information or a clearly stated modeling convention; it should not be inferred merely from which row happens to appear first in a file.

A useful implementation procedure is:

1
Identify all events at the time.
Separate dose records from observation records, and check whether there are multiple boluses or other instantaneous events.
2
Specify the sample's position.
Use the known protocol or collection sequence to label the observation pre-dose or post-dose. If the order is unknown, flag the ambiguity rather than silently choosing a side.
3
Apply the event transition.
For a pre-dose sample, evaluate the state before the bolus jump. For a post-dose sample, apply the jump first and evaluate the state after it.
4
Check the trajectory.
Confirm that the predicted change across the bolus is \(D/V\) and that elapsed-time decay is applied only over positive intervals between events.

If a dataset format uses row order to resolve tied times, that behavior must be verified rather than assumed. Different software or data-processing steps may use different tie rules. An explicit event-order label or documented convention is more reliable than an undocumented dependence on row order.

Worked Example: Decay from a Post-Dose State

Hypothetical data. A subject's predicted concentration immediately after a bolus at time 0 h is 12 mg/L. Over the next 3 h, assume a one-compartment model with \(CL/V=0.15\ \mathrm{h}^{-1}\), no further dose, and constant parameters. Find the concentration immediately before a sample at 3 h, where no dose occurs at that time.

The elapsed time is \(3-0=3\) h. Using the between-event equation,

$$ C(3^-)=12\exp[-0.15(3)] =12\exp(-0.45) \approx 12(0.637628)=7.652\ \mathrm{mg/L}. $$

Because no bolus occurs at 3 h, the left- and right-side concentration limits there are equal under this model. The prediction is approximately 7.652 mg/L. The exponent is dimensionless because \(\mathrm{h}^{-1}\) is multiplied by hours.

Several Events at One Timestamp

When more than one bolus and a sample share a time, each event needs a position in the sequence. For boluses into the same compartment, the total concentration immediately after all of them is determined by their summed amount, regardless of the order in which the boluses are applied. But a sample inserted between the boluses can have a different prediction from a sample placed before all or after all of them.

Worked Example: A Sample Between Two Same-Time Boluses

Hypothetical data. Immediately before time 5 h, the predicted concentration is 2.5 mg/L in a compartment with \(V=20\) L. Two intravenous boluses, 60 mg and 40 mg, are both recorded at 5 h. The collection sequence establishes that a sample is taken after the 60 mg bolus but before the 40 mg bolus. Calculate the sample prediction and the concentration after both doses.

The first bolus produces an increment of

$$ \frac{60\ \mathrm{mg}}{20\ \mathrm{L}}=3.0\ \mathrm{mg/L}. $$

Thus the sample, which follows that bolus, has predicted concentration

$$ C_{\mathrm{sample}}=2.5+3.0=5.5\ \mathrm{mg/L}. $$

The second bolus adds \(40/20=2.0\) mg/L. Immediately after both boluses, the concentration is \(5.5+2.0=7.5\) mg/L. If the sample had instead been ordered before both boluses, its prediction would be 2.5 mg/L; if it followed both, its prediction would be 7.5 mg/L. A single timestamp cannot distinguish these possibilities.

Conventions, Diagnostics, and Limitations

Two common conventions are to treat a tied sample as pre-dose or to treat it as post-dose. Either can be appropriate when it matches the study protocol, but neither is universally correct. A pre-dose convention is often suitable for a sample explicitly collected before administration; a post-dose convention is suitable for a sample collected after administration. If a sample is genuinely simultaneous only in the resolution of the recorded clock, the actual collection sequence or a defensible protocol convention is needed.

ApproachWhat it meansMain limitation
Explicit event orderRetain the common timestamp and label the observation as before or after the dose.Requires reliable protocol or collection-sequence information.
One documented tie conventionResolve all tied observations using a declared pre-dose or post-dose rule.Can misrepresent records whose actual order differs from the rule.
Artificially shift a timestampMove the sample by a small amount to force it before or after the dose.Creates a nonzero interval and can make predictions depend on the chosen shift or numerical tolerances.

A shift such as replacing a sample time \(t\) by \(t-\epsilon\) or \(t+\epsilon\) may seem to encode order, but it changes the time history. With elimination, a nonzero interval can change the prediction; with complex event handling, it can also alter which records are treated as simultaneous. Retaining the true timestamp with an explicit event-order label is preferable.

Useful checks include examining tied dose and observation records before fitting, confirming that the implementation uses the intended tie rule, and comparing the model state immediately before and after each bolus. For a single bolus under the stated assumptions, the check is \(C(t^+)-C(t^-)=D/V\). If a tied observation's prediction changes when unrelated file row order changes, event ordering is not being controlled adequately.

This convention does not resolve uncertainty about the actual sampling time, dose amount, or whether the dose was a true intravenous bolus. Nor does a simple \(D/V\) jump apply unchanged to an input delivered over time, such as an infusion. The appropriate event representation must match the administration process. When the order of an observed sample cannot be established, sensitivity to plausible pre-dose and post-dose interpretations can be reported; selecting one without justification hides a data limitation.

Common Mistake

Wrong reasoning: “The sample and bolus have the same recorded time, so the model can use one concentration value at that time; alternatively, I can move the sample by a tiny amount to make the ordering clear.”

Correction: A bolus trajectory has two limiting concentrations at its event time. The sample's event order determines whether the relevant prediction is \(C(t^-)\) or \(C(t^+)\), and the two differ by \(D/V\). An artificial shift creates a nonzero interval and may change the prediction or make it depend on the chosen shift. Preserve the timestamp and encode or document the order.

Key takeaway: A bolus dose and a sample at the same clock time are not fully specified by their timestamps. Record whether the sample is pre-dose or post-dose, apply the bolus jump on the correct side, and verify the resulting predictions.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A 120 mg bolus is given to a subject with \(V=30\) L. The pre-dose prediction is 0.9 mg/L. What are the pre-dose and post-dose predictions?
  2. Why is the sample time alone insufficient to select a prediction when a sample and bolus have the same timestamp?
  3. A post-dose prediction is 12 mg/L. With \(CL/V=0.15\ \mathrm{h}^{-1}\), what is the predicted concentration 3 h later, assuming no intervening dose?
  4. What is one problem with shifting a tied sample timestamp by a small positive or negative amount?

Solutions. (1) The jump is \(120/30=4.0\) mg/L, so the pre-dose prediction is 0.9 mg/L and the post-dose prediction is \(0.9+4.0=4.9\) mg/L. (2) A bolus creates different states immediately before and after administration; the sample's order must be known to choose \(C(t^-)\) or \(C(t^+)\). (3) The elapsed time is 3 h, so \(12\exp[-0.15(3)]=12\exp(-0.45)\approx 12(0.637628)=7.652\) mg/L. (4) The artificial shift creates a nonzero interval and can make predictions depend on the chosen shift or numerical tolerances; retaining the true timestamp with an explicit event-order label is preferable.