Description Usage Arguments See Also Examples
Conduct a multi criteria decision analysis (MCDA) and compute scores for competing treatment strategies using output from a probabilistic sensitivity analysis (PSA).
1 2 3 |
x |
A |
sample |
Character name of column from |
strategy |
Character name of column from |
criteria |
A vector of character names of columns from |
criteria_min |
A vector of minimum values for each criterion. If |
criteria_max |
A vector of maximum values for each criterion. If |
optimal |
A character vector denoting whether the optimal value of each criteria
is |
weights |
Weights to apply to each criteria. Internally normalized to sum to 1. |
score_min |
Minimum of total value score. Default is 0. |
score_max |
Maximum of total value score. Default is 100. |
performance_matrix
, lpvf_plot_data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | n_samples <- 5
strategies <- c("Strategy 1", "Strategy 2")
outcome1 <- c(rnorm(n_samples, mean = 10, sd = 5),
rnorm(n_samples, mean = 8, sd = 4))
outcome2 <- c(rnorm(n_samples, mean = 1500, sd = 90),
rnorm(n_samples, mean = 1000, sd = 100))
outcomes <- data.frame(sample = rep(1:n_samples, length(strategies)),
strategy_id = rep(strategies, each = n_samples),
criteria1 = outcome1,
criteria2 = outcome2)
# Performance matrix
performance_mat <- performance_matrix(outcomes,
strategy = "strategy_id",
criteria = c("criteria1", "criteria2"),
rownames = c("Criteria 1", "Criteria 2"),
colnames = strategies)
print(performance_mat)
# MCDA
weights <- c(.7, .3)
mcda <- mcda(outcomes, sample = "sample", strategy = "strategy_id",
criteria = c("criteria1", "criteria2"),
weights = weights,
optimal = c("low", "high"))
names(mcda)
# Scores on common scale
print(mcda$scores)
# "Total value"
print(mcda$total_value)
# "Total value" decomposed by criteria
print(mcda$weighted_scores)
# Probability of ranking
print(mcda$prob_rank)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.