An open API service indexing awesome lists of open source software.

https://github.com/aaronpeikert/bayes-prereg


https://github.com/aaronpeikert/bayes-prereg

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

---
output: github_document
bibliography: references.bib
---

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

# Why does preregistration increase the persuasiveness of evidence? A Bayesian rationalization.

## [🗎 Manuscript draft 🗎](https://aaronpeikert.github.io/bayes-prereg/manuscript.pdf) / [Talk slides](https://aaronpeikert.github.io/bayes-prereg/presentation.html)

```{r abstract, echo=FALSE, results='asis'}
cat(readLines('abstract.md'))
```

## How to reproduce?

### GitHub Actions

Reproduction is done automatically on GitHub: [![Render and deploy PDF](https://github.com/aaronpeikert/bayes-prereg/actions/workflows/render-n-deploy-pdf.yml/badge.svg)](https://github.com/aaronpeikert/bayes-prereg/actions/workflows/render-n-deploy-pdf.yml), so forking the repo and pushing changes should be sufficient for you to reproduce.

### Using Docker

#### Prebuild Image

This workflow requires Docker, Git, and Make installed:

1. Get docker image, and give it a local tag:

```
docker pull ghcr.io/aaronpeikert/bayes-prereg:main
docker tag ghcr.io/aaronpeikert/bayes-prereg:main bayesprereg:latest
```

2. Reproduce:

```
git clone https://github.com/aaronpeikert/bayes-prereg.git
cd bayes-prereg
make DOCKER=TRUE
```

#### Self build Image

1. Build the image locally:

```
make docker
```

2. Reproduce:

```
make DOCKER=TRUE
```

#### Without Make/Git

Since Make and Git are installed in the image, the docker container is technically all you need.
However, retrieving the end result requires you to [bind a volume to the container (modify first comand).](https://docs.docker.com/storage/volumes/)

```
docker run ghcr.io/aaronpeikert/bayes-prereg:main bash
git clone https://github.com/aaronpeikert/bayes-prereg.git
cd bayes-prereg
make
```

An alternative with graphical user interface is:

1. Get docker image:

```
docker run ghcr.io/aaronpeikert/bayes-prereg:main
```

2. Use the url and password that is shown to you in the terminal to open RStudio in your web browser.
3. Create a new project, click on "version control", click on "git", paste url: `https://github.com/aaronpeikert/bayes-prereg.git`
4. Reproduce by running `make` in the RStudio terminal (not console!).

### Locally

#### With Git and Make

Make sure you have all installed software you need.

```
git clone https://github.com/aaronpeikert/bayes-prereg.git
cd bayes-prereg
make
```

#### Per pedes

1. Open RStudio
2. Create a new project, click on "version control", click on "git", paste url: `https://github.com/aaronpeikert/bayes-prereg.git`
3. Open `manuscript.Rmd`.
4. Install all the packages listed under `packages` in the yaml metadata.
5. Open `R/simulation.R` and run it.
6. Open `manuscript.Rmd` and click on knit.