View source: R/evpi_estimators.R
plot_evpi_threshold | R Documentation |
Function to estimate the expected value of partial perfect information This is the outer loop of the two stage Monte Carlo process
plot_evpi_threshold(result_evpi_evppi)
result_evpi_evppi |
result from estimation of evpi and evppi |
plot the plot
param_file <- system.file("extdata", "table_param.csv", package = "packEVPI")
well <- packDAMipd::health_state("well", cost = "cost_well_co", utility = 1)
disabled <- packDAMipd::health_state("disabled", cost = "cost_dis_co",
utility = "utility_dis_co")
dead <- packDAMipd::health_state("dead", cost = 0, utility = 0)
tmat <- rbind(c(1, 2, 3), c(NA, 4, 5), c(NA, NA, 6))
colnames(tmat) <- rownames(tmat) <- c("well", "disabled", "dead")
tm <- packDAMipd::populate_transition_matrix(3, tmat,
c("tp_well_well_co","tp_well_dis_co","tp_well_dead", "tp_dis_dis_co",
"tp_dis_dead", "tp_dead_dead"),colnames(tmat))
health_states <- packDAMipd::combine_state(well, disabled, dead)
this.strategy <- packDAMipd::strategy(tm, health_states, "control")
param_list <- packDAMipd::define_parameters(
tp_well_dis_co = packDAMipd::get_parameter_read("tp_well_dis_co",
param_file),
tp_well_dis_in = packDAMipd::get_parameter_read("tp_well_dis_in",
param_file),
tp_well_dead = packDAMipd::get_parameter_read("tp_well_dead", param_file),
tp_dis_dead = packDAMipd::get_parameter_read("tp_dis_dead", param_file),
tp_dead_dead = 1,
cost_well_co = packDAMipd::get_parameter_read("cost_well_co", param_file),
cost_well_in = packDAMipd::get_parameter_read("cost_well_in", param_file),
cost_dis_co = packDAMipd::get_parameter_read("cost_dis_co", param_file),
cost_dis_in = packDAMipd::get_parameter_read("cost_dis_in", param_file),
utility_dis_co = packDAMipd::get_parameter_read("utility_dis_co",
param_file),
utility_dis_in = packDAMipd::get_parameter_read("utility_dis_in",
param_file),
tp_well_well_co = "1-(tp_well_dis_co + tp_well_dead)",
tp_well_well_in = "1-(tp_well_dis_in + tp_well_dead)",
tp_dis_dis_co = "1-( tp_dis_dead)",
tp_dis_dis_in = "1-( tp_dis_dead)")
this_markov <- packDAMipd::markov_model(this.strategy, 24, c(1000, 0, 0),
discount = c(0, 0), method = "half cycle correction", param_list)
well <- packDAMipd::health_state("well", cost = "cost_well_in", utility = 1)
disabled <- packDAMipd::health_state("disabled", cost = "cost_dis_in",
utility = "utility_dis_in")
dead <- packDAMipd::health_state("dead", cost = 0, utility = 0)
tmat <- rbind(c(1, 2, 3), c(NA, 4, 5), c(NA, NA, 6))
colnames(tmat) <- rownames(tmat) <- c("well", "disabled", "dead")
tm <- packDAMipd::populate_transition_matrix(3, tmat, c("tp_well_well_in",
"tp_well_dis_in","tp_well_dead", "tp_dis_dis_in","tp_dis_dead", "tp_dead_dead"),
colnames(tmat))
health_states <- packDAMipd::combine_state(well, disabled, dead)
this.strategy <- packDAMipd::strategy(tm, health_states, "intervention")
sec_markov <- packDAMipd::markov_model(this.strategy, 24, c(1000, 0, 0),
discount = c(0, 0),method = "half cycle correction", param_list)
list_markov <- packDAMipd::combine_markov(list(this_markov, sec_markov))
parameter_of_interest <- "tp_well_dis_co"
colnames_paramdistr <- c("Param1_name", "Param1_value", "Param2_name",
"Param2_value")
threshold_values <- c(5000, 10000, 150000, 20000)
res <- estimate_evpi_evppi_diff_threshold(parameter_of_interest, param_file,
colnames_paramdistr, list_markov, threshold_values, outer_iterations = 3,
inner_iterations = 5)
plot_evpi_threshold(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.