Skip to content

Feature request, change BLQ behavior: global imputations (BLQ, NA) happening after individual impute actions #456

@Gero1999

Description

@Gero1999

As discussed partly in #447 we would like to consider the possibility of doing all global imputations (missing concentration, BLQ values) before the individual interval imputations specified by the user in the impute column (i.e, start_conc0, start_predose...).

The reason is the problem that a user can experience when using the imputation column and the BLQ options:

Context: I am doing a start_conc0 imputation in my extravascular study, but if simultaneously I decide to drop all my BLQ values then the App won't run. It seems like the imputed concentration is also being droped

library(PKNCA)
conc_data <- data.frame(
    conc = c(1, 2.5, 2, 1, 0.7, 0.5, 0),
    time = 1:7,
    subject = 1
)

dose_data <- data.frame(
    dose = 100,
    time = 0,
    subject = 1,
    route = "Extravascular"
)

# Create PKNCA objects without BLQ cleaning
o_conc <- PKNCAconc(conc_data, conc ~ time | subject)
o_dose <- PKNCAdose(dose_data, dose ~ time | subject, route = "route")
o_data <- PKNCAdata(o_conc, o_dose)
o_data$intervals$impute <- "start_conc0"
o_nca <- pk.nca(o_data)
o_nca$result

# Create PKNCA objects with BLQ cleaning
o_data2 <- o_data
o_data2$options$conc.blq <- list(
    first = "drop",
    middle = "drop",
    last = "drop"
)
# Won't run: Requesting an AUC range starting (0) before the first measurement
# BLQ cleaning seems to happen after start_impute, so it doesn't work!
o_nca2 <- pk.nca(o_data2)

Before merging/implementing we need to make sure it does not break the main PKNCA workflow in anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions