InsightRX / mipdtrial

Tools for simulating model-informed precision dosing trials
https://insightrx.github.io/mipdtrial/
Other
2 stars 0 forks source link
mipd pharmacokinetics pharmacometrics

mipdtrial

The goal of mipdtrial is to make it easy to simulate pharmacokinetic/ pharmacodynamic (PK/PD) endpoints in response to dose adaptation.

Existing tools are cumbersome to use for this purpose. For example, tools like NONMEM are optimized for model development, and assume fixed regimens when used for simulation. Other algorithms, like sample optimization simulations, optimize for information gain and not for attainment of clinically relevant metrics, such as AUC target attainment. mipdtrial fills in this niche by helping users simulate PK/PD resulting from dose adaptations informed by past PK/PD readouts.

Here are some example sorts of questions:

Installation

You can install the development version of mipdtrial from GitHub with:

# install.packages("devtools")
devtools::install_github("InsightRX/mipdtrial")

For examples of how to use the package to answer questions about MIPD and target attainment, check out the vignettes listed under “Articles!”

Usage

To use the mipdtrial package, it is crucial to understand the concept of “design” that is introduced in the package. The main goal of the designs is to allow configuration of flexible trials in which the sampling and regimen updates can depend on prior regimen changes, such as when the dosing interval is changed, but we still want to sample at dose 7 regardless of the dosing interval. Or, when infusion lengths are changed, but we still want to sample a peak sample. When times are pre-specified and fixed this flexibility is not possible.

The following designs need to be configured for every trial simulation:

All of these three designs can be “anchored” to a specific dose or day number. They can also be offset from the dosing time to e.g. sample at “peak” or “trough” times. Here is an example of how to set up a design for a simulated MIPD trial:

## sample at peak (at 1-hour infusion end), and at true trough
## do this at dose #1 and #3
tdm_design <- create_sampling_design(
  when = c("peak", "trough", "peak", "trough"),
  at = c(1, 1, 3, 3),
  anchor = "dose"
)

## Now sample slightly more realistically, half an hour after infusion end,
## and half an hour before true trough. We can use `offset` for this:
tdm_design <- create_sampling_design(
  when = c("peak", "trough", "peak", "trough"),
  offset = c(0.5, -0.5, 0.5, -0.5), 
  at = c(1, 1, 3, 3),
  anchor = "dose"
)

## If you know the sampling times and dosing intervals are not going 
## to change during the trial, you could also specify this design simply
## using fixed times as: (assuming 12-hour intervals)
tdm_design <- create_sampling_design(
    time = c(1.5, 11.5, 25.5, 35.5)
)

## For targets, we follow broadly the same concept. To target an AUC4 of 
## 400-600 at day 6, we can write:
target_design <- create_target_design(
  targettype = "auc24", 
  targetmin = 400,
  targetmax = 600,
  at = 6,
  anchor = "day"
)

## And for regimen update designs, it works similar as well. The following code
## implements dose updates at dose #3 and #5, using a MAP-based optimization.
dose_update_design <- create_regimen_update_design(
  at = c(3, 5),
  anchor = "dose",
  update_type = "dose",
  dose_optimization_method = map_adjust_dose
)

The vignettes show various additional examples of how to set up the trial simulations using designs. If you find an example of an MIPD trial design that cannot be captured yet using these functions, please let us know.

Roadmap

The mipdtrial package is currently under development, and there will likely be changes to core functionality in the upcoming months. Features thar are on our short-term roadmap:

Contributing

We welcome input from the community:

Disclaimer

The functionality in this R package is provided “as is”. While its authors adhere to software development best practices, the software may still contain unintended errors.

InsightRX Inc. and the authors of this package can not be held liable for any damages resulting from any use of this software. By the use of this software package, the user waives all warranties, expressed or implied, including any warranties to the accuracy, quality or suitability of InsightRX for any particular purpose, either medical or non-medical.


© InsightRX logo