Learn R Programming

WARDEN (version 0.99.1)

add_tte: Define events and the initial event time

Description

Define events and the initial event time

Usage

add_tte(.data = NULL, arm, evts, other_inp = NULL, input)

Value

A list of initial events and event times

Arguments

.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

Details

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.

Examples

Run this code
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)
})

Run the code above in your browser using DataLab