Open ccctingting opened 2 days ago
Hi @ccctingting, In this scenario, I feel you should specify the max_ne = 1
so that the first CR can be confirmed by the second CR as one NE is allowed between them.
derive_bor(data = adrs, ref_start_window = 28, ref_interval = 28, confirm = TRUE, max_ne = 1)
# A tibble: 1 × 8
USUBJID ADTC AVALC ADT TRTSDT PARAMCD PARAM AVAL
<chr> <chr> <chr> <date> <date> <chr> <chr> <dbl>
1 9 2020-02-01 CR 2020-02-01 2020-01-01 CBOR Confirmed Best Overall … 1
And regarding your suggestion, I think the current code has considered filtering the first observation, like the subsequent CR at least 28 days later. Or do you have an example data that I can check the code again?
Hi @kaigu1990 , my point is that the program focuses on first CR sequence, CR-NE-CR , it stops searching for the second CR. For instance, a CR-CR sequence from 2020-03-01 to 2020-04-01 should also be considered a confirmed CR.
In the code below,
keeping only the first record where the flag is 'TRUE' prevents the detection of subsequent CRs, such as in the following scenario, for new added subject 9, the BOR should be CR not PR