plot.evppi {BCEA}R Documentation

Plot Expected Value of Partial Information With Respect to a Set of Parameters

Description

Plot Expected Value of Partial Information With Respect to a Set of Parameters

Usage

## S3 method for class 'evppi'
plot(x, pos = c(0, 0.8), graph = c("base", "ggplot2"), col = c(1, 1), ...)

Arguments

x

An object in the class evppi, obtained by the call to the function evppi.

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 (bottom|top)(right|left) for base graphics and bottom|top|left|right for ggplot2. It can be a two-elements vector, which specifies the relative position on the x and y axis respectively, or alternatively it can be in form of a logical variable, with FALSE indicating to use the default position and TRUE to place it on the bottom of the plot.

graph

A string used to select the graphical engine to use for plotting. Should (partial-) match the two options "base" or "ggplot2". Default value is "base".

col

Sets the colour for the lines depicted in the graph.

...

Arguments to be passed to methods, such as graphical parameters (see par).

Value

Plot with base R or ggplot2.

Author(s)

Gianluca Baio, Andrea Berardi

References

Baio G. (2012). Bayesian Methods in Health Economics. CRC/Chapman Hall, London.

See Also

bcea, evppi

Examples


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)

# Compute the EVPPI using INLA/SPDE
x0 <- evppi(m, c("beta.1." , "beta.2."), input = inp$mat)

plot(x0, pos = c(0,1))

## Not run: 
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)


[Package BCEA version 2.4.1 Index]