add_tte | R Documentation |
Define events and the initial event time
add_tte(.data = NULL, arm, evts, other_inp = NULL, input)
.data |
Existing data for initial event times |
arm |
The intervention for which the events and initial event times are defined |
evts |
A vector of the names of the events |
other_inp |
A vector of other input variables that should be saved during the simulation |
input |
The definition of initial event times for the events listed in the evts argument |
Events need to be separately defined for each intervention.
For each event that is defined in this list, the user needs to add a reaction to the event using the add_reactevt()
function which will determine what calculations will happen at an event.
A list of initial events and event times
add_tte(arm="int",evts = c("start","ttot","idfs","os"),
input={
start <- 0
idfs <- draw_tte(1,'lnorm',coef1=2, coef2=0.5)
ttot <- min(draw_tte(1,'lnorm',coef1=1, coef2=4),idfs)
os <- draw_tte(1,'lnorm',coef1=0.8, coef2=0.2)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.