## Readme.md


### Content

- `packages`: this folder contains packages required to run the analysis. Both Windows and Linux builds are available.
- `scripts`: this folder contains the scripts to run the analysis, including the illustrative examples, the main analysis and the supplementary analysis. The `output` folders are placeholder folders to store results. See more details on how to run the analysis in the section below.
- `dataset`: this folder is where the analysis loads the data from.
- `output`: this folder is a placeholder for output. 


### Instructions

1.  Install the R packages `gptools2` and `ADtools` from the `packages` folder.
2.  Install the `renv` package from CRAN: `install.packages("renv")`, then use `renv::restore()` to install the dependencies of the project.
3.  Run scripts from the `scripts` folder to generate results from the paper.
    -   `examples/1_bernoulli.R` corresponds to Section 2.4 first example of the paper.
    -   `examples/2_bayesian_linear_regression.R` corresponds to Section 2.4 second example of the paper.
    -   `_targets.R` corresponds to Section 3 of the paper. For readers who are unfamiliar with the R package `targets`, please see <https://books.ropensci.org/targets/> for detailed instructions on how to run a `targets` pipeline.
    -   `supplementary` includes various supplementary analysis suggested by reviewers.
