Add min(simtime) to eventTable

sim_IQRmodel with eventTable discards simtimes < min(simtime). This is a reasonable choice for PK models with trivial initial steady state, but leads to problems in other scenarios, e.g., when you want to pre-equilibrate QSP models.

addTminToEventTable(eT, simtime)

Arguments

eT

IQReventTable

simtime

Vector of simulation times

Value

eT with min(simtimes added)

Details

Solution: For IDs with min(simtime) < min(eT$TIME), add a row with TIME = min(simtime), and carry backward the parameters

See also

Other IQReventTable: split_eventTable()

Author

Daniel Lill (daniel.lill@intiquan.com)

Examples

if (FALSE) { # \dontrun{
eT <- data.frame(ID = 1:2, TIME = 0, ADM = 1, AMT = 1, TINF = 1e-4)
eT <- `class<-`(eT, c("IQReventTable", "data.frame"))
addTminToEventTable(eT, simtime = lapply(setNames(nm = 1:2), function(x) (c(-1,0,1))))
addTminToEventTable(eT, simtime = lapply(setNames(nm = 1:1), function(x) (c(-1,0,1))))
} # }