R/markov_simulation_pipeline.R
markov_simulation_pipeline.Rd
This functions wraps multiple modular functions and allows an end-to-end cost effectiveness to be run, excluding the final analysis of the findings. It may also be used in batch mode to run analyses in parallel.
markov_simulation_pipeline( markov_model = NULL, duration = NULL, discount = 1.035, samples = 1, sample_type = "rcpp", sim_type = "armadillo_all", batches = 1, batch_fn = NULL, debug = FALSE, ... )
markov_model | A list of functions that define a markov model across multiple interventions. See |
---|---|
duration | Numeric, how many long to run the model for. |
discount | Numeric, the discount that should be applied to the costs and QALYs. Defaults to 1.035. |
samples | Numeric, defaults to 1. The number of markov model samples to use. |
sample_type | A character string specifying the approach to use to sample the model.
Options and defaults inherited from |
sim_type | A character string specifying the approach to use to simulate the model.
Options and defaults inherited from |
batches | Numeric, defaults to 1. The number of batches to run simulation/sampling in. When set to
values greater than 1 a |
batch_fn | Function, defaults to |
debug | Logical, defaults to |
... | Additional options to pass to |
A list containing the model samples and simulations.
sample_markov simulate_markov
#> # A tibble: 4 x 9 #> sample intervention transition state_cost intervention_co… cohort qalys #> <int> <chr> <named li> <named li> <dbl> <name> <nam> #> 1 1 SoC <dbl[,2] … <dbl [2]> 0 <dbl … <dbl… #> 2 1 Soc with We… <dbl[,2] … <dbl [2]> 50 <dbl … <dbl… #> 3 2 SoC <dbl[,2] … <dbl [2]> 0 <dbl … <dbl… #> 4 2 Soc with We… <dbl[,2] … <dbl [2]> 50 <dbl … <dbl… #> # … with 2 more variables: total_costs <dbl>, total_qalys <dbl>