PKPDsim icon indicating copy to clipboard operation
PKPDsim copied to clipboard

Simulating Two PK Models Simultaneously.

Open wayne200240 opened this issue 6 years ago • 1 comments

Hi

I am working on antibiotic combination and would like to simulate two different PK models simultaneously to drive a PD model. I was wondering what is the best way to code this.

I have tried the following the code but it failed to run. Any advice would be much appreciated. Thank you very much.

Kind regards,

model <- new_ode_model(code = " dAdt[1] = -(CL/V)*A[1] - (Q/V)*A[1] + (Q/V2)*A[2]; dAdt[2] = -(Q/V2)*A[2] + (Q/V)*A[1]; dAdt[3] = - (CLR/VR)*A[3];") ; # A1 + A2 ==> two compartment model for Drug A ; # A3 --> One Compartment model for Drug B ; # PD model not included here.

r6 <- new_regimen(amt=c(rep(100,4),rep(2000,4)), time =c(0:3,0:3)*12, cmt = c(rep(1,4), rep(3,4)), type = c(rep("infusion",4), rep("infusion",4)), t_inf=c(rep(1,8), rep(1,8)))

dat3 <- sim_ode (ode = model, par = P_PKPD, regimen= R6 )

wayne200240 avatar Jun 24 '19 03:06 wayne200240

I am trying to do the same, I think you can use a similar example to the PKPD example: http://pkpdsim.ronkeizer.com/example-pkpd-model.html You can use pk1 and pk2. You can specify the dosing compartment using cmt argument in the new_regimen function

melmelie avatar Oct 08 '19 16:10 melmelie