Skip to contents

This function calculates the probabilities that each strategy is the most cost effective.

Usage

calculate_ceac(
  df,
  e_int,
  e_comp,
  c_int,
  c_comp,
  v_wtp = seq(from = 0, to = 1e+05, by = 1000)
)

Arguments

df

a dataframe.

e_int

character. Name of variable of the dataframe containing total effects of the intervention strategy.

e_comp

character. Name of variable of the dataframe containing total effects of the comparator strategy.

c_int

character. Name of variable of the dataframe containing total costs of the intervention strategy.

c_comp

character. Name of variable of the dataframe containing total costs of the comparator strategy.

v_wtp

vector of numerical values. Vectors of willingness-to-pay threshold for which the probabilities of cost effectiveness have to be defined. Default is 0:100,000 by increments of 1,000.

Value

A dataframe with three columns: "WTP_threshold", "Prob_int", "Prob_comp". "WTP_threshold" contains the willingness-to-pay thresholds at which the probability of cost effectiveness has been calculated for both strategies. "Prob_int" contains the probability that the intervention strategy is cost effective at a given willingness-to-pay threshold. "Prob_comp" contains the probability that the comparator strategy is cost effective at a given willingness-to-pay threshold.

Examples

# Calculate probabilities of cost effectiveness using the example dataframe, for willlingness-to-pay thresholds of 0 to 50,0000 euros.
data("df_pa")
calculate_ceac(df_pa,
              e_int = "t_qaly_d_int",
              e_comp = "t_qaly_d_comp",
              c_int = "t_costs_d_int",
              c_comp = "t_costs_d_comp",
              v_wtp = seq(from = 0, to = 50000, by = 1000))
#>    WTP_threshold Prob_int Prob_comp
#> 1              0   0.0000    1.0000
#> 2           1000   0.0000    1.0000
#> 3           2000   0.0000    1.0000
#> 4           3000   0.0000    1.0000
#> 5           4000   0.0000    1.0000
#> 6           5000   0.0000    1.0000
#> 7           6000   0.0000    1.0000
#> 8           7000   0.0000    1.0000
#> 9           8000   0.0000    1.0000
#> 10          9000   0.0000    1.0000
#> 11         10000   0.0000    1.0000
#> 12         11000   0.0000    1.0000
#> 13         12000   0.0000    1.0000
#> 14         13000   0.0000    1.0000
#> 15         14000   0.0000    1.0000
#> 16         15000   0.0000    1.0000
#> 17         16000   0.0000    1.0000
#> 18         17000   0.0000    1.0000
#> 19         18000   0.0000    1.0000
#> 20         19000   0.0000    1.0000
#> 21         20000   0.0000    1.0000
#> 22         21000   0.0000    1.0000
#> 23         22000   0.0000    1.0000
#> 24         23000   0.0000    1.0000
#> 25         24000   0.0000    1.0000
#> 26         25000   0.0000    1.0000
#> 27         26000   0.0000    1.0000
#> 28         27000   0.0000    1.0000
#> 29         28000   0.0000    1.0000
#> 30         29000   0.0000    1.0000
#> 31         30000   0.0000    1.0000
#> 32         31000   0.0000    1.0000
#> 33         32000   0.0000    1.0000
#> 34         33000   0.0000    1.0000
#> 35         34000   0.0000    1.0000
#> 36         35000   0.0000    1.0000
#> 37         36000   0.0000    1.0000
#> 38         37000   0.0000    1.0000
#> 39         38000   0.0000    1.0000
#> 40         39000   0.0000    1.0000
#> 41         40000   0.0001    0.9999
#> 42         41000   0.0005    0.9995
#> 43         42000   0.0007    0.9993
#> 44         43000   0.0007    0.9993
#> 45         44000   0.0011    0.9989
#> 46         45000   0.0015    0.9985
#> 47         46000   0.0017    0.9983
#> 48         47000   0.0025    0.9975
#> 49         48000   0.0029    0.9971
#> 50         49000   0.0043    0.9957
#> 51         50000   0.0051    0.9949