Learn R Programming

mrgsolve (version 0.8.12)

qsim: A quick simulation function

Description

A quick simulation function

Usage

qsim(x, e = NULL, idata = NULL, req = NULL, tgrid = NULL,
  skip_init_calc = FALSE)

qsim_df(...)

Arguments

x

model object

e

event object

idata

individual data set

req

compartments to request

tgrid

tgrid object; used if e is an ev object

skip_init_calc

not used

...

passed to qsim

Details

Use when simulating with no intervention or a simple intervention. The rule of thumb to keep in mind with this function is that the timing of all events and observations is determined prior to the model run. This has particular consequences for infusion duration and lag times that might be set in $MAIN. Specifically, bioavailability is implemented for bolus but not infusion doses. Infusion rates and durations are not modeled from $MAIN. Dose lag times are not modeled from $MAIN. If these features are needed or when in doubt, use mrgsim.

Examples

Run this code
# NOT RUN {
mod <- mrgsolve:::house()

des <- tgrid(0,2400,1)

data <- recmatrix(ev(amt=1000, ii=24, addl=100),des)

out <- mod %>% qsim(data)

# }

Run the code above in your browser using DataLab