| simulate.poppkmod | R Documentation | 
Summarize parameter distribution Simulate method for poppkmod objects
## S3 method for class 'poppkmod' simulate( object, nsim = 1, seed = NULL, ..., inf, tms, obs_cmpt = 1, resp_bounds = NULL )
object | 
 An object with class "poppkmod" generated by 'poppkmod'  | 
nsim | 
 Number of observations to simulate at each time point. Defaults to 1.  | 
seed | 
 An integer used to initialize the random number generator.  | 
... | 
 Arguments passed to 'update.pkmod'.  | 
inf | 
 A matrix of infusion rates with columns 'begin', 'end', and 'inf_rate'. This can be created manually, by 'inf_manual', or by 'inf_tci'.  | 
tms | 
 Times at which to simulate observations.  | 
obs_cmpt | 
 Integer value indicating compartment in which observations are taken. Overridden if a PD model is included.  | 
resp_bounds | 
 Optional vector of two values indicating minimum and maximum values possible for the response.  | 
Simulate observations from a poppkmod object
# simulate data from a 2 compartment model with multiplicative error dose <- inf_manual(inf_tms = c(0,0.5,4,4.5,10), inf_rate = c(100,0,80,0,0)) # poppkmod object data <- data.frame(ID = 1:5, AGE = seq(20,60,by=10), TBW = seq(60,80,by=5), HGT = seq(150,190,by=10), MALE = c(TRUE,TRUE,FALSE,FALSE,FALSE)) elvd_mod <- poppkmod(data, drug = "ppf", model = "eleveld") inf <- inf_tci(elvd_mod, target_vals = c(2,3,4,4), target_tms = c(0,2,3,10), "plasma") simulate(elvd_mod, nsim = 3, inf = inf, tms = c(1,2,4,6,10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.