---
title: "Getting Started"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Getting Started}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

This vignette will demonstrate a simple cost-effectiveness analysis using __BCEA__ using the smoking cessation data set contained in the package.

```{r setup, warning=FALSE, message=FALSE}
library(BCEA)
```

Load the data.

```{r}
data(Smoking)
```

This study has four interventions.

```{r}
treats <- c("No intervention", "Self-help", "Individual counselling", "Group counselling")
```

Setting the reference group (`ref`) to _Group counselling_ and the maximum willingness to pay (`Kmax`) as 500.

```{r}
bcea_smoke <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500)
```

We can easily create a grid of the most common plots

```{r fig.width=10, fig.height=10}
library(ggplot2)
library(purrr)

plot(bcea_smoke)
```

Individual plots can be plotting using their own functions.

```{r}
ceplane.plot(bcea_smoke, comparison = 2, wtp = 250)

eib.plot(bcea_smoke)

contour(bcea_smoke)

ceac.plot(bcea_smoke)

ib.plot(bcea_smoke)
```

More on this in the other vignettes but you can change the default plotting style, such as follows.

```{r}
plot(bcea_smoke,
     graph = "ggplot2",
     wtp = 250,
     line = list(color = "red", size = 1),
     point = list(color = c("plum", "tomato", "springgreen"), shape = 3:5, size = 2),
     icer = list(color = c("red", "orange", "black"), size = 5))
```