Skip to content

vpc_tte(rtte = TRUE, rtte_calc_diff = TRUE): event order is assigned after sorting gap times, so "order k" is the k-th shortest gap, not the k-th event - #130

Merged
roninsightrx merged 2 commits into
masterfrom
nightshift/127-vpc-tte-rtte-true-rtte-calc-diff-true
Nov 14, 2026
Merged

roninsightrx merged 2 commits into
masterfrom
nightshift/127-vpc-tte-rtte-true-rtte-calc-diff-true

Conversation

@roninsightrx

Copy link
Copy Markdown
Collaborator

Closes #127

format_vpc_input_data_tte() now numbers rtte events in time order per sim/id before computing gap times, with no re-sort afterwards (relative_times() removed); added regression tests, NEWS entry, and bumped version to 1.3.7.


🤖 Implemented by Claude Code and reviewed by Codex, orchestrated by nightshift. Review rounds are posted as comments below.

With rtte_calc_diff = TRUE, the event index was assigned after re-sorting
rows by gap time, so rtte = k was the k-th shortest gap rather than the
k-th event. Number events in time order per sim/id first, then take
differences without re-sorting. Remove the now-unused relative_times().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@roninsightrx roninsightrx left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Codex review, round 1: ✅ approved

Implementation correctly assigns RTTE indices in absolute event-time order before calculating gap times, with gaps grouped by simulation and subject. Tests are appropriate and the full suite passes: 602 passed, 0 failed (5 unrelated existing warnings).

@roninsightrx
roninsightrx marked this pull request as ready for review November 14, 2026 19:29
Resolve conflicts with #128: keep both NEWS entries and both tests.
Master already released 1.3.7, so this change moves to 1.3.8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@roninsightrx roninsightrx left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Codex review, round 2: ✅ approved

Implementation correctly assigns RTTE order from absolute event time before computing per-simulation, per-subject gaps. Regression coverage is appropriate. Focused tests passed 30/30; full suite passed 608/608 with five unrelated existing warnings.

@roninsightrx
roninsightrx merged commit aeba2e1 into master Nov 14, 2026
5 checks passed
@roninsightrx
roninsightrx deleted the nightshift/127-vpc-tte-rtte-true-rtte-calc-diff-true branch November 14, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vpc_tte(rtte = TRUE, rtte_calc_diff = TRUE): event order is assigned after sorting gap times, so "order k" is the k-th shortest gap, not the k-th event

1 participant