add_cost: Defining costs for events and intervention

View source: R/input_f.R

add_costR Documentation

Defining costs for events and intervention

Description

Defining costs for events and intervention

Usage

add_cost(.data = NULL, cost, evt, trt, cycle_l = NULL, cycle_starttime = 0)

Arguments

.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

Details

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.

Value

A list of costs

Examples

add_cost(evt = c("start","idfs","ttot"),trt = "int",cost = cost.int*fl.int + cost.idfs)


Roche/descem documentation built on July 27, 2022, 11:18 a.m.