% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.CEriskav.R
\name{plot.CEriskav}
\alias{plot.CEriskav}
\title{Plots EIB and EVPI for the Risk Aversion Case}
\usage{
\method{plot}{CEriskav}(x, pos = c(0, 1), graph = c("base", "ggplot2"), ...)
}
\arguments{
\item{x}{An object of the class \code{CEriskav}, a subclass of \code{bcea},
containing the results of the economic analysis performed accounting for a
risk aversion parameter (obtained as output of the function \code{\link[=CEriskav]{CEriskav()}}).}

\item{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 \code{(bottom|top)(right|left)} for base graphics and
\code{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 \code{FALSE}
indicating to use the default position and \code{TRUE} to place it on the
bottom of the plot.}

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

\item{...}{Arguments to be passed to methods, such as graphical parameters
(see \code{\link[=par]{par()}}).}
}
\value{
\item{list(eib,evi)}{A two-elements named list of the ggplot objects
containing the requested plots. Returned only if \code{graph="ggplot2"}.}
The function produces two plots for the risk aversion analysis. The first
one is the EIB as a function of the discrete grid approximation of the
willingness parameter for each of the possible values of the risk aversion
parameter, \code{r}. The second one is a similar plot for the EVPI.
}
\description{
Summary plot of the health economic analysis when risk aversion is included.
}
\details{
Plots the Expected Incremental Benefit and the Expected Value of Perfect Information
when risk aversion is included in the utility function.
}
\examples{

# 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
m <- 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            # inhibits graphical output
)
#
# Define the vector of values for the risk aversion parameter, r, eg:
r <- c(1e-10, 0.005, 0.020, 0.035) 
#
# Run the cost-effectiveness analysis accounting for risk aversion
\donttest{
   CEriskav(m) <- r
}
#
# produce the plots
\donttest{
   plot(m)
}
## Alternative options, using ggplot2
\donttest{
   plot(m, graph = "ggplot2")
}

}
\references{
\insertRef{Baio2011}{BCEA}

\insertRef{Baio2013}{BCEA}
}
\seealso{
\code{\link[=bcea]{bcea()}}, \code{\link[=CEriskav]{CEriskav()}}
}
\author{
Gianluca Baio, Andrea Berardi
}
\keyword{hplot}
