add_cost | R Documentation |
Defining costs for events and intervention
add_cost(.data = NULL, cost, evt, trt, cycle_l = NULL, cycle_starttime = 0)
.data |
Existing cost data |
cost |
Value or expression to calculate the cost estimate |
evt |
Vector of events for which this cost is applicable |
trt |
Vector of interventions for which this cost is applicable |
cycle_l |
Cycle length; only needed if costs are calculated per cycle |
cycle_starttime |
Cycle when costs start being accrued; only needed if costs are calculated per cycle |
Costs 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 costs.
A list of costs
add_cost(evt = c("start","idfs","ttot"),trt = "int",cost = cost.int*fl.int + cost.idfs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.