Why Relative-Time Resets Need Attention
A dataset may record time from the start of each visit or treatment period. This is useful for describing events within a period, but the clock may return to zero at the next period. A sample recorded at local time 2 hours in Period 2 therefore does not necessarily occur 2 hours after a sample recorded at local time 1 hour in Period 1. Those values refer to different clock origins.
Population pharmacokinetic data often need event times that preserve the chronology across a subject’s study. Combining reset local times without accounting for their origins can make a later sample appear earlier than an earlier one, or make unrelated events appear to occur at the same analysis time. The repair is not to add an arbitrary constant until the values look ordered. Each local clock must be connected to a common timeline by evidence, such as a reliable timestamp or a documented period-start time.
Map Each Local Clock With an Anchor
For subject \(i\) in period \(k\), write \(t_{ik}\) for a recorded local time. To map it, identify an anchor pair: the local time \(a_{ik}\) at a known point in that period, and the continuous time \(A_{ik}\) assigned to that same point. The mapping is
Here \(T_{ik}\) is the event’s continuous analysis time. The expression \(t_{ik}-a_{ik}\) is elapsed time relative to the local anchor; adding it to \(A_{ik}\) places the event on the common timeline. If the period clock starts at the anchor, then \(a_{ik}=0\), and the formula reduces to \(T_{ik}=A_{ik}+t_{ik}\).
This mapping assumes that local time is measured in a consistent unit and increases with elapsed time within its period. It also assumes the anchor really pairs the local and continuous representations of the same event or clock origin. If the local clock has an offset—for example, it starts at a visit-specific recording time rather than at period onset—then using zero as the anchor without verification shifts every mapped event by that offset.
A common way to determine \(A_{ik}\) is to use the period-start timestamp \(S_{ik}\) and a common study-origin timestamp \(S_{i0}\). After timestamps have been harmonized, including time zones where relevant, their difference gives the period start’s continuous coordinate:
When the local clock starts exactly at that period start, \(a_{ik}=0\). If instead a known timestamp corresponds to a nonzero local time, pair that local value with the timestamp’s continuous coordinate and use the general anchor formula. The earlier material on reconstructing elapsed time from visit timestamps provides the basis for calculating timestamp differences; the additional task here is to connect each reset clock to the same origin.
Worked Examples
Worked Example: Mapping a Period With a Nonzero Anchor
All values here are hypothetical. In Period 2, a reliable timestamp establishes that local time 6 hours corresponds to continuous time 54 hours. Events in that period are recorded at local times 0, 1, and 4 hours. Map them to continuous time.
The anchor pair is \(a_{i2}=6\) hours and \(A_{i2}=54\) hours. For local time 0 hours:
For local time 1 hour:
For local time 4 hours:
The mapped times are 48, 49, and 52 hours. In particular, the events at local times 1 and 4 hours remain 3 hours apart: \(52-49=3\) hours. The mapping preserves within-period intervals because subtracting the same anchor and adding the same continuous coordinate leaves differences unchanged.
Worked Example: Using Period-Start Timestamps
All values here are hypothetical. Let the study origin be Day 1 at 08:00. Period 1 begins at that origin. Period 2 begins at Day 8 at 08:00, and each period’s local clock starts at zero at its period start. Period 1 has events at local times 0, 24, and 108 hours; Period 2 has events at local times 0 and 2 hours. Map the events.
The Period 1 start is at the common origin, so \(A_{i1}=0\) hours. Its mapped times are \(0+0=0\), \(0+24=24\), and \(0+108=108\) hours.
Period 2 starts seven days after the common origin. Since \(7\times24=168\) hours, its anchor is \(a_{i2}=0\) hours and \(A_{i2}=168\) hours. The mapped events are
The resulting sequence is 0, 24, 108, 168, and 170 hours. It is chronological, and the gap between the last listed Period 1 event and the first Period 2 event is 60 hours. That gap follows from the stated hypothetical times; it is not inferred from the local times alone.
Worked Example: Changing the Common Origin Correctly
All values here are hypothetical. Use the Period 2 anchor \(a_{i2}=6\) hours and \(A_{i2}=54\) hours. An event is recorded at local time 5 hours. First map it using the original origin. Then shift the common origin forward to the point that was formerly continuous time 60 hours.
With the original origin, the event maps to
Under the shifted origin, every continuous coordinate must be reduced by 60 hours. The anchor’s new coordinate is \(A'_{i2}=54-60=-6\) hours, not 60 hours. The event therefore maps to
This negative value is consistent with the shifted origin: the event occurred 7 hours before the point chosen as zero. If the anchor were instead assigned continuous time 60 hours, the event would map to \(60+(5-6)=59\) hours, but that would be a different anchor pairing, not merely a change of origin.
Why the Mapping Preserves Intervals
For two events \(r\) and \(s\) in the same period, apply the mapping formula to each, using the same anchor pair. Their continuous-time difference is
The anchor terms cancel, so the elapsed interval is unchanged. This is why one verified anchor per local clock is sufficient to translate all its times, provided the local clock is internally consistent. It does not establish the gap between periods on its own: that requires knowing how the periods’ anchors relate on the common timeline.
Quality Checks and Failure Modes
After mapping, check both the arithmetic and the provenance of the anchor. A mapped timeline should agree with known timestamps and documented period order. A failure can reveal an incorrect anchor, a local-time offset, a unit mismatch, a transcription error, or a genuine chronology that differs from the assumed sequence. Do not resolve the discrepancy by silently changing times.
- Negative mapped times: Check whether the common origin was chosen later than some events, whether the anchor coordinate was transformed correctly, and whether local and continuous units match. A negative value can be valid under a chosen origin; if the convention requires nonnegative analysis times, choose an origin at or before the earliest relevant event and recompute all coordinates consistently.
- Duplicate mapped times: Determine whether the records represent genuinely simultaneous events, distinct event types at the same time, or a mapping error. Equal times are not automatically duplicates to delete. Preserve event identity and any required event ordering. If different periods unexpectedly overlap, verify the anchors and period timestamps before changing either time.
- Nonmonotone times within a period: Sorting mapped records can order their display, but it cannot repair a local clock that runs backward or a wrongly assigned local time. Compare the records with source timestamps and investigate the discrepancy.
- Unexpectedly large gaps or overlaps: Recheck the period-start timestamps, time zones, elapsed-time units, and whether the local clock starts at the period onset. Confirm that the events belong to the stated subject and period.
- Missing period-origin information: If two reset clocks have no known relationship, their local times do not reveal the true gap between them. Flag the unresolved relationship and seek source data or a documented convention; do not assume that one period immediately follows another.
A useful audit retains the raw local time, period identifier, anchor used, mapped time, units, and a record of any correction. This makes it possible to trace a surprising value back to the clock and evidence that produced it. It also prevents a common data-cleaning error: overwriting source values with adjusted times and losing the information needed to review the adjustment.
Choosing an Approach and Knowing Its Limits
| Approach | What it establishes | Main limitation |
|---|---|---|
| Anchor-based mapping to a common origin | Continuous times, when each clock has a reliable anchor on that timeline | Cannot supply an unknown interval between periods |
| Keep local time with a period identifier | Within-period timing while explicitly retaining the clock identity | Does not by itself provide cross-period elapsed time |
| Concatenate periods by adding their durations | A constructed sequence under a specified concatenation convention | May discard real gaps or imply elapsed time that did not occur |
A local-time-plus-period representation can be preferable when the scientific record does not establish actual elapsed time between periods. Concatenation may be appropriate only when a documented analysis convention intentionally defines time that way. Neither alternative should be mistaken for reconstruction of actual continuous elapsed time.
Even a correct mapping cannot recover missing timestamps, settle contradictory source records, or determine what the study intended when its timing convention is undocumented. It also does not decide how simultaneous dose and sample records should be ordered; that is a separate event-ordering decision. The mapping’s role is narrower: place each verified local clock on a common time scale without changing intervals or concealing uncertainty.
Common Mistake
Wrong reasoning: “Period 2 restarts at zero, so I will add the largest Period 1 time to every Period 2 time. That makes the sequence nonnegative and avoids overlap.”
This may place the records in an attractive order, but the largest observed time in Period 1 is not necessarily the start of Period 2. The periods may be separated by a gap, overlap in calendar time, or have incomplete observations. Adding that maximum can therefore invent a cross-period interval. The correction is to use a supported anchor pair for each clock. If no anchor supports the relationship, retain the period distinction and mark the continuous relationship as unresolved rather than fabricating it.
Check Your Understanding
Answer each question using the mapping principles above. All values are hypothetical.
- A local clock has an anchor pair \(a=2\) hours and \(A=30\) hours. What continuous time corresponds to local time 7 hours?
- Two events in one period have local times 3 and 8 hours. How far apart are they after mapping with the same anchor?
- A new period’s local clock starts at zero, but no timestamp or documented relationship to the earlier period is available. Can its continuous start time be calculated from the local times alone?
- An event maps to \(-4\) hours after the common origin is shifted. Does that alone prove the mapping is wrong?
- Two records map to the same continuous time but have different event types. Should one automatically be deleted?
Solutions. For Question 1, \(T=30+(7-2)=35\) hours. For Question 2, the mapped separation remains \(8-3=5\) hours, since the common anchor terms cancel. For Question 3, no: the local clock gives within-period elapsed time, not its position relative to the earlier period. For Question 4, no: it may mean the event precedes the chosen origin; check the origin and anchor coordinates, and shift the origin consistently if nonnegative times are required. For Question 5, no: the records may be simultaneous events that both need to remain. Review their identities and required event ordering rather than deleting one solely because their times match.