# NOT RUN {
# psa input provided with package
data("example_psa")
example_psa_obj <- make_psa_obj(example_psa$cost, example_psa$effectiveness,
example_psa$parameters, example_psa$strategies)
# define wtp threshold vector (can also use a single wtp)
wtp <- seq(1e4, 1e5, by = 1e4)
ceac_obj <- ceac(wtp, example_psa_obj)
plot(ceac_obj) # see ?plot.ceac for options
# this is most useful when there are many strategies
# warnings are printed to describe strategies that
# have been filtered out
plot(ceac_obj, min_prob = 0.5)
# standard ggplot layers can be used
plot(ceac_obj) +
labs(title = "CEAC", y = "Pr(Cost-effective) at WTP")
# the ceac object is also a data frame
head(ceac_obj)
# summary() tells us the regions of cost-effectiveness for each strategy.
# Note that the range_max column is an open parenthesis, meaning that the
# interval over which that strategy is cost-effective goes up to but does not include
# the value in the range_max column.
summary(ceac_obj)
# }
Run the code above in your browser using DataLab