Description Usage Arguments Value Examples
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.
1 | compile_naturalhist(prop_adv, mortrates, subgroup_probs)
|
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) |
Data frame of class 'naturalhist' with columns stage, subgroup, mortrate and prop
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.