basic PK model for iv administration
[LONGITUDINAL] input = {V, k} PK: depot(target=Ac) EQUATION: ddt_Ac = -k*Ac Cc=Ac/V
setwd(dirname(parent.frame(2)$ofile)) library(ggplot2) #------------------------------------- adm <- list(time=3, amount=40) Cc <- list(name='Cc',time=seq(from=0, to=20, by=0.1)) p <- list(name=c('V','k'), value=c(10,0.4)) res <- simulx(model='pk1_model.txt', parameter=p, output=Cc, treatment=adm) plot1=ggplot(data=res$Cc, aes(x=time, y=Cc, group=id)) + geom_line(size=1) print(plot1)
The amount \(A_c\) in the central compartment is solution of the ODE \(\ \ \dot{A_c}(t) = - k \, A_c(t)\)
The concentration \(C_c\) in the central compartment is defined by \(\ \ C_c(t) = A_c(t)/V\)