add_cost.Rd
Defining costs for events and intervention
add_cost(.data = NULL, cost, evt, trt, cycle_l = NULL, cycle_starttime = 0)
Existing cost data
Value or expression to calculate the cost estimate
Vector of events for which this cost is applicable
Vector of interventions for which this cost is applicable
Cycle length; only needed if costs are calculated per cycle
Cycle when costs start being accrued; only needed if costs are calculated per cycle
A list of costs
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.
add_cost(evt = c("start","idfs","ttot"),trt = "int",cost = cost.int*fl.int + cost.idfs)
#> $start_int
#> $start_int$cost
#> cost.int * fl.int + cost.idfs
#>
#> $start_int$cycle_l
#> NULL
#>
#> $start_int$cycle_starttime
#> [1] 0
#>
#>
#> $idfs_int
#> $idfs_int$cost
#> cost.int * fl.int + cost.idfs
#>
#> $idfs_int$cycle_l
#> NULL
#>
#> $idfs_int$cycle_starttime
#> [1] 0
#>
#>
#> $ttot_int
#> $ttot_int$cost
#> cost.int * fl.int + cost.idfs
#>
#> $ttot_int$cycle_l
#> NULL
#>
#> $ttot_int$cycle_starttime
#> [1] 0
#>
#>