{"id":28096044,"url":"https://github.com/insightrx/mipdtrial","last_synced_at":"2026-02-26T20:08:25.390Z","repository":{"id":245917057,"uuid":"797304002","full_name":"InsightRX/mipdtrial","owner":"InsightRX","description":"Tools for simulating model-informed precision dosing trials","archived":false,"fork":false,"pushed_at":"2025-11-18T22:41:14.000Z","size":6023,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-19T00:21:49.491Z","etag":null,"topics":["mipd","pharmacokinetics","pharmacometrics"],"latest_commit_sha":null,"homepage":"https://insightrx.github.io/mipdtrial/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InsightRX.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-07T15:25:00.000Z","updated_at":"2025-11-18T22:28:01.000Z","dependencies_parsed_at":"2025-07-04T13:55:09.527Z","dependency_job_id":"4b97ba4c-6cfe-4d4a-ae26-861900637397","html_url":"https://github.com/InsightRX/mipdtrial","commit_stats":null,"previous_names":["insightrx/mipdtrial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InsightRX/mipdtrial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightRX%2Fmipdtrial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightRX%2Fmipdtrial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightRX%2Fmipdtrial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightRX%2Fmipdtrial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InsightRX","download_url":"https://codeload.github.com/InsightRX/mipdtrial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InsightRX%2Fmipdtrial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29870660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T18:42:30.764Z","status":"ssl_error","status_checked_at":"2026-02-26T18:41:47.936Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mipd","pharmacokinetics","pharmacometrics"],"created_at":"2025-05-13T16:18:02.588Z","updated_at":"2026-02-26T20:08:25.370Z","avatar_url":"https://github.com/InsightRX.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# mipdtrial\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\nThe goal of mipdtrial is to make it easy to simulate pharmacokinetic/\npharmacodynamic (PK/PD) endpoints in response to dose adaptation.\n\nExisting tools are cumbersome to use for this purpose. For example, tools like\nNONMEM are optimized for model development, and assume fixed regimens when used\nfor simulation. Other algorithms, like sample optimization simulations, optimize\nfor information gain and not for attainment of clinically relevant metrics, such\nas AUC target attainment. `mipdtrial` fills in this niche by helping users \nsimulate PK/PD resulting from dose adaptations informed by past PK/PD readouts.\n\nHere are some example sorts of questions:\n\n* Will fewer patients receive a therapeutic AUC if we change our clinical \nprotocol from collecting a peak and a trough sample to collecting a single \nmid-interval sample?\n* How might model misspecification impact patient target attainment?\n* How does my institution's nomogram compare to a model-based dose?\n\n## Installation\n\nYou can install the development version of mipdtrial from [GitHub](https://github.com/) with:\n\n```r\n# install.packages(\"devtools\")\ndevtools::install_github(\"InsightRX/mipdtrial\")\n```\nFor examples of how to use the package to answer questions about MIPD and\ntarget attainment, check out the vignettes listed under \"Articles!\"\n\n## Usage\n\nTo use the `mipdtrial` package, it is crucial to understand the concept of \"design\" \nthat is introduced in the package. The main goal of the designs is to allow \nconfiguration of flexible trials in which the sampling and regimen updates can \ndepend on prior regimen changes, such as when the dosing interval is changed, \nbut we still want to sample at dose 7 regardless of the dosing interval. Or, \nwhen infusion lengths are changed, but we still want to sample a peak sample. \nWhen times are pre-specified and fixed this flexibility is not possible. \n\nThe following designs need to be configured for every trial simulation:\n\n- `sampling_design` : determines at what timepoints samples are taken.\n- `target_design`: determines at what timepoint the target should be measured, \nand what the target is.\n- `regimen_update_design` : determines at what timepoint the dose can be updated \nin response to new information sampled using the `sampling_design`, and how\nto optimize the dosing regimen.\n\nAll of these three designs can be \"anchored\" to a specific dose or day number. \nThey can also be offset from the dosing time to e.g. sample at \"peak\" or \"trough\" \ntimes. Here is an example of how to set up a design for a simulated MIPD trial:\n\n```r\n## sample at peak (at 1-hour infusion end), and at true trough\n## do this at dose #1 and #3\ntdm_design \u003c- create_sampling_design(\n  when = c(\"peak\", \"trough\", \"peak\", \"trough\"),\n  at = c(1, 1, 3, 3),\n  anchor = \"dose\"\n)\n\n## Now sample slightly more realistically, half an hour after infusion end,\n## and half an hour before true trough. We can use `offset` for this:\ntdm_design \u003c- create_sampling_design(\n  when = c(\"peak\", \"trough\", \"peak\", \"trough\"),\n  offset = c(0.5, -0.5, 0.5, -0.5), \n  at = c(1, 1, 3, 3),\n  anchor = \"dose\"\n)\n\n## If you know the sampling times and dosing intervals are not going \n## to change during the trial, you could also specify this design simply\n## using fixed times as: (assuming 12-hour intervals)\ntdm_design \u003c- create_sampling_design(\n\ttime = c(1.5, 11.5, 25.5, 35.5)\n)\n\n## For targets, we follow broadly the same concept. To target an AUC4 of \n## 400-600 at day 6, we can write:\ntarget_design \u003c- create_target_design(\n  targettype = \"auc24\", \n  targetmin = 400,\n  targetmax = 600,\n  at = 6,\n  anchor = \"day\"\n)\n\n## And for regimen update designs, it works similar as well. The following code\n## implements dose updates at dose #3 and #5, using a MAP-based optimization.\ndose_update_design \u003c- create_regimen_update_design(\n  at = c(3, 5),\n  anchor = \"dose\",\n  update_type = \"dose\",\n  dose_optimization_method = map_adjust_dose\n)\n```\n\nThe vignettes show various additional examples of how to set up the trial \nsimulations using designs. If you find an example of an MIPD trial design \nthat cannot be captured yet using these functions, please let us know.\n\n## Roadmap\n\nThe `mipdtrial` package is currently under development, and there will likely be \nchanges to core functionality in the upcoming months. The following features are\non our short-term roadmap:\n\n- Implement functionality to gather all relevant information during and at the \nend of the simulated trial, and include it in the output from `sample_and_adjust_by_dose`.\n- Improve ease of use: implement a single function to run the trial\n- Add more optimization functions, e.g. combined dose- and interval- optimization\n- Add functionality to generate more realistic trial scenarios, e.g. allow some\nrandom scattering of TDM samples over time.\n\n## Contributing\n\nWe welcome input from the community:\n\n- If you think you have encountered a bug, please [submit an issue](https://github.com/InsightRX/mipdtrial/issues) on the GitHub \npage. Please include a reproducible example of the unexpected behavior.\n\n- Please [open a pull request](https://github.com/InsightRX/mipdtrial/pulls) if you have a fix or updates that would improve the package. If you're not sure if your proposed \nchanges are useful or within  scope of the package, feel free to contact one \nof the authors of this package.\n\n## Disclaimer\n\nThe functionality in this R package is provided \"as is\". While its authors \nadhere to software development best practices, the software may still contain \nunintended errors.\n\nInsightRX Inc. and the authors of this package can not be held liable for any\ndamages resulting from any use of this software. By the use of this software \npackage, the user waives all warranties, expressed or implied, including any \nwarranties to the accuracy, quality or suitability of InsightRX for any \nparticular purpose, either medical or non-medical.\n\n---\n\n\u003cdiv align=\"right\"\u003e\n© \u003cimg src=\"man/figures/insightrx_logo_color.png\" alt=\"InsightRX logo\" width=\"120\" /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightrx%2Fmipdtrial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsightrx%2Fmipdtrial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightrx%2Fmipdtrial/lists"}