# NOT RUN {
## Base Case
# if you have a base case analysis, can use calculate_icers on that
data(hund_strat)
hund_icers <- calculate_icers(hund_strat$Cost,
hund_strat$QALYs,
hund_strat$Strategy)
plot(hund_icers)
# we have so many strategies that we may just want to plot the frontier
plot(hund_icers, plot_frontier_only = TRUE)
# see ?plot.icers for more options
## Using a PSA object
data(psa_cdiff)
# summary() gives mean cost and effect for each strategy
sum_cdiff <- summary(psa_cdiff)
# calculate icers
icers <- calculate_icers(sum_cdiff$meanCost,
sum_cdiff$meanEffect,
sum_cdiff$Strategy)
icers
# visualize
plot(icers)
# by default, only the frontier is labeled
# if using a small number of strategies, you can label all the points
# note that longer strategy names will get truncated
plot(icers, label = "all")
# }
Run the code above in your browser using DataLab