R/markov_ce_pipeline.R
markov_ce_pipeline.Rd
This functions wraps multiple modular functions and allows an end-to-end cost effectiveness to be run, including final analysis of the findings.
markov_ce_pipeline( markov_model = NULL, duration = NULL, discount = 1.035, samples = 1, baseline = 1, willingness_to_pay_threshold = 20000, sample_type = "rcpp", sim_type = "armadillo_all", debug = FALSE, batches = 1, batch_fn = NULL, ... )
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. |
baseline | Numeric, the intervention to consider as the baseline for pairwise comparisons. |
willingness_to_pay_threshold | Numeric, defaulting to 20,000. This is the threshold at which an intervention may be considered cost effective in the UK. |
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 |
debug | Logical, defaults to |
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 |
... | Additional options to pass to |
A list containing the model samples and simulations and cost effectiveness summary measures.
markov_simulation_pipeline analyse_ce
#> $simulations_with_ce #> # A tibble: 10 x 12 #> sample intervention transition state_cost intervention_co… cohort qalys #> <int> <chr> <list> <list> <dbl> <list> <lis> #> 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… #> 5 3 SoC <dbl[,2] … <dbl [2]> 0 <dbl … <dbl… #> 6 3 Soc with We… <dbl[,2] … <dbl [2]> 50 <dbl … <dbl… #> 7 4 SoC <dbl[,2] … <dbl [2]> 0 <dbl … <dbl… #> 8 4 Soc with We… <dbl[,2] … <dbl [2]> 50 <dbl … <dbl… #> 9 5 SoC <dbl[,2] … <dbl [2]> 0 <dbl … <dbl… #> 10 5 Soc with We… <dbl[,2] … <dbl [2]> 50 <dbl … <dbl… #> # … with 5 more variables: total_costs <dbl>, total_qalys <dbl>, #> # incremental_costs <dbl>, incremental_qalys <dbl>, #> # incremental_net_benefit <dbl> #> #> $summarised_ce #> # A tibble: 2 x 13 #> intervention mean_costs sd_costs mean_qalys sd_qlays mean_incrementa… #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 SoC 0 0 4.17 0.0348 0 #> 2 Soc with We… 50 0 4.17 0.0414 0.00783 #> # … with 7 more variables: sd_incremental_qlays <dbl>, #> # mean_incremental_costs <dbl>, sd_incremental_costs <dbl>, #> # mean_incremental_net_benefit <dbl>, sd_incremental_net_benefit <dbl>, #> # probability_cost_effective <dbl>, icer <dbl> #>