Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: AUC start 0 (which also needs Feature: C0 imputation) #109

Closed
wants to merge 25 commits into from

Conversation

Gero1999
Copy link
Collaborator

@Gero1999 Gero1999 commented Nov 6, 2024

Issue

Closes #2 #60

Description

After running NCA, AUC calculations always consider the discrete start (start at where first concentration sample was collected). This can indeed alter slightly the real values of the AUC. This is a consequence of 2 problems:

  1. Doses times are being considered at the first measure, instead of at the real dose time
  2. No imputed measure at dose time is consdiered

Change description.

Definition of Done

C0 imputation option for the user specified in Setup > Data Selection

How to test

  • At "NCA">"NCA Results", when C0 is imputed it is expected that start=AFRLT-ARRLT (being AFRLT-ARRLT= 0 in DOSNO=1)
  • At "NCA">"NCA Results", when C0 is not imputed it is expected that start={time of 1st observation}
  • AUC values (auclast, aucinf...) from start=AFRLT-ARRLT are calculated when C0 is imputed
  • All variables that should only be based on observed data (cmax, tmax...) are not considering C0 imputations
  • Test that PKNCA also deals well with predoses as duplicates

Contributor checklist

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented

Notes to reviewer

Anything that the reviewer should know before tacking the pull request?

@Gero1999 Gero1999 marked this pull request as ready for review November 11, 2024 15:56
@Gero1999 Gero1999 requested a review from js3110 November 11, 2024 15:56
@Gero1999 Gero1999 marked this pull request as draft November 13, 2024 11:05
@Gero1999
Copy link
Collaborator Author

Detected a bug in pk.nca() when using ADOSEDUR = 0 in the dataset. I will work on it

@Gero1999 Gero1999 closed this Nov 13, 2024
@Gero1999 Gero1999 reopened this Nov 13, 2024
@js3110
Copy link
Collaborator

js3110 commented Nov 13, 2024

@Gero1999 I am getting a new error now when I run the IV Bolus data:

Warning: Values from `exclude` are not uniquely identified; output will contain list-cols.
• Use `values_fn = list` to suppress this warning.
• Use `values_fn = {summary_fun}` to summarise duplicates.
• Use the following dplyr code to identify duplicates.
  {data} |>
  dplyr::summarise(n = dplyr::n(), .by = c(STUDYID, PCSPEC, ANALYTE, USUBJID, DOSNO,
  PPTESTCD)) |>
  dplyr::filter(n > 1L)
Warning: Error in filter: ℹ In argument: `TIME >= (lambda.z.time.first + start) |
  is.na(lambda.z.time.first)`.
ℹ In group 1: `STUDYID = "XX01"`, `PCSPEC = "SERUM"`, `ANALYTE = "Analyte01"`,
  `USUBJID = 11101`, `DOSNO = 1`.
Caused by error in `lambda.z.time.first + start`:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants