PKPD in R.

You know, to drug development understanding PKPD is important.
I’m not DMPK dept. but I think it’s better to know about basic PKPD theory.
There are some packages about pkpd analysis in R.
And I found cool library developed ronkeiser named “PKPDsim”.
http://ronkeizer.github.io/PKPDsim/
This library can integrate shiny, so user can calculate PKPD on the fly!
I used the library today.
I following code is almost same as document.
Following code is simulation of 1 compartment model, oral dose.
pk_1cmt_oral is defined in source code.

library("PKPDsim")
library("ggplot2")
p <- list(CL=1, V=10, KA=0.5)
pk1 <- new_ode_model("pk_1cmt_oral")
r1 <- new_regimen( amt=100,
                   times=c(0,12,24,36)
                   )
dat <- sim_ode(ode = "pk1",
               par = p,
               regimen=r1
               )
plt <- ggplot( dat, aes(x=t, y=y) ) + geom_line() + facet_wrap(~comp)
print(plt)

Now I got following image.
1 means elimination phase, 2 means absorption phase.
Rplot

Then run shiny, and simulate on the fly.

sim_ode_shiny(ode='pk1', par=p, regimen=r1)

Now web browser launched…
Screen Shot 2015-10-21 at 11.13.04 PM

I think it’s good library to study or simulate PKPD.

Advertisement

Published by iwatobipen

I'm medicinal chemist in mid size of pharmaceutical company. I love chemoinfo, cording, organic synthesis, my family.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: