inst/modeldb/PK_1cmt_des.R

PK_1cmt_des <- function() {
  description <- "One compartment PK model with linear clearance using differential equations"
  dosing<-c("central", "depot")
  ini({
    lka <- 0.45 ; label("Absorption rate (Ka)")
    lcl <- 1 ; label("Clearance (CL)")
    lvc  <- 3.45 ; label("Central volume of distribution (V)")
    propSd <- 0.5 ; label("Proportional residual error (fraction)")
  })
  model({
    ka <- exp(lka)
    cl <- exp(lcl)
    vc  <- exp(lvc)

    kel <- cl / vc

    d/dt(depot) <- -ka*depot
    d/dt(central) <- ka*depot-kel*central

    Cc <- central / vc
    Cc ~ prop(propSd)
  })
}

Try the nlmixr2lib package in your browser

Any scripts or data that you put into this service are public.

nlmixr2lib documentation built on Oct. 7, 2024, 5:08 p.m.