A huge aspect of building PK models is simulation, so we can test new scenarios, optimize new dose regimens, and even combine it with a pharmacodynamic (PD) model to build PK-PD models (maybe a future topic? Comment down below).
You too, can build your own PK model with some basic coding skills. Here are 3 steps to do so.
- Get a PK model and its parameters
If you are interested in doing simulations for a new drug, you will have to collect the PK data and build the model too (more details in post 2). However, for drugs already on the market, it is likely that someone has already built a model and published it. Just by searching “Drug Name population PK” in Google, I have been able to find relevant model parameters for my work. Most papers would report their parameters in a table, usually in the results section.
- Code your model up in PKPDsim
There are multiple ways of coding this up. In my case, I am using R and RStudio to build my caffeine model, with the bulk of my code depending on the PKPDsim package done by the amazing Ron Keizer. PKPDsim has made simulations in R much easier.
You can check out his youtube tutorial here https://www.youtube.com/watch?v=9JNW3YZ3f9k
And his github here https://github.com/InsightRX/PKPDsim
- Specify your regimen and simulate your model
Using PKPDsim, you can code up multiple different regimens, using different doses, times, and intervals. Using the specified model, parameters and regimen, PKPDsim can generate a dataframe containing the simulation. You can then plot this out in R. I like to use ggplot to do this.
Hope this was helpful and do let me know in the comments if you did try it out too!
Stay tuned for part 4 where we discuss understanding variability in a drug profile

Thank you so much, for sharing your lived exprience. Personally, I have very deep aspirations to learn more about pharmacometrics (i.e. please don’t hesitate to inform me if there is any free online courses or any other alternatives). Indeed, I will learn a lot from you! I am clinical pharmacolocist, I want to specialize (i.e, PhD) in pharmacometrics. I hope you will help me. I have been reading different literature how to conduct pharmacometrics/PK modeling for different purposes….
//
If it is your wish 🙏, will you post how to conduct PK modeling?
Keep your inspirational career activities!
Sincerely!