Tutorials › Pharmacometric Workflows and Reproducible Modeling › Occasion and Reset Markers

Data Specification and Dataset Preparation · Tutorial 25 of 399

Occasion and Reset Markers

You will learn to distinguish occasion labels from reset indicators, assign each from documented event history, and detect marker errors that could misrepresent model input.

Intermediate 12 min read

What You'll Learn

  • Distinguish a study occasion boundary from a reset of model history or state.
  • Assign occasion labels consistently within each subject’s event records.
  • Place reset indicators only where documented design and model intent support them.
  • Check boundary records against dose times, sample times, washouts, and reinitializations.
  • Identify common errors such as resetting at every occasion or treating a long gap as proof of washout.
  • Document marker conventions so dataset fields have an unambiguous meaning.

Why Occasion and Reset Markers Need Separate Meanings

A subject’s dosing and sampling records can span multiple study periods. A period might be a treatment occasion, a crossover period, or a documented reinitialization after a washout. Markers in the analysis dataset tell downstream software how records relate to those periods. If the markers are misplaced, a model may associate an observation with the wrong period, or it may carry prior history into a period that was intended to begin afresh.

An occasion marker identifies the study period to which an event record belongs. A reset marker identifies a documented point at which the analysis is intended to restart relevant model history or state. These concepts may coincide, but they are not synonyms. A new occasion can be analyzed while retaining a continuous state history; conversely, a reset can be needed without a change in the study’s occasion numbering.

Definition: For subject \(i\), an occasion label \(O_{ij}\) assigns event record \(j\) to a documented study period. A reset indicator \(R_{ij}\) marks a documented event or boundary at which the specified model history or state is reinitialized. The meaning and permitted values of both fields must be documented for the dataset and the target modeling system.

These markers supplement, rather than replace, the event records. Dose records, sample records, event types, and time conventions still determine what happened and when. The earlier material on dose-history reconstruction and predose samples supports checking whether each marker agrees with that history.

Define the Boundaries Before Coding

Start from the protocol, source records, and analysis plan. Identify what constitutes an occasion for the intended analysis: for example, a scheduled treatment period or a repeated administration period used to represent within-subject changes across periods. Then specify the start and end rules, including how events exactly at a boundary are assigned. Use the established convention for ordering simultaneous dose and sample events; do not resolve a boundary ambiguity merely by changing a marker.

For a subject whose documented occasions are nonoverlapping intervals, one useful representation is:

$$ O_{ij}=k \quad \text{when event } j \text{ for subject } i \text{ belongs to documented occasion } k. $$

This is a classification rule, not a claim that time alone determines the occasion. If a subject has gaps, unscheduled events, or overlapping records, resolve membership using the study documentation and event history. Do not infer a new occasion solely because many days have elapsed.

A reset requires an additional definition: what exactly is to be cleared or reinitialized? Depending on the modeling system and model, a reset may affect the accumulation of prior doses, the model’s dynamic state, or another explicitly specified history. Its coding is implementation-specific. It may be represented by a field on a boundary record or by a dedicated event record. The dataset documentation must say which convention is used and what record receives the marker.

Assign Markers and Check Their Placement

A reliable assignment begins with a subject-specific, chronologically ordered event history. Confirm the occasion for each dose and sample before assigning the reset flag. Apply boundary rules consistently to all records, including records without a measured concentration. A dose must not be assigned to one occasion while a sample attributable to that dosing period is accidentally assigned to another.

1
Specify the study meaning.
Record the occasion definition, boundary rules, reset rationale, and the model or software convention that interprets the reset field.
2
Reconstruct the event timeline.
For each subject, review dose, sample, and other relevant event records in time order, using the established rules for equal-time events.
3
Assign occasion labels.
Label each event from the documented period membership, not from row order, a population-wide counter, or an arbitrary time-gap threshold.
4
Place reset markers only when justified.
Mark the specified boundary record and verify that the intended reset behavior is supported by the study history and analysis plan.
5
Run consistency checks.
Compare marker transitions with period documentation, dose history, washout information, and sample attribution; investigate every unexplained transition.

The basic consistency condition is that each event has one unambiguous occasion assignment under the documented rules. For a reset field coded as 0/1, its intended meaning should also be explicit: for example, \(R_{ij}=1\) may mean “reset at this record,” not “this record belongs to a new occasion.” A reset value on every record, or a reset flag with no stated interpretation, is not a usable specification.

Worked Example: Assigning Occasions Across Two Documented Periods

Consider a hypothetical subject with two protocol-defined periods. Period 1 runs from study day 1 through day 7; Period 2 begins on day 15. The records are: dose at day 1, sample at day 2, final sample at day 7, dose at day 15, and sample at day 16. The study documentation assigns events on day 7 to Period 1 and events from day 15 onward to Period 2.

The occasion assignments are therefore \(O=1,1,1,2,2\), in record order. This follows directly from the documented boundaries: the day 7 sample remains in Period 1, while the day 15 dose begins Period 2. The elapsed interval from day 7 to day 15 is \(15-7=8\) days, but that subtraction does not itself establish either the occasion boundary or a pharmacologic washout.

Suppose the analysis plan specifies no model-state reset at the Period 2 start. The occasion labels change from 1 to 2 at the day 15 dose, but the reset indicator remains 0 on all records. If the target model instead requires a reset there, the reset marker is placed on the record specified by the model’s documented event convention. The occasion transition alone does not decide this.

The check is to compare the assignment with the period schedule and event history: all records through day 7 remain in Period 1; records beginning at day 15 are in Period 2; no event is silently omitted or assigned by row number. The reset choice is a separate, explicitly justified decision.

Occasion Boundaries, Washouts, and Resets

A washout is a study-design or treatment-history concept; a reset is a model-input instruction. A documented washout may motivate a reset, but it does not prove that all relevant drug or model state has vanished. Whether residual exposure is negligible depends on the drug, dosing history, washout duration, and model assumptions. Similarly, a model reset must not be used to disguise an unrecorded dose or uncertain sample attribution.

An occasion marker often supports period-specific modeling, including analyses that allow a subject’s typical parameter values to vary between occasions. It does not by itself impose a particular statistical model or guarantee that periods are comparable. A reset marker, by contrast, controls how history is treated at a boundary under a particular implementation. These fields answer different questions: which study period? and should specified model history restart here?

Worked Example: A Reset After a Documented Reinitialization

In a hypothetical study, a subject receives a dose on day 1 and has samples on days 1.5 and 2. The protocol documents discontinuation, a washout interval, and a reinitialization on day 20. The analysis plan says that the post-reinitialization segment is to be modeled independently, with the target software’s reset convention applied to the day 20 boundary record. All these records are assigned to occasion 1, because the analysis defines occasion as the entire study segment for this subject.

Under that definition, the occasion field remains \(O=1\) throughout. The reset field is 0 on the day 1, 1.5, and 2 records, and is marked on the day 20 boundary record according to the specified software convention. Thus, a reset can occur without a new occasion label.

The logic depends on the stated analysis definition and documented reinitialization; it cannot be inferred from the 18-day gap alone. If the study instead defines the post-reinitialization segment as a distinct occasion, the occasion label would change as well. The dataset specification must choose and document that definition rather than leaving the distinction to software defaults.

Audit the Markers Against the Event History

Marker validation should detect both coding errors and conflicts in the underlying study record. Useful checks include the following:

  • Within each subject, occasion labels follow the documented period order and do not change unexpectedly and then revert without a documented reason.
  • Every dose and sample has an occasion consistent with its date, period documentation, and dose attribution.
  • Every reset corresponds to a documented reset rationale and to the record type required by the model implementation.
  • Reset placement is not duplicated across several records at one boundary unless the specification explicitly requires that convention.
  • Records at the same timestamp follow the established event-ordering rule, especially when a dose or reset boundary coincides with sampling.
  • Missing or contradictory period information is flagged for resolution rather than filled by an arbitrary gap rule.

A useful audit table summarizes, by subject, the first and last event times in each occasion, occasion transitions, reset locations, and nearby dose and sample events. Review the event records around every transition, not just the marker column. A mechanically valid sequence of labels can still be wrong if the source history contradicts it.

Worked Example: Finding an Unsupported Marker Transition

A hypothetical subject has a dose on day 1, samples on days 1.5 and 3, and another documented dose on day 5. The dataset assigns occasion 1 to the first three records and occasion 2 to the day 5 dose. There is no protocol period boundary, washout, reinitialization, or analysis rule supporting a change on day 5.

The marker sequence changes at day 5, but the available history shows a continuing event timeline. The appropriate audit finding is not “the gap is too short” or “the day 5 record must be occasion 1 because it is the next dose.” It is that the occasion transition lacks documented support. The assignment should be checked against source records and the analysis definition.

If the records confirm a single occasion, revise the day 5 occasion to 1 and leave the reset indicator unset unless a separately documented reset applies. If documentation establishes a new occasion, retain occasion 2 and record that rationale. In either case, do not add a reset merely because the occasion label changes.

Common Pitfalls and Limits

  • Equating an occasion change with a reset. This can erase history when continuity is intended. Treat the fields independently and document both meanings.
  • Inferring washout from elapsed time alone. A long gap is not proof that residual drug or model state is irrelevant. Use documented design and model assumptions.
  • Using a global occasion counter across subjects. Occasion labels ordinarily describe within-subject periods; subject-specific labels should follow the agreed convention rather than continuing from the prior subject’s final number.
  • Marking only concentration rows. If the field applies to event records, dose and other relevant records need consistent assignments too.
  • Assuming a software-specific reset code is universal. Event codes and reset-field semantics vary by implementation. Confirm the target model’s input specification and verify the resulting interpretation.

Markers cannot repair missing dose records, uncertain event times, or ambiguous study-period documentation. They also do not establish that a statistical model’s assumptions are appropriate. Their value is narrower but essential: they provide reproducible, explicit instructions about period membership and model-history boundaries.

Key takeaway: Assign occasion labels from documented study-period definitions; assign reset markers from an explicit model-history rule. Validate each independently against the subject’s dose and sampling history, and document the software-specific convention used.

Check Your Understanding

Answer each question using the distinction between study-period membership and model-state reinitialization.

  1. A subject’s records move from occasion 1 to occasion 2 at a documented treatment-period boundary. Does that alone require a reset?
  2. A long gap appears between two dose records, but the protocol has no washout or reinitialization documentation. What should be done before assigning a reset?
  3. In a dataset, a subject has one occasion label throughout but a documented, analysis-specified reset at a reinitialization boundary. Is this logically inconsistent?
  4. Why should a sample on the same time as a boundary dose be checked using the established simultaneous-event ordering convention?

Solutions. (1) No. A new occasion and a reset are separate decisions; reset only if model intent and documentation require it. (2) Do not infer a reset from elapsed time alone; investigate the source history and analysis specification. (3) No. The occasion definition may span both segments while the model history is explicitly reset at the boundary. (4) The ordering rule determines which side of the boundary the sample and dose belong to; inconsistent ordering can create incorrect attribution or reset placement.

Clinical Biostats