insightsengineering/random.cdisc.data

Fix `adab` dataset

Closed this issue · 4 comments

Feature description

The latest update to adab leaves the dataset with all values of NRELTM1 = 0.
This was caused by this line in the previous update, which greatly reduces the size of ADPC within the radab function before it can be used to generate ADAB. The consequence of this is that several TLG-C PK templates are no longer displaying the desired output.

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

@legrasv can you take a look at this? Ideally we would be able to remove this line but I don't know what impact this would have on the data since your refactoring of adab.

Causing pipeline failure in TLG-C.

@edelarua I think this is correct as for ADAB, we only need the ADA values at Day 1, Week 4, Week 8 etc.

When creating ADAB, please add duration = 9 * 7 in ADPC, so that it takes more values in ADPC.
#' ADSL <- radsl(N = 10, seed = 1, study_duration = 2)
#' ADPC <- radpc(ADSL, seed = 2, duration = 9 * 7)
#' ADAB <- radab(ADSL, ADPC, seed = 2)

I think the scda does not contains the long duration, that's why. But anyway, I have to make a small change on ADAB regarding the column ASMED and ISTPT, so I will have to refine again ADAB.

image

  • add

ADPC <- ADPC %>% dplyr::filter((.data$PCTPTNUM %% (4 * 7 * 24)) == 0, ASMED == "PLASMA") # nolint
ISTPT = ifelse(VISIT %in% c("Day 1", "Week 4", "Week 8", "Week 12", "Week 16", "Week 20"), "Predose", "")