Create a class of controller to run a trial.
Methods
Method reset()
reset the trial and listener registered to the controller before running additional replicate of simulation.
Method run()
run a trial
Arguments
n
number of replicates of simulation.
n = 1
by default. Simulation results can be accessed byController$get_output()
.plot_event
create event plot
silent
logical.
TRUE
if muting all messages during a trial. Note that warning messages are still displayed.dry_run
TRUE
if action function provided by users is ignored and a built-in default actiondefault_action
is called instead. This default function only locks data when the milestone is triggered. Milestone time and number of endpoints' events or sample sizes are saved. It is suggested to setdry_run = TRUE
to estimate distributions of triggering time and number of events before formally using custom action functions if a fixed design is in use. This helps determining planned maximum information for group sequential design and reasonable time of milestone of interest when planning a trial. Set it toFALSE
for formal simulations. However, for an adaptive design where arm(s) could possibly be added or removed, settingdry_run
toTRUE
is usually not helpful because adaption should be actually applied to estimate milestone time.