Additional table: Patients Remaining in Study
Closed this issue · 1 comments
rpodcast commented
rpodcast commented
Documenting the data processing logic I used to create the summary table:
- The example summary shared by FDA reviewers was derived from the labs data set (adlbc). I decided to use the adsl data set instead, as it offers a simple way of obtaining the patient disposition status as well as the visit number they left the treatment period (VISNUMEN).
- I created a simple (long-format) data frame that expands appropriate visit records for each patient's participation in the trial, up to the recorded visit number in VISNUMEN, which allows me to summarize the counts of patients who were present in each visit. Example output below:
USUBJID | TRT01P | VISNUMEN | VISITNUM | VALUE | VISIT |
---|---|---|---|---|---|
01-701-1015 | Placebo | 12 | 3 | 1 | Baseline |
01-701-1015 | Placebo | 12 | 4 | 1 | Week 2 |
01-701-1015 | Placebo | 12 | 5 | 1 | Week 4 |
01-701-1015 | Placebo | 12 | 7 | 1 | Week 6 |
01-701-1015 | Placebo | 12 | 8 | 1 | Week 8 |
01-701-1015 | Placebo | 12 | 9 | 1 | Week 12 |
01-701-1015 | Placebo | 12 | 10 | 1 | Week 16 |
01-701-1015 | Placebo | 12 | 11 | 1 | Week 20 |
01-701-1015 | Placebo | 12 | 12 | 1 | Week 24 |
01-701-1023 | Placebo | 5 | 3 | 1 | Baseline |
01-701-1023 | Placebo | 5 | 4 | 1 | Week 2 |
01-701-1023 | Placebo | 5 | 5 | 1 | Week 4 |
- The long data frame was then fed into a custom
{Tplyr}
table. The key step was to ensure the number of patients was based off of the "original" adsl data set and not this custom long-form version. Thankfully this was super easy to implement. I verified that the number of patients who completed week 24 matches Table 14-1.02 (Summary of End of Study Data) within the CDISC Pilot 1 CSR.