plot.evppi | R Documentation |
Plot Expected Value of Partial Information With Respect to a Set of Parameters
## S3 method for class 'evppi'
plot(x, pos = c(0, 0.8), graph = c("base", "ggplot2"), col = c(1, 1), ...)
x |
An object in the class |
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 |
col |
Sets the colour for the lines depicted in the graph. |
... |
Arguments to be passed to methods, such as graphical parameters
(see |
Plot with base R or ggplot2.
Gianluca Baio, Andrea Berardi
Baio2013BCEA
bcea()
, evppi()
## Not run:
data(Vaccine, package = "BCEA")
treats <- c("Status quo", "Vaccination")
# Run the health economic evaluation using BCEA
m <- bcea(e.pts, c.pts, ref = 2, interventions = treats)
# Compute the EVPPI for a bunch of parameters
inp <- createInputs(vaccine_mat)
# Compute the EVPPI using INLA/SPDE
if (require("INLA")) {
x0 <- evppi(m, c("beta.1." , "beta.2."), input = inp$mat)
plot(x0, pos = c(0,1))
x1 <- evppi(m, c(32,48,49), input = inp$mat)
plot(x1, pos = "topright")
plot(x0, col = c("black", "red"), pos = "topright")
plot(x0, col = c(2,3), pos = "bottomright")
plot(x0, pos = c(0,1), graph = "ggplot2")
plot(x1, pos = "top", graph = "ggplot2")
plot(x0, col = c("black", "red"), pos = "right", graph = "ggplot2")
plot(x0, col = c(2,3), size = c(1,2), pos = "bottom", graph = "ggplot2")
plot(x0, graph = "ggplot2", theme = ggplot2::theme_linedraw())
}
if (FALSE)
plot(x0, col = 3, pos = "topright")
# The vector 'col' must have the number of elements for an EVPI
# colour and each of the EVPPI parameters. Forced to black
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.