prereg
provides R Markdown templates
that facilitates authoring preregistrations of scientific studies in PDF
format.
If you experience any problems or have suggestions for improvements, please open an issue.
To use R Markdown and prereg
you need the following software on your
computer:
- R (2.11.1 or later)
- RStudio (0.99.441 or later) is optional; if you don’t use RStudio, you need to install pandoc using the instructions for your operating system
- A TeX distribution (2013 or
later; e.g., MikTeX for Windows,
MacTeX for Mac, obviously, or TeX
Live for Linux)
- If you are running Windows, use MikTex if possible. Currently, pandoc and the Windows version of Tex Live don’t seem to like each other. Make sure you install the complete—not the basic—version.
You can install the stable version of prereg
from CRAN
install.packages("prereg")
or the development version from this GitHub repository (you may have to
install the devtools
package first).
install.packages("devtools")
devtools::install_github("crsh/prereg")
Once you have installed the prereg
you can select the templates when
creating a new R Markdown file through the RStudio menus.
prereg
produces a clean form-like document.
The template file contains comments that provide further details on how to fill in the form but are invisible in the final PDF document.
If you want to use prereg
without RStudio you can use the
rmarkdown::render
function to create preregistration documents:
# Create new COS preregistration challenge R Markdown file
rmarkdown::draft(
"my_preregistration.Rmd"
, "cos_prereg"
, package = "prereg"
, create_dir = FALSE
, edit = FALSE
)
# Render document
rmarkdown::render("my_preregistration.Rmd")
After knitting your preregistration to a PDF file using this package, you may upload this protocol to a trustworthy repository to complete your preregistration. Possible repositories for this are:
- Preregistration in Psychology: A preregistration platform provided by the Leibniz Institute for Psychology (ZPID) which focuses on psychological research
- Open Science Framework: An interdisciplinary platform provided by the Center for Open Science where preregistrations as well as other materials and data can be uploaded
The templates for the preregistrations were developed by the Center for Open Science, AsPredicted.org, Anna Elisabeth van ’t Veer and Roger Giner-Sorolla, and a task force composed of members of the American Psychological Association (APA), the British Psychological Society (BPS), the German Psychological Society (DGPs), the Center for Open Science (cos), and the Leibniz Institute for Psychology (ZPID). I’m thankful for their permission to use their material in this package.
Brandt, M. J., IJzerman, H., Dijksterhuis, A., Farach, F. J., Geller, J., Giner-Sorolla, R., … van ’t Veer, A. (2014). The Replication Recipe: What makes for a convincing replication? Journal of Experimental Social Psychology, 50, 217–224. doi: 10.1016/j.jesp.2013.10.005
van ’t Veer, A. E., & Giner-Sorolla, R. (2016). Pre-registration in social psychology—A discussion and suggested template. Journal of Experimental Social Psychology, 67, 2–12. doi: 10.1016/j.jesp.2016.03.004