Create timing designs (static or adaptive) for use in simulated trial, such as sampling designs, target designs etc.
create_design.RdThis function is used by the three functions create_sampling_design(),
create_regimen_update_design() and create_target_design(), but is itself
not intended for direct usage.
Usage
create_design(
  time = NULL,
  when = NULL,
  offset = NULL,
  scatter = NULL,
  at = NULL,
  anchor = c("dose", "day")
)Arguments
- time
 a vector of numeric values. If no
atvalues are specified, these will be used as the fixed sampling times in the simulated trial. Ifatvalues are supplied, the sampling times will be calculated adaptively during the trial. Theatdetermine which dose or day is used as reference, andtimewill be relative to the specifiedatanchor.- when
 character vector of same length as
time(or single value) determining how to interpret the provided samplingtime. IfNULLwill use the dose time as offset (default). Other options are:cmaxorpeak, which will use the end of infusion as the base for thetime, orcminortrough, which will use the time of next dose as the offset, ormiddleorcmidwhich will use the middle between the anchored dose and the next, orrandomwhich takes a random time point between the anchored dose and the next.- offset
 offset from standardized PK moments specified in
when, e.g.c(1, -1)withwhen = c("peak", "trough")to sample 1 hour after peak and 1 hour before trough.- scatter
 optional random variation in time, specified as the standard deviation, e.g.
scatter = 0.1to allow for variation in sampling time with an SD of 0.1 hours. Only relevant for sampling times, not for regimen_update designs or target designs. Random variation does not protect for peaks or troughs becoming sampled during infusion or in previous / next dose. So value forscattershould be chosen appropriately and probably used in conjunction with approriateoffsetvalues.- at
 numeric vector of the dose or day number to "anchor" the sampling times to. Vector needs to be of same length as
time. Ifanchoris set today, then the first dose in that day is used. If later doses in the day are preferred, the anchor can also be specified fractionally, e.g.1.5will use the time of the first dose in the second half of the 1st day.- anchor
 either
dayordose. Single value required, i.e. anchor types cannot be mixed.