Description Usage Arguments Value Examples
The 'scenarios' parameter must contain paired policies, i.e. if one scenario has early detection, a scenario must exist that has the same treatments but no early detection. This function checks for the correct pairing
1 | check_scenarios(scenarios, treatinfo)
|
scenarios |
Data frame of scenarios to simulate (see example below). First scenario should be the base case. |
treatinfo |
Data frame with treatment hazard ratios, and for each scenario, treatment proportions, by stage-subgroups. See the example and the vignette |
NULL if scenarios are paired properly, or vector listing the problematic pairs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(ex1)
# See scenarios
ex1$pol
# See treatment
ex1$tx
# Create version that have the "tam" scenario deleted and specify
# "base" and "tamandshift" scenarios as paired. This should fail.
fail <- ex1
fail$pol <- fail$pol[-2,]
fail$pol$num[2] <- 2
fail$pol$pairnum[2] <- 1
fail$tx$tam <- NULL
check_scenarios(ex1$pol, ex1$tx)
check_scenarios(fail$pol, fail$tx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.