InsightRX / PKPDposterior

R package for full-Bayesian inference in the context of model-informed precision dosing
Other
3 stars 1 forks source link

add function for converting from NONMEM to PKPDposterior data #20

Closed jasmineirx closed 2 years ago

jasmineirx commented 2 years ago

I realize its a little weird that we go NONMEM -> PKPDsim -> NONMEM -> Stan if you look closely at it, but we will want the output of this function to have PKPDsim-formatted regimens and covariates to allow for easy simulation with PKPDsim later, so it was necessary to convert from NONMEM to PKPDsim anyways. This approach reduces code duplication. (Nearly all the lines of code added are just ensuring the data meets the expected specifications)

roninsightrx commented 2 years ago

I realize its a little weird that we go NONMEM -> PKPDsim -> NONMEM -> Stan if you look closely at it, but we will want the output of this function to have PKPDsim-formatted regimens and covariates to allow for easy simulation with PKPDsim later, so it was necessary to convert from NONMEM to PKPDsim anyways. This approach reduces code duplication. (Nearly all the lines of code added are just ensuring the data meets the expected specifications)

Agree. This function is a convenience function to make NONMEM datasets fit into the PKPDposterior workflow, so I see that makes sense. If a user wants to have more granular control there is always the option to create custom datasets.