This function runs a simulation of the basic 3 compartment virus infection model including the pharmacokinetics and pharmacodynamics of a drug. The user provides initial conditions and parameter values for the system. The function simulates the ODE using an ODE solver from the deSolve package.

simulate_pkpdmodel_ode(
  U = 1e+05,
  I = 0,
  V = 10,
  n = 0,
  dU = 0,
  dI = 1,
  dV = 2,
  b = 1e-05,
  g = 1,
  p = 10,
  C0 = 1,
  dC = 1,
  C50 = 1,
  k = 1,
  Emax = 0,
  txstart = 10,
  txinterval = 1,
  tstart = 0,
  tfinal = 20,
  dt = 0.01
)

Arguments

U

: initial number of uninfected target cells : numeric

I

: initial number of infected target cells : numeric

V

: initial number of infectious virions : numeric

n

: rate of new uninfected cell replenishment : numeric

dU

: rate at which uninfected cells die : numeric

dI

: rate at which infected cells die : numeric

dV

: rate at which infectious virus is cleared : numeric

b

: rate at which virus infects cells : numeric

g

: unit conversion factor : numeric

p

: rate at which infected cells produce virus : numeric

C0

: drug dose given at specified times : numeric

dC

: drug concentration decay rate : numeric

C50

: drug concentration at which effect is half maximum : numeric

k

: steepness of concentration-dependent drug effect : numeric

Emax

: maximum drug efficacy (0-1) : numeric

txstart

: time of drug treatment start : numeric

txinterval

: time between drug doses : numeric

tstart

: Start time of simulation : numeric

tfinal

: Final time of simulation : numeric

dt

: Times for which result is returned : numeric

Value

A list. The list has only one element called ts. ts contains the time-series of the simulation. The 1st column of ts is Time, the other columns are the model variables.

Details

A basic virus infection model with drug PkPd

A simple compartmental model is simulated as a set of ordinary differential equations, using an ode solver from the deSolve package. This code is part of the DSAIRM R package. For additional model details, see the corresponding app in the DSAIRM package.

Warning

This function does not perform any error checking. So if you try to do something nonsensical (e.g. specify negative parameter or starting values), the code will likely abort with an error message.

See also

See the Shiny app documentation corresponding to this simulator function for more details on this model. See the manual for the deSolve package for details on the underlying ODE simulator algorithm.

Author

Andreas Handel

Examples

# To run the simulation with default parameters just call the function:
result <- simulate_pkpdmodel_ode()
# To choose parameter values other than the standard one, specify them, like such:
result <- simulate_pkpdmodel_ode(V = 100, txstart = 10, n = 1e5, dU = 1e-2)
# You should then use the simulation result returned from the function, like this:
plot(result$ts[,"time"],result$ts[,"V"],xlab='Time',ylab='Virus',type='l',log='y')