compile_naturalhist: Creates a 'naturalhist' object that describes key natural...

Description Usage Arguments Value Examples

View source: R/initialize.R

Description

Takes in stats on cancer stage, subgroup (e.g. tumor type) and survival and compiles into a data frame of class 'naturalhist'. Note that this function could be modified to allow for more complex situations. Right now it presumes that mortality rates vary by stage only, and that stage and subgroup are uncorrelated.

Usage

1
compile_naturalhist(prop_adv, mortrates, subgroup_probs)

Arguments

prop_adv

Advanced Proportion of cancers presenting as Advanced stage

mortrates

Named vector of cancer mortality rates by stage, e.g. c(Early=.05, Advanced=0.21)

subgroup_probs

Named vector of subgroup probabilities that occur within stage groups, e.g. c('ER+'=0.5, 'ER-'=0.5)

Value

Data frame of class 'naturalhist' with columns stage, subgroup, mortrate and prop

Examples

1
2
compile_naturalhist(prop_adv=0.85, mortrates=c(Early=0.05, Advanced=0.21), 
                   subgroup_probs=c(`ER+`=0.5, `ER-`=0.5))

cancerpolicy/bcimodel documentation built on June 15, 2018, 12:31 a.m.