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.
prereg depends on additional software, namely,
If you work with RStudio (1.1.453 or later) pandoc should already be installed, otherwise refer to the installation instructions for your operating system.
prereg can be used with common TeX distributions, such as MikTeX on Windows, MacTeX on Mac, or TeX Live on Linux.
If you mainly use TeX to render R Markdown documents, we strongly recommend using the TinyTex distribution. It is lightweight and automatically installs missing LaTeX packages. TinyTex can be installed from within R as follows.
if(!"tinytex" %in% rownames(installed.packages())) install.packages("tinytex")
tinytex::install_tinytex()
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 remotes package first).
if(!"remotes" %in% rownames(installed.packages())) install.packages("remotes")
remotes::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 preregistration templates collected in this package were developed by others (cited below and in the template documentation). We are grateful for their permission to use their material in this package.
Bosnjak, M., Fiebach, C. J., Mellor, D., Mueller, S., O’Connor, D. B., Oswald, F. L., & Sokol-Chang, R. I. (2021). A template for preregistration of quantitative research in psychology: Report of the joint psychological societies preregistration task force. American Psychologist. https://dx.doi.org/10.1037/amp0000879
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. https://doi.org/10.1016/j.jesp.2013.10.005
Crüwell, S. & Evans, N. J. (2021). Preregistration in diverse contexts: a preregistration template for the application of cognitive models. Royal Society Open Science. 8:210155 https://doi.org/10.1016/j.jesp.2013.10.005
Flannery, J. E. (2020, October 22). fMRI Preregistration Template. Retrieved from https://osf.io/6juft
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. https://doi.org/10.1016/j.jesp.2016.03.004