Learn R Programming

tci (version 0.1.2)

gen_data: Function to simulate data from a specified PK or PK-PD model with a specified infusion schedule.

Description

Function to simulate data from a specified PK or PK-PD model with a specified infusion schedule.

Usage

gen_data(
  inf,
  pkmod,
  pars_pk0,
  sigma_add = 0,
  sigma_mult = 0,
  log_err = FALSE,
  init = NULL,
  tms = NULL,
  pdmod = NULL,
  pars_pd0 = NULL,
  ecmpt = NULL,
  delay = 0,
  max_pdval = 100,
  min_pdval = 0
)

Value

List with class "datasim"

Arguments

inf

An infusion rate object outputted from either the 'create_intvl' function or the 'iterate_tci_grid' function

pkmod

PK model

pars_pk0

"True" parameter estimates used to simulate data observations.

sigma_add

Additive residual error standard deviation.

sigma_mult

Multiplicative residual error standard deviation.

log_err

Logical. Should the error be log-normally distributed?

init

Initial concentrations.

tms

Observation times. Defaults to beginning of each infusion if unspecified.

pdmod

PD model if applicable.

pars_pd0

PD model parameters if applicable.

ecmpt

Effect-site compartment number. Defaults to last compartment.

delay

Delay between generation and observation of measurements.

max_pdval

Maximum PD value.

min_pdval

Minimum PD value