Identify treatment restart after a minimum treatment-free interval
Source:R/OncReg.txlines.R
OR.txlines.restart.RdFor each patient (rows), scans treatment lines (columns) to identify the
earliest line whose start date occurs at least t_min time units after the
most recent prior stop date. Also computes the cumulative treatment duration
before the restart, the maximum stop reason before the restart (for example,
0 = stopped due to toxicity, 1 = stopped due to progressive disease), the
treatment-free interval, and the earliest progression date after the restart.
Arguments
- date_start
Numeric matrix of treatment start dates.
- date_stop
Numeric matrix of treatment stop dates.
- reason_stop
Numeric matrix encoding the reason the treatment stopped.
- date_prog
Numeric matrix of progression dates.
- t_min
Minimum treatment-free interval required to qualify as a restart. Default =
365.2425/2.
Value
Data frame with one row per patient and six columns:
- prev_time
Cumulative treatment duration before the restart.
- stop_reason
Maximum stopping reason code observed before the restart.
- interval_time
Interval between the latest stop and the restart.
- restart_line
Index of the treatment line where the restart occurs.
- restart_date
Start date of the restart line.
- reprog_date
Earliest progression date occurring after the restart.
If no restart satisfying t_min is found, interval_time, restart_line,
restart_date, and reprog_date are returned as NA, while prev_time
and stop_reason summarize the full observed treatment history.
See also
Other txlines:
OR.txlines.timeline(),
OR.txlines.truncate(),
OR.txlines.wide()