Skip to content

Conversation

@billdenney
Copy link
Member

Fix #367

@billdenney
Copy link
Member Author

This is made obsolete by

test_that("pk.nca can be run for each parameter independently (#473)", {
d_conc <- Theoph[Theoph$Subject %in% "1", ]
d_conc <- rbind(d_conc, mutate(d_conc, Time = Time + 25))
d_conc$volume <- 1
d_conc$duration <- 1
d_dose <- data.frame(Subject = "1", Time = c(0, 25), Dose = 5, duration = 1)
o_conc <- PKNCAconc(d_conc, formula = conc~Time|Subject, volume = "volume", duration = "duration")
o_dose <- PKNCAdose(d_dose, formula = Dose~Time|Subject, route = "intravascular", duration = "duration")
non_pknca_covered_params <- c(
"f", "time_above", "mrt.md.obs", "mrt.md.pred", "sparse_auclast", "sparse_auc_se", "sparse_auc_df",
"vss.md.obs", "vss.md.pred", "ceoi"
)
all_params <- setdiff(names(get.interval.cols()), c("start", "end", non_pknca_covered_params))
intervals <- data.frame(start = c(0, 25), end = c(25, Inf))
for (param in all_params){
intervals_with_param <- intervals
intervals_with_param[[param]] <- TRUE
o_data <- PKNCAdata(o_conc, o_dose, intervals = intervals_with_param)
expect_no_error(param_res <- pk.nca(o_data))
expect_false(
all(is.na(param_res$result$PPORRES)),
info = paste0("Parameter ", param, " can be calculated independently")
)
}
})

@billdenney billdenney closed this Dec 10, 2025
@billdenney billdenney deleted the 367-missing-value-imputed-for-time branch December 10, 2025 02:38
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.

Missing value imputed for time

2 participants