mcda: Multi criteria decision analysis

Description Usage Arguments See Also Examples

View source: R/mcda.R

Description

Conduct a multi criteria decision analysis (MCDA) and compute scores for competing treatment strategies using output from a probabilistic sensitivity analysis (PSA).

Usage

1
2
3
mcda(x, sample, strategy, criteria, criteria_min = NULL,
  criteria_max = NULL, optimal = NULL, weights, score_min = 0,
  score_max = 100)

Arguments

x

A data.frame or data.table of simulation output characterizing the probability distribution of model outcomes.

sample

Character name of column from x denoting a randomly sampled parameter set from the PSA.

strategy

Character name of column from x denoting treatment strategy.

criteria

A vector of character names of columns from x denoting the criteria to use in the MCDA.

criteria_min

A vector of minimum values for each criterion. If NULL, then the minimum value is computed automatically.

criteria_max

A vector of maximum values for each criterion. If NULL, then the maximum value is computed automatically.

optimal

A character vector denoting whether the optimal value of each criteria is "low" or "high". If an element is "low", then lower performance on that criterion is better, and, if an element is "high", then higher performance on that criterion is better. Must be specified if either criteria_min or criteria_min is NULL.

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.

See Also

performance_matrix, lpvf_plot_data

Examples

 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)

InnovationValueInitiative/IVI-NSCLC documentation built on July 25, 2019, 8:03 p.m.