add_util: Defining utilities for events and interventions

View source: R/input_f.R

add_utilR Documentation

Defining utilities for events and interventions

Description

Defining utilities for events and interventions

Usage

add_util(.data = NULL, util, evt, trt, cycle_l = NULL, cycle_starttime = 0)

Arguments

.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

Details

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.

Value

A list of utilities

Examples

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))

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