billdenney/pknca

How to handle the BQL data before constructing the Concentration data?

Slow-Walker66 opened this issue · 3 comments

according to the post "AUClast is not estimated #149", I have found that a way to deal with "NA" is replacing it with "0", but when my rawdata have BQL, if I replace them with "0", the AUC calculation results are lower than the results produced by WinNonLin, if not, the next process will be report error or warnings.
How could I properly deal with the BQL data before NCA calculate?
By the way, when dealing with multiple dose data, how to add complex dosing time to the dosing data ? Like twice a day, intervel time is 8h.

Thanks for your answer.
infusion.xlsx

Below is the code I used:

Load the INFUSION-PK concentration data

d_conc<- read_xlsx()%>%
mutate(ID=as.numeric(as.character(ID)),
Dose=as.numeric(case_when(ID == "1" ~ "0.334",ID == "2" ~ "0.348",
ID == "3" ~ "0.343")),
Time=as.numeric(Time))
d_conc$CONC[d_conc$CONC == "BQL"] <- 0
d_conc$CONC <- as.numeric(d_conc$CONC)
conc_obj <- PKNCAconc(d_conc,CONC~Time|ID)

Generate the dosing data

d_dose <- d_conc[d_conc$Time == 0,] %>%
select(ID,Time,Dose)
d_dose$Dose <- d_dose$Dose*10E6

dose_obj <- PKNCAdose(d_dose,Dose~Time|ID)

Combine the concentration and dosing information both to

automatically define the intervals for NCA calculation and provide

doses for calculations requiring dose.

intervals_manual <-
data.frame(start=0, end=c(24, Inf),
cmax=TRUE,
tmax=TRUE,
auclast=TRUE,
aucinf.obs=c(FALSE, TRUE))
data_obj <- PKNCAdata(conc_obj, dose_obj,
intervals=intervals_manual)

Calculate the NCA parameters

results_obj <- data.frame(pk.nca(data_obj))

WinNonLin results
this is winnonlin result

Can you please provide the exact WinNonlin settings that you're using? My best guess without the WinNonlin settings is that there may be a few different things going on here. (I don't have a copy of WinNonlin, so I cannot verify these.)

For the calculation differences:

  1. If you are providing your data with "BLQ" to WinNonlin, it may be removing those rows before calculation. That would be the same as setting them to NA with PKNCA.
  2. It looks like your data is an IV infusion, but based on the time-point of the first sample, it appears to be an IV bolus. PKNCA does not (yet) perform back-extrapolation to C0 and calculate the AUC with back-extrapolation. I am guessing your WinNonlin settings were to do that back-extrapolation (i.e. you likely chose an IV bolus dose). If that is the case, then the difference is expected because the requested calculations differ.

For your other questions:

  1. PKNCA warnings try to guide you to find the issues present in your data and should not be ignored. (If you think that you are seeing a warning or error that should be ignored, please let me know, and I will check it.) The warnings you are getting when you omit the BLQ data relate to the fact that there are no concentrations at time 0, and PKNCA does not back-extrapolate.
  2. The proper way to deal with BLQ data in PKNCA is to set it to 0.
  3. "By the way, when dealing with multiple dose data, how to add complex dosing time to the dosing data ? Like twice a day, interval time is 8h." You would do this by telling PKNCA about that dosing data as you performed the dosing. For example, this code tells PKNCA that dosing was performed at time 0 and 8 on days 1 and 2 for subjects 1, 2, and 3: data.frame(ID=rep(1:3, each=4), Time=rep(c(0, 8, 24, 32), 3), Dose=100)

I assume that the issue was a mismatch between PKNCA and WinNonlin settings as described above, therefore I'm closing the issue. If you're still having problems, please reopen the issue.