View source: R/evpi_estimators.R
get_all_parameter_list | R Documentation |
Function to estimate the expected value of partial perfect information
get_all_parameter_list(
names_params_needed,
names_params_model,
params_passed,
param_file,
colnames_paramdistr
)
names_params_needed |
names of needed parameters from param matrix returned |
names_params_model |
names of parameters in the model |
params_passed |
parameters passed while running the markov model |
param_file |
all parameters required to run the model,provided with name of parameter, distribution and parameters that define the probability distribution |
colnames_paramdistr |
col names where the parameter distribution is defined |
this function gets all the parameters except the parameter of interest if they parameter is fixed, just read from file or a distribution, then gets it from a distribution, or if it to be calculated, just give it back as it is
current_parameter_list set of all parameters
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_file <- system.file("extdata", "table_param.csv",
package = "packEVPI")
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))
param_file <- system.file("extdata", "table_param.csv", package = "packEVPI")
colnames_paramdistr <- c("Param1_name", "Param1_value", "Param2_name",
"Param2_value")
names_params_needed <- colnames(list_markov[1, ]$param_matrix)
names_params_model <- names(list_markov[1, ]$list_param_values)
params_passed <- list_markov[1, ]$list_param_values
parameters <- get_all_parameter_list(names_params_needed, names_params_model,
params_passed, param_file, colnames_paramdistr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.