Description Usage Arguments Value Examples
Run the model for a series of policies and compare outcomes to the base case Wrapper function for the whole model
1 2 3 4 | simpolicies(scenarios, naturalhist, treatinfo, agesource = "Standard",
minage = 0, maxage = 100, incsource = "Uganda",
mortsource = "Uganda", popsize = 1e+05, sims = 5, futimes = c(5,
10), returnstats = c("mean"), denom = 1e+05)
|
scenarios |
Data frame of scenarios to simulate (see example below as well as the |
naturalhist |
Data frame with natural history parameters (see compile_naturalhist) |
treatinfo |
Data frame with treatment hazard ratios, and for each scenario, treatment proportions, by stage-subgroups. See the example and the vignette |
agesource |
Country to use for age structure (see data(agestructure) ) |
minage |
Lower age limit for population at sim start |
maxage |
Upper age limit for population at sim start |
incsource |
Country to use for incidence rates (see data(incratesf) ) |
mortsource |
Country to use for life table (see data(allmortratesf) ) |
popsize |
Size of population to simulate |
sims |
Number of simulations |
futimes |
Follow-up times at which to tally outcomes, in years |
returnstats |
Defaults to simulation means, but you can also ask for c("mean", "lower", "upper"). Lower and upper report the 2.5% and 97.5% quantiles respectively. |
Denominator/population |
size by which to report outcomes; default is 100,000 |
Data frame if returnstats="mean", or list of data frames of length(returnstats)
1 2 3 4 5 6 7 8 9 10 11 | # Use example input data loaded in package, object name "ex1"
data(ex1)
ex1
# Element "pol" shows the 3 scenarios being modeled
"nh" contains the natural history information
"map" contains numeric indicators for the stage-subgroups
"tx" shows treatment hazard ratios and, for each scenario, the treatment distribution. See vignette for more details
# Run a model using ex1 inputs and the defaults
uganda_stdpop <- simpolicies(ex1$pol, ex1$nh, ex1$tx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.