InsightRX / mipdtrial

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

RXR-2114: add support for NCA-based adjustment #6

Open jasmineirx opened 5 months ago

jasmineirx commented 5 months ago

This PR adds a set of functions that make it possible to call clinPK::nca for dose adjustment. The main new function is dose_adjust_nca, which will iteratively estimate AUC using NCA, and then update the regimen to target an AUC. The new dose is recommended based on assuming constant clearance, using a ratio of AUC:dose. This function (dose_from_auc) will also be useful for other algorithms, like 2-sample kinetics.

I was surprised the AUC achieved this way was not as close to the target as I expected. When calculating "true" target by integrating under the curve via PKPDsim (the test case added has a cumulatvie AUC of about 420 for a target of 500), but when using the estimated AUC, it seems bang-on (after 3 days of a 4-day regimen, the achieved estimated AUC is basically exactly 75% of the target AUC), so I think this is due to differences between NCA and compartmental models.

roninsightrx commented 5 months ago

I was surprised the AUC achieved this way was not as close to the target as I expected. When calculating "true" target by integrating under the curve via PKPDsim (the test case added has a cumulatvie AUC of about 420 for a target of 500), but when using the estimated AUC, it seems bang-on (after 3 days of a 4-day regimen, the achieved estimated AUC is basically exactly 75% of the target AUC), so I think this is due to differences between NCA and compartmental models.

Seems a bit large difference. Do you have the code for the example that you tested? I don't think it's the test case, no?