simulate.poppkmod: Summary method for 'poppkmod' objects

View source: R/methods.R

simulate.poppkmodR Documentation

Summary method for 'poppkmod' objects

Description

Summarize parameter distribution Simulate method for poppkmod objects

Usage

## S3 method for class 'poppkmod'
simulate(
  object,
  nsim = 1,
  seed = NULL,
  ...,
  inf,
  tms,
  obs_cmpt = 1,
  resp_bounds = NULL
)

Arguments

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.

Details

Simulate observations from a poppkmod object

Examples

# 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))

tci documentation built on Aug. 15, 2022, 9:09 a.m.