add_util | R Documentation |
Defining utilities for events and interventions
add_util(.data = NULL, util, evt, trt, cycle_l = NULL, cycle_starttime = 0)
.data |
Existing utility data |
util |
Value or expression to calculate the utility estimate |
evt |
Events for which this utility is applicable |
trt |
Interventions for which this utility is applicable |
cycle_l |
Cycle length; only needed if utilities are calculated per cycle |
cycle_starttime |
Cycle when utilities start being accrued; only needed if utilities are calculated per cycle |
Utilities can be defined by writing expressions and objects in the cost argument whose execution will be delayed until the model runs.
This function accepts the use of pipes (%>%) to define multiple utilities.
A list of utilities
add_util(evt = c("start","idfs","ttot"), trt = c("int", "noint"), util = util.idfs.ontx * fl.idfs.ontx + util.idfs.offtx * (1-fl.idfs.ontx))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.