Computes the best RECIST response per subject based on target lesion sum and response categories.
Ties are resolved using lesion sum, then by date.
Arguments
- data_recist
A dataset containing longitudinal RECIST data in long format.
- ...
Not used. Ensures that only named arguments are passed.
- cols
a vector with column names inside
calc_best_response()subjidThe column containing the subject ID. Default is"SUBJID".rc_sumThe column containing the sum of target lesions. Default is"RCTLSUM".rc_dateThe column containing the assessment date. Default is"RCDT".rc_respThe column containing the RECIST response (e.g.,"CR","PR","SD","PD"). Default is"RCRESP".
- warnings
Logical; if
TRUE(default is taken fromgetOption("grstat_best_resp_warnings", TRUE)), emits warnings during internal checks.- confirmed
Logical; if
TRUE, use the cofirmation method to determine the best response. For CR & PR confirmation of response had to be be demonstrated with an assessment 4 weeks or later from the initial response for response.- cycle_length
Numeric, Time between two cycle (used for confirmation), default = 28 days following PharmaSUG 2023 – Paper QT047 recommendation
- use_pharmasug
Logical, if
TRUE, the confirmation of response will be defnied following PharmaSUG 2023 – Paper QT047 recommendation. Default is RECIST 1.1 guideline
Value
A tibble with one row per subject, containing:
subjid: Subject IDbest_response: The best RECIST response observed before progressiondate: The date corresponding to the best responsetarget_sum: Sum of target lesions at that datetarget_sum_diff_first: Relative difference in target sum compared to baselinetarget_sum_diff_min: Relative difference in target sum compared to the minimum observed
Details
The function identifies the best response using the following logic:
Responses are ordered:
CR>PR>SD>PD>MissingAmong the best responses the earliest assessment date is selected. For a confirmed response, the earliest date of the confirmed response will be selected
Only subjects with at least two assessments and non-missing target sum are considered
Examples
db = grstat_example()
db$recist %>%
calc_best_response()
#> Warning: Target Lesions Length Sum is missing at baseline. (2 patients: #72 and #193)
#> # A tibble: 200 × 7
#> subjid best_response date target_sum target_sum_diff_first
#> * <int> <fct> <date> <dbl> <dbl>
#> 1 1 Complete response 2023-04-16 0 -1
#> 2 2 Progressive disease 2023-04-23 40.6 1.33
#> 3 3 Stable disease 2023-05-13 79 0.122
#> 4 4 Complete response 2023-05-17 0 -1
#> 5 5 Complete response 2023-07-05 0 -1
#> 6 6 Complete response 2023-08-31 0 -1
#> 7 7 Partial response 2023-09-16 50.5 -0.512
#> 8 8 Partial response 2023-08-05 20.3 -0.398
#> 9 9 Partial response 2023-09-03 16 -0.310
#> 10 10 Complete response 2024-01-11 0 -1
#> # ℹ 190 more rows
#> # ℹ 2 more variables: target_sum_diff_min <dbl>, six_months_confirmation <lgl>