Get an IQReventTable from an IQRmodel, dosing and parameters

The generated IQReventTable reflects the changes applied to the model when calling sim_IQRmodel with dosingTable or parameters. Thus with this step, you can call sim_IQRmodel always with eventTable, paving the way for a unique interface for sim_IQRmodel.

getDefaultEventTable(model, dosingTable = NULL, parameters = NULL)

Arguments

model

IQRmodel()

dosingTable

NULL or IQRdosing()

parameters

Named vector to override parameter values

Details

The two results are equivalent:

sim_IQRmodel(m)
sim_IQRmodel(m, eventTable = getDefaultEventTable(m))

Same with dosing:

sim_IQRmodel(m, dosingTable = IQRdosing(c(0,1), 1, 1))
sim_IQRmodel(m, eventTable = getDefaultEventTable(m, IQRdosing(c(0,1), 1, 1)))

Author

Daniel Lill (daniel.lill@intiquan.com)

Examples

if (FALSE) { # \dontrun{
td <- tempdir()
libraryPK_IQRtools(td)
fl <- file.path(td, "ModelLibraryPK/model_2cpt_linsat_iv.txt")
m <- IQRmodel(fl)
d <- IQRdosing(c(0,1),1,1)
eT <- getDefaultEventTable(m, dosingTable = d)

simres1 <- sim_IQRmodel(m, dosingTable = d)
simres2 <- sim_IQRmodel(m, eventTable = eT)

p <- c(CL = 100)
eT <- getDefaultEventTable(m, parameters = p)

simres1 <- sim_IQRmodel(m, parameters = p)
simres2 <- sim_IQRmodel(m, eventTable = eT)
} # }