ae_val: Get (computed) values related to adverse events.

Description Usage Arguments Details Value Examples

View source: R/convenience.R

Description

Get (computed) values related to adverse events.

Usage

1
ae_val(ae_table, treatment, value)

Arguments

ae_table

a table with columns treatment, ae (the names of different adverse events), prob (the probability of the given adverse event occurring under the given treatment), and others naming values that can be represented, for example cost or disutility.

treatment

the treatment for which the value is desired

value

the specific value desired

Details

The underlying function is memoised for efficiency.

Value

the requested value for the requested treatment

Examples

1
2
3
4
5
6
AEs <- data.frame(treatment = c("A", "A", "B", "B"),
                  ae = c("ae1", "ae2", "ae1", "ae2"),
                  prob = c(0.1, 0.1, 0.2, 0),
                  cost = c(100, 200, 100, 200))
ae_val(AEs, "A", "cost")
ae_val(AEs, "B", "cost")

MattWiener/heemodFits documentation built on May 19, 2019, 8:21 a.m.