plot.bcea | R Documentation |
Plots in a single graph the Cost-Effectiveness plane, the Expected Incremental Benefit, the CEAC and the EVPI.
## S3 method for class 'bcea'
plot(
x,
comparison = NULL,
wtp = 25000,
pos = FALSE,
graph = c("base", "ggplot2"),
...
)
x |
A |
comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as NULL plots all the comparisons
together. Any subset of the possible comparisons can be selected (e.g.,
|
wtp |
The value of the willingness to pay parameter. It is passed to
|
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the two options |
... |
Arguments to be passed to the methods |
The default position of the legend for the cost-effectiveness plane
(produced by ceplane.plot()
) is set to c(1, 1.025)
overriding its default for pos=FALSE
, since multiple ggplot2 plots
are rendered in a slightly different way than single plots.
A plot with four graphical summaries of the health economic evaluation.
Gianluca Baio, Andrea Berardi
Baio2011BCEA
\insertRefBaio2013BCEA
bcea()
,
ceplane.plot()
,
eib.plot()
,
ceac.plot()
,
evi.plot()
# See Baio G., Dawid A.P. (2011) for a detailed description of the
# Bayesian model and economic problem
# Load the processed results of the MCMC simulation model
data(Vaccine)
# Runs the health economic evaluation using BCEA
he <- bcea(
e=eff, c=cost, # defines the variables of
# effectiveness and cost
ref=2, # selects the 2nd row of (e,c)
# as containing the reference intervention
interventions=treats, # defines the labels to be associated
# with each intervention
Kmax=50000, # maximum value possible for the willingness
# to pay threshold; implies that k is chosen
# in a grid from the interval (0,Kmax)
plot=FALSE # does not produce graphical outputs
)
# Plots the summary plots for the "bcea" object m using base graphics
plot(he, graph = "base")
# Plots the same summary plots using ggplot2
if(require(ggplot2)){
plot(he, graph = "ggplot2")
##### Example of a customized plot.bcea with ggplot2
plot(he,
graph = "ggplot2", # use ggplot2
theme = theme(plot.title=element_text(size=rel(1.25))), # theme elements must have a name
ICER_size = 1.5, # hidden option in ceplane.plot
size = rel(2.5) # modifies the size of k = labels
) # in ceplane.plot and eib.plot
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.