This model agnostic function samples a markov model specification. It wraps multiple approaches that may offer various advantages and disadvantages.
sample_markov(markov_model = NULL, type = "rcpp", debug = FALSE, samples = 1)
markov_model | A list of functions that define a markov model across multiple interventions. See |
---|---|
type | A character string specifying the approach to use to sample the model. Currently implemented approaches are "base" and "rcpp" with "rcpp" as the default. |
debug | Logical, defaults to |
samples | Numeric, defaults to 1. The number of samples to take from the Markov model |
A data.frame of samples of a model encoded in the SpeedyMarkov
format (see example_two_state_markov
for details).
#> # A tibble: 2 x 7 #> sample intervention transition state_cost intervention_co… cohort qalys #> <int> <chr> <named list> <named lis> <dbl> <named> <name> #> 1 1 SoC <dbl[,2] [2… <dbl [2]> 0 <dbl [… <dbl … #> 2 1 Soc with Webs… <dbl[,2] [2… <dbl [2]> 50 <dbl [… <dbl …