├── .Rbuildignore ├── .github └── no-response.yml ├── .gitignore ├── .travis.yml ├── DESCRIPTION ├── NAMESPACE ├── R ├── prereg.R ├── prereg_pdf.R └── utils.R ├── README.Rmd ├── README.md ├── cran-comments.md ├── inst ├── NEWS.md ├── rmarkdown │ └── templates │ │ ├── aspredicted_prereg │ │ ├── skeleton │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ │ ├── brandt_prereg │ │ ├── skeleton │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ │ ├── cos_prereg │ │ ├── skeleton │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ │ ├── cruewell_prereg │ │ ├── skeleton │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ │ ├── fmri_prereg │ │ ├── skeleton │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ │ ├── prp_quant_prereg │ │ ├── skeleton │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ │ ├── rr_prereg │ │ ├── skeleton │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ │ └── vantveer_prereg │ │ ├── skeleton │ │ └── skeleton.Rmd │ │ └── template.yaml └── rmd │ ├── apa6.csl │ └── prereg_form.tex ├── man ├── prereg.Rd └── prereg_pdf.Rd ├── tests ├── test_prereg.R └── testthat │ └── test_skeletons.R └── tools └── images ├── pkg-deps-1.png ├── prereg_page1.png ├── prereg_page2.png ├── prereg_rmd.png └── template_selection.png /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^CRAN-RELEASE$ 2 | ^.*\.Rproj$ 3 | ^\.Rproj\.user$ 4 | 5 | ^.github$ 6 | ^.travis.yml 7 | ^cran-comments.md 8 | ^README.Rmd 9 | ^README_files$ 10 | -------------------------------------------------------------------------------- /.github/no-response.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-no-response - https://github.com/probot/no-response 2 | 3 | # Number of days of inactivity before an Issue is closed for lack of response 4 | daysUntilClose: 28 5 | # Label requiring a response 6 | responseRequiredLabel: more-information-needed 7 | # Comment to post when closing an Issue for lack of response. Set to `false` to disable 8 | closeComment: > 9 | This issue has been automatically closed because there has been no response 10 | to our request for more information from the original author. With only the 11 | information that is currently in the issue, we don't have enough information 12 | to take action. Please reach out if you have or find the answers we need so 13 | that we can investigate further. 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # History files 2 | .Rhistory 3 | .Rapp.history 4 | 5 | # Example code in package build process 6 | *-Ex.R 7 | 8 | # RStudio files 9 | .Rproj.user/ 10 | *.Rproj 11 | 12 | # produced vignettes 13 | vignettes/*.html 14 | vignettes/*.pdf 15 | 16 | .RData 17 | 18 | # System files 19 | *~ 20 | .DS_Store 21 | Thumbs.db 22 | .Rproj.user 23 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: r 2 | r: 3 | - oldrel 4 | - release 5 | - devel 6 | 7 | # Be strict when checking our package 8 | warnings_are_errors: true 9 | 10 | # Suggested packages needed to run tests 11 | r_packages: 12 | - testthat -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: prereg 2 | Type: Package 3 | Title: R Markdown Templates to Preregister Scientific Studies 4 | Version: 0.5.0 5 | Authors@R: c( 6 | person("Frederik", "Aust", email = "frederik.aust@uni-koeln.de", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-4900-788X")), 7 | person("Lisa", "Spitzer", email = "lisa.spitzer95@yahoo.de", role = "aut"), 8 | person("Jeffrey R.", "Stevens", email = "jeffrey.r.stevens@gmail.com", role = "ctb", comment = c(ORCID = "0000-0003-2375-1360")), 9 | person("Masataka", "Ogawa", email = "ogawa@phiz.c.u-tokyo.ac.jp", role = "ctb") 10 | ) 11 | Description: Provides a collection of templates to author preregistration documents for scientific studies in PDF format. 12 | URL: https://github.com/crsh/prereg 13 | BugReports: https://github.com/crsh/prereg/issues 14 | Depends: 15 | R (>= 3.0.0) 16 | Imports: 17 | rmarkdown (>= 1.0) 18 | Suggests: 19 | testthat 20 | License: GPL-3 21 | Encoding: UTF-8 22 | LazyData: TRUE 23 | Language: en-US 24 | RoxygenNote: 7.3.2 25 | Roxygen: list(markdown = TRUE) 26 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(aspredicted_prereg) 4 | export(brandt_prereg) 5 | export(cos_prereg) 6 | export(fmri_prereg) 7 | export(prereg_pdf) 8 | export(prp_quant_prereg) 9 | export(psyquant_prereg) 10 | export(rr_prereg) 11 | export(vantveer_prereg) 12 | -------------------------------------------------------------------------------- /R/prereg.R: -------------------------------------------------------------------------------- 1 | #' R Markdown Templates to Preregister Scientific Studies 2 | #' 3 | #' The provided \href{https://rmarkdown.rstudio.com/}{R Markdown} templates are based 4 | #' on the \href{https://osf.io/x5w7h/}{Center for Open Science Preregistration Challenge}, 5 | #' the \href{https://aspredicted.org/}{AsPredicted.org} questions, a template suggested 6 | #' for social psychology by van 't Veer and Giner-Sorolla (2016), and the replication recipe 7 | #' suggested by Brandt et al. (2013). 8 | #' 9 | #' @section System requirements: 10 | #' Before using \pkg{prereg} to create a preregistration document, make sure the following 11 | #' software is installed on your computer: 12 | #' 13 | #' \itemize{ 14 | #' \item{\href{https://rstudio.com/}{RStudio} (>= 0.98.932); if you don't use RStudio 15 | #' , you need to install \href{https://pandoc.org/}{pandoc} using the 16 | #' \href{https://pandoc.org/installing.html}{instructions for your operating system}} 17 | #' \item{A \href{https://de.wikipedia.org/wiki/TeX}{TeX} distribution (2013 or later; e.g., \href{https://miktex.org/}{MikTeX} 18 | #' for Windows, \href{https://tug.org/mactex/}{MacTeX} for Mac, obviously, or \href{https://www.tug.org/texlive/}{TeX Live} 19 | #' for Linux)} 20 | #' } 21 | #' 22 | #' If you are running \emph{Windows}, use MikTex if possible. Currently, pandoc and the Windows version of Tex Live 23 | #' \href{https://github.com/rstudio/rmarkdown/issues/6}{don't seem to like each other}. Make sure you install the 24 | #' \emph{complete}---not the basic---version. 25 | #' 26 | #' @section Author and Maintainer: 27 | #' Frederik Aust (frederik.aust at uni-koeln.de). 28 | #' @references 29 | #' 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: \href{https://doi.org/10.1016/j.jesp.2013.10.005}{10.1016/j.jesp.2013.10.005} 30 | #' van 't Veer, A. E., & Giner-Sorolla, R. (2016). Pre-registration in social psychology---A discussion and 31 | #' suggested template. Journal of Experimental Social Psychology, 67, 2--12. doi: 32 | #' \href{https://doi.org/10.1016/j.jesp.2016.03.004}{10.1016/j.jesp.2016.03.004} 33 | #' @docType package 34 | #' @name prereg 35 | 36 | NULL 37 | -------------------------------------------------------------------------------- /R/prereg_pdf.R: -------------------------------------------------------------------------------- 1 | 2 | #' Preregistration renderer 3 | #' 4 | #' Knit a PDF document using preregistration document template 5 | #' 6 | #' @param ... additional arguments to \code{\link[rmarkdown]{pdf_document}}; 7 | #' \code{template} is ignored. 8 | #' @references 9 | #' 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*. http://dx.doi.org/10.1037/amp0000879 10 | #' 11 | #' 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 12 | #' 13 | #' 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 14 | #' 15 | #' Flannery, J. E. (2020, October 22). fMRI Preregistration Template. Retrieved from https://osf.io/6juft 16 | #' 17 | #' 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 18 | #' 19 | #' @examples 20 | #' \dontrun{ 21 | #' # Create R Markdown file 22 | #' rmarkdown::draft( 23 | #' "my_preregistration.Rmd" 24 | #' , "cos_prereg" 25 | #' , package = "prereg" 26 | #' , create_dir = FALSE 27 | #' , edit = FALSE 28 | #' ) 29 | #' 30 | #' # Render file 31 | #' rmarkdown::render("my_preregistration.Rmd") 32 | #' } 33 | #' 34 | #' @export 35 | 36 | 37 | prereg_pdf <- function(...) { 38 | ellipsis <- list(...) 39 | if(!is.null(ellipsis$template)) ellipsis$template <- NULL 40 | 41 | # Get cos_prereg template 42 | template <- system.file("rmd", "prereg_form.tex", package = "prereg") 43 | if(template == "") stop("No LaTeX template file found.") else ellipsis$template <- template 44 | 45 | # Create format 46 | prereg_format <- do.call(rmarkdown::pdf_document, ellipsis) 47 | 48 | ## Overwrite preprocessor to set correct margin and CSL defaults 49 | saved_files_dir <- NULL 50 | 51 | # Preprocessor functions are adaptations from the RMarkdown package 52 | # (https://github.com/rstudio/rmarkdown/blob/master/R/pdf_document.R) 53 | # to ensure right geometry defaults in the absence of user specified values 54 | pre_processor <- function(metadata, input_file, runtime, knit_meta, files_dir, output_dir) { 55 | # save files dir (for generating intermediates) 56 | saved_files_dir <<- files_dir 57 | 58 | args <- pdf_pre_processor(metadata, input_file, runtime, knit_meta, files_dir, output_dir) 59 | 60 | header_includes <- c("\\setlength{\\headheight}{14.0pt}", metadata$`header-includes`) 61 | args <- c(args, "--variable", paste0("header-includes:", paste(header_includes, collapse = "\n"))) 62 | 63 | } 64 | 65 | prereg_format$pre_processor <- pre_processor 66 | 67 | prereg_format 68 | } 69 | 70 | 71 | #' @rdname prereg_pdf 72 | #' @export 73 | 74 | aspredicted_prereg <- function(...) { 75 | .Deprecated("prereg_pdf") 76 | prereg_pdf(...) 77 | } 78 | 79 | #' @rdname prereg_pdf 80 | #' @export 81 | 82 | brandt_prereg <- function(...) { 83 | .Deprecated("prereg_pdf") 84 | prereg_pdf(...) 85 | } 86 | 87 | 88 | # Crawl OSF JSON 89 | 90 | # brandt <- jsonlite::read_json("https://raw.githubusercontent.com/CenterForOpenScience/osf.io/08a604c550c68c53653bf751ccd0571acc50cab4/website/project/metadata/brandt-prereg-2.json") 91 | # 92 | # cat("\n\n") 100 | # 101 | # if(!is.null(brandt$pages[[i]]$questions[[j]]$options)) { 102 | # cat(paste0("**", unlist(brandt$pages[[i]]$questions[[j]]$options), "**", collapse = "\n"), "\n\n\n") 103 | # } else { 104 | # cat("Enter your response here.\n\n\n") 105 | # } 106 | # 107 | # for(k in seq_along(brandt$pages[[i]]$questions[[j]]$properties)) { 108 | # cat("##", brandt$pages[[i]]$questions[[j]]$properties[[k]]$description, "\n\n") 109 | # 110 | # for(l in seq_along(brandt$pages[[i]]$questions[[j]]$properties[[k]]$properties)) { 111 | # cat("\n\n") 112 | # } 113 | # } 114 | # } 115 | # } 116 | 117 | #' @rdname prereg_pdf 118 | #' @export 119 | 120 | cos_prereg <- function(...) { 121 | .Deprecated("prereg_pdf") 122 | prereg_pdf(...) 123 | } 124 | 125 | #' @rdname prereg_pdf 126 | #' @export 127 | 128 | fmri_prereg <- function(...) { 129 | .Deprecated("prereg_pdf") 130 | prereg_pdf(...) 131 | } 132 | 133 | #' @rdname prereg_pdf 134 | #' @export 135 | 136 | psyquant_prereg <- function(...) { 137 | .Deprecated("prereg_pdf") 138 | prereg_pdf(...) 139 | } 140 | 141 | #' @rdname prereg_pdf 142 | #' @export 143 | 144 | prp_quant_prereg <- function(...) { 145 | .Deprecated("prereg_pdf") 146 | prereg_pdf(...) 147 | } 148 | 149 | #' @rdname prereg_pdf 150 | #' @export 151 | 152 | rr_prereg <- function(...) { 153 | .Deprecated("prereg_pdf") 154 | prereg_pdf(...) 155 | } 156 | 157 | 158 | #' @rdname prereg_pdf 159 | #' @export 160 | 161 | vantveer_prereg <- function(...) { 162 | .Deprecated("prereg_pdf") 163 | prereg_pdf(...) 164 | } 165 | 166 | # Crawl OSF JSON 167 | 168 | # vantveer <- jsonlite::read_json("https://raw.githubusercontent.com/CenterForOpenScience/osf.io/c932eb477493c194b8fa38d2df69ed3246adf1b6/website/project/metadata/veer-1.json") 169 | # 170 | # cat("\n\n") 187 | # } 188 | # } 189 | # } 190 | # } 191 | -------------------------------------------------------------------------------- /R/utils.R: -------------------------------------------------------------------------------- 1 | # Preprocessor functions are adaptations from the RMarkdown package 2 | # (https://github.com/rstudio/rmarkdown/blob/master/R/pdf_document.R) 3 | # to ensure right geometry defaults in the absence of user specified values 4 | 5 | pdf_pre_processor <- function(metadata, input_file, runtime, knit_meta, files_dir, output_dir) { 6 | args <- c() 7 | 8 | # Set margins if no other geometry options specified 9 | has_geometry <- function(text) { 10 | length(grep("^geometry:.*$", text)) > 0 11 | } 12 | if (!has_geometry(readLines(input_file, warn = FALSE))) 13 | args <- c(args 14 | , "--variable", "geometry:left=2.5in" 15 | , "--variable", "geometry:bottom=1.25in" 16 | , "--variable", "geometry:top=1.25in" 17 | , "--variable", "geometry:right=1in" 18 | ) 19 | 20 | # Use APA6 CSL citations template if no other file is supplied 21 | has_csl <- function(text) { 22 | length(grep("^csl:.*$", text)) > 0 23 | } 24 | if (!has_csl(readLines(input_file, warn = FALSE))) { 25 | csl_template <- system.file("rmd", "apa6.csl", package = "prereg") 26 | if(csl_template == "") stop("No CSL template file found.") 27 | args <- c(args, c("--csl", rmarkdown::pandoc_path_arg(csl_template))) 28 | } 29 | 30 | args 31 | } -------------------------------------------------------------------------------- /README.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "prereg: R Markdown Templates for Preregistrations of Scientific Studies" 3 | output: github_document 4 | --- 5 | 6 | [![CRAN/METACRAN](https://img.shields.io/cran/v/prereg?label=CRAN&logo=r)](https://cran.r-project.org/package=prereg) [![Download counter](https://cranlogs.r-pkg.org/badges/prereg)](https://cran.r-project.org/package=prereg) [![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org) ![GitHub last commit](https://img.shields.io/github/last-commit/crsh/prereg/master?label=Last commit&logo=github&logoColor=%23FFF) ![Travis build status](https://img.shields.io/travis/crsh/prereg?label=Build&logo=travis-ci&logoColor=%23FFF) [![GitHub bug issues](https://img.shields.io/github/issues/crsh/prereg/bug?label=Bugs&logo=github&logoColor=%23FFF)](https://github.com/crsh/prereg/issues?q=is%3Aopen+is%3Aissue+label%3Abug) 7 | 8 | **prereg** provides [R Markdown](https://rmarkdown.rstudio.com/) templates that facilitates authoring preregistrations of scientific studies in PDF format. 9 | 10 | If you experience any problems or have suggestions for improvements, please [open an issue](https://github.com/crsh/prereg/issues). 11 | 12 | ## Setup 13 | 14 | ### Software requirements 15 | 16 | **prereg** depends on additional software, namely, 17 | 18 | 1. [R](http://www.r-project.org/) 2.11.1 or later and 19 | 2. [pandoc](http://johnmacfarlane.net/pandoc/) 1.19 or later 20 | 3. [TeX](http://de.wikipedia.org/wiki/TeX) 2013 or later. 21 | 22 | If you work with [RStudio](http://www.rstudio.com/) (1.1.453 or later) pandoc should already be installed, otherwise refer to the [installation instructions](http://pandoc.org/installing.html) for your operating system. 23 | 24 | 25 | #### Setting up a TeX distribution 26 | 27 | **prereg** can be used with common TeX distributions, such as [MikTeX](http://miktex.org/) on Windows, [MacTeX](https://tug.org/mactex/) on Mac, or [TeX Live](http://www.tug.org/texlive/) on Linux. 28 | 29 | If you mainly use TeX to render R Markdown documents, we strongly recommend using the [TinyTex](https://yihui.name/tinytex/) distribution. 30 | It is lightweight and automatically installs missing LaTeX packages. 31 | TinyTex can be installed from within R as follows. 32 | 33 | ```{r eval = FALSE} 34 | if(!"tinytex" %in% rownames(installed.packages())) install.packages("tinytex") 35 | 36 | tinytex::install_tinytex() 37 | ``` 38 | 39 | 40 | #### Install prereg 41 | You can install the stable version of **prereg** from CRAN 42 | 43 | ```{r eval = FALSE} 44 | install.packages("prereg") 45 | ``` 46 | 47 | or the development version from this GitHub repository (you may have to install the **remotes** package first). 48 | 49 | ```{r eval = FALSE} 50 | if(!"remotes" %in% rownames(installed.packages())) install.packages("remotes") 51 | remotes::install_github("crsh/prereg") 52 | ``` 53 | 54 | ### Create a preregistration document 55 | Once you have installed the **prereg** you can select the templates when creating a new R Markdown file through the RStudio menus. 56 | 57 | ![](tools/images/template_selection.png) 58 | 59 | 60 | #### Example 61 | **prereg** produces a clean form-like document. 62 | 63 | ![](tools/images/prereg_page1.png) ![](tools/images/prereg_page2.png) 64 | 65 | The template file contains comments that provide further details on how to fill in the form but are invisible in the final PDF document. 66 | 67 | ![](tools/images/prereg_rmd.png) 68 | 69 | 70 | #### Using prereg without RStudio 71 | If you want to use **prereg** without RStudio you can use the `rmarkdown::render` function to create preregistration documents: 72 | 73 | ```{r eval = FALSE} 74 | # Create new COS preregistration challenge R Markdown file 75 | rmarkdown::draft( 76 | "my_preregistration.Rmd" 77 | , "cos_prereg" 78 | , package = "prereg" 79 | , create_dir = FALSE 80 | , edit = FALSE 81 | ) 82 | 83 | # Render document 84 | rmarkdown::render("my_preregistration.Rmd") 85 | ``` 86 | 87 | ## Uploading your preregistration 88 | After knitting your preregistration to a PDF file using this package, you may upload this protocol to a trustworthy repository to complete your preregistration. 89 | Possible repositories for this are: 90 | 91 | - [Preregistration in Psychology](https://prereg-psych.org/): A preregistration platform provided by the Leibniz Institute for Psychology (ZPID) which focuses on psychological research 92 | - [Open Science Framework](https://osf.io/prereg/): An interdisciplinary platform provided by the Center for Open Science where preregistrations as well as other materials and data can be uploaded 93 | 94 | 95 | ## Package dependencies 96 | 97 | ```{r pkg-deps, echo = FALSE, message = FALSE, fig.path = "tools/images/", warning = FALSE} 98 | depgraph::plot_dependency_graph() 99 | ``` 100 | 101 | # Acknowledgments 102 | 103 | The preregistration templates collected in this package were developed by others (cited below and in the template documentation). 104 | We are grateful for their permission to use their material in this package. 105 | 106 | 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*. http://dx.doi.org/10.1037/amp0000879 107 | 108 | 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 109 | 110 | 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 111 | 112 | Flannery, J. E. (2020, October 22). fMRI Preregistration Template. Retrieved from https://osf.io/6juft 113 | 114 | 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 115 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | prereg: R Markdown Templates for Preregistrations of Scientific Studies 2 | ================ 3 | 4 | [![CRAN/METACRAN](https://img.shields.io/cran/v/prereg?label=CRAN&logo=r)](https://cran.r-project.org/package=prereg) 5 | [![Download 6 | counter](https://cranlogs.r-pkg.org/badges/prereg)](https://cran.r-project.org/package=prereg) 7 | [![Project Status: Active - The project has reached a stable, usable 8 | state and is being actively 9 | developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org) 10 | ![GitHub last 11 | commit](https://img.shields.io/github/last-commit/crsh/prereg/master?label=Last%20commit&logo=github&logoColor=%23FFF) 12 | ![Travis build 13 | status](https://img.shields.io/travis/crsh/prereg?label=Build&logo=travis-ci&logoColor=%23FFF) 14 | [![GitHub bug 15 | issues](https://img.shields.io/github/issues/crsh/prereg/bug?label=Bugs&logo=github&logoColor=%23FFF)](https://github.com/crsh/prereg/issues?q=is%3Aopen+is%3Aissue+label%3Abug) 16 | 17 | **prereg** provides [R Markdown](https://rmarkdown.rstudio.com/) 18 | templates that facilitates authoring preregistrations of scientific 19 | studies in PDF format. 20 | 21 | If you experience any problems or have suggestions for improvements, 22 | please [open an issue](https://github.com/crsh/prereg/issues). 23 | 24 | ## Setup 25 | 26 | ### Software requirements 27 | 28 | **prereg** depends on additional software, namely, 29 | 30 | 1. [R](http://www.r-project.org/) 2.11.1 or later and 31 | 2. [pandoc](http://johnmacfarlane.net/pandoc/) 1.19 or later 32 | 3. [TeX](http://de.wikipedia.org/wiki/TeX) 2013 or later. 33 | 34 | If you work with [RStudio](http://www.rstudio.com/) (1.1.453 or later) 35 | pandoc should already be installed, otherwise refer to the [installation 36 | instructions](http://pandoc.org/installing.html) for your operating 37 | system. 38 | 39 | #### Setting up a TeX distribution 40 | 41 | **prereg** can be used with common TeX distributions, such as 42 | [MikTeX](http://miktex.org/) on Windows, 43 | [MacTeX](https://tug.org/mactex/) on Mac, or [TeX 44 | Live](http://www.tug.org/texlive/) on Linux. 45 | 46 | If you mainly use TeX to render R Markdown documents, we strongly 47 | recommend using the [TinyTex](https://yihui.name/tinytex/) distribution. 48 | It is lightweight and automatically installs missing LaTeX packages. 49 | TinyTex can be installed from within R as follows. 50 | 51 | ``` r 52 | if(!"tinytex" %in% rownames(installed.packages())) install.packages("tinytex") 53 | 54 | tinytex::install_tinytex() 55 | ``` 56 | 57 | #### Install prereg 58 | 59 | You can install the stable version of **prereg** from CRAN 60 | 61 | ``` r 62 | install.packages("prereg") 63 | ``` 64 | 65 | or the development version from this GitHub repository (you may have to 66 | install the **remotes** package first). 67 | 68 | ``` r 69 | if(!"remotes" %in% rownames(installed.packages())) install.packages("remotes") 70 | remotes::install_github("crsh/prereg") 71 | ``` 72 | 73 | ### Create a preregistration document 74 | 75 | Once you have installed the **prereg** you can select the templates when 76 | creating a new R Markdown file through the RStudio menus. 77 | 78 | ![](tools/images/template_selection.png) 79 | 80 | #### Example 81 | 82 | **prereg** produces a clean form-like document. 83 | 84 | ![](tools/images/prereg_page1.png) ![](tools/images/prereg_page2.png) 85 | 86 | The template file contains comments that provide further details on how 87 | to fill in the form but are invisible in the final PDF document. 88 | 89 | ![](tools/images/prereg_rmd.png) 90 | 91 | #### Using prereg without RStudio 92 | 93 | If you want to use **prereg** without RStudio you can use the 94 | `rmarkdown::render` function to create preregistration documents: 95 | 96 | ``` r 97 | # Create new COS preregistration challenge R Markdown file 98 | rmarkdown::draft( 99 | "my_preregistration.Rmd" 100 | , "cos_prereg" 101 | , package = "prereg" 102 | , create_dir = FALSE 103 | , edit = FALSE 104 | ) 105 | 106 | # Render document 107 | rmarkdown::render("my_preregistration.Rmd") 108 | ``` 109 | 110 | ## Uploading your preregistration 111 | 112 | After knitting your preregistration to a PDF file using this package, 113 | you may upload this protocol to a trustworthy repository to complete 114 | your preregistration. Possible repositories for this are: 115 | 116 | - [Preregistration in Psychology](https://prereg-psych.org/): A 117 | preregistration platform provided by the Leibniz Institute for 118 | Psychology (ZPID) which focuses on psychological research 119 | - [Open Science Framework](https://osf.io/prereg/): An 120 | interdisciplinary platform provided by the Center for Open Science 121 | where preregistrations as well as other materials and data can be 122 | uploaded 123 | 124 | ## Package dependencies 125 | 126 | ![](tools/images/pkg-deps-1.png) 127 | 128 | # Acknowledgments 129 | 130 | The preregistration templates collected in this package were developed 131 | by others (cited below and in the template documentation). We are 132 | grateful for their permission to use their material in this package. 133 | 134 | Bosnjak, M., Fiebach, C. J., Mellor, D., Mueller, S., O’Connor, D. B., 135 | Oswald, F. L., & Sokol-Chang, R. I. (2021). A template for 136 | preregistration of quantitative research in psychology: Report of the 137 | joint psychological societies preregistration task force. *American 138 | Psychologist*. 139 | 140 | Brandt, M. J., IJzerman, H., Dijksterhuis, A., Farach, F. J., Geller, 141 | J., Giner-Sorolla, R., … van ’t Veer, A. (2014). The Replication Recipe: 142 | What makes for a convincing replication? *Journal of Experimental Social 143 | Psychology*, 50, 217–224. 144 | 145 | Crüwell, S. & Evans, N. J. (2021). Preregistration in diverse contexts: 146 | a preregistration template for the application of cognitive models. 147 | *Royal Society Open Science*. 8:210155 148 | 149 | 150 | Flannery, J. E. (2020, October 22). fMRI Preregistration Template. 151 | Retrieved from 152 | 153 | van ’t Veer, A. E., & Giner-Sorolla, R. (2016). Pre-registration in 154 | social psychology—A discussion and suggested template. *Journal of 155 | Experimental Social Psychology*, 67, 2–12. 156 | 157 | -------------------------------------------------------------------------------- /cran-comments.md: -------------------------------------------------------------------------------- 1 | ## Test environments 2 | 3 | * macOS 10.15.7 Catalina, R 4.0.2 (local) 4 | * macOS 10.13.6 High Sierra, R-release, brew (r-hub) 5 | * Ubuntu 16.04.6 Xenial, R-oldrel (Travis-CI) 6 | * Ubuntu 16.04.6 Xenial, R-release (Travis-CI) 7 | * Ubuntu 16.04.6 Xenial, R-devel (Travis-CI) 8 | * Debian Linux, R-devel, GCC (r-hub) 9 | * Windows Server 2008 R2 SP1, R-devel, 32/64 bit (r-hub) 10 | * Windows Server 2008, R-oldrel (win-builder) 11 | * Windows Server 2008, R-release (win-builder) 12 | 13 | ## R CMD check results 14 | 15 | 0 errors | 0 warnings | 1 note 16 | 17 | ## Comments 18 | 19 | This is a resubmission. Addresses 1 note: 20 | 21 | > Found the following (possibly) invalid URLs: 22 | URL: https://cos.io/prereg/ (moved to https://www.cos.io/initiatives/prereg) 23 | From: README.md 24 | Status: 200 25 | Message: OK 26 | 27 | * Followed moved content 28 | 29 | I keep seeing one issue: 30 | 31 | > Found the following (possibly) invalid URLs 32 | 33 | Found the following (possibly) invalid URLs: 34 | URL: https://aspredicted.org/ 35 | From: man/prereg.Rd 36 | Status: 406 37 | Message: Not Acceptable 38 | 39 | But URL is valid. 40 | -------------------------------------------------------------------------------- /inst/NEWS.md: -------------------------------------------------------------------------------- 1 | # prereg 0.5.0 2 | 3 | - New template for preregistration of Registered Reports (based on: https://osf.io/93znh/). See `?rr_prereg`. (suggested by @crsh #4, PR by @LisaSpitzer, #10) 4 | - New template for preregistration for Quantitative Research in Psychology. See `?psyquant_prereg`. (PR by @LisaSpitzerZPID, #15) 5 | 6 | # prereg 0.4.0 7 | 8 | - Updates COS preregistration tempalte according to https://docs.google.com/document/d/1DaNmJEtBy04bq1l5OxS4JAscdZEkUGATURWwnBKLYxk. 9 | 10 | # prereg 0.3.0 11 | 12 | - New template based on Brandt et al. (2013). See `?brandt_prereg`. 13 | - New template based on van 't Veer and Giner-Sorolla (2016). See `?vantveer_prereg`. 14 | 15 | # prereg 0.2.0 16 | 17 | - New template based on AsPredicted.org questions. See `?aspredicted_prereg`. 18 | 19 | # prereg 0.1.0 20 | 21 | Initial release. 22 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/aspredicted_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My preregistration for AsPredicted.org" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | 22 | 23 | 24 | ## Data collection 25 | 26 | 27 | **Yes**, we already collected the data. 28 | 29 | **No**, no data have been collected for this study yet. 30 | 31 | **It's complicated.** We have already collected some data but explain in Question 8 why readers may consider this a valid **pre**-registration nevertheless. 32 | 33 | 34 | 35 | ## Hypothesis 36 | 37 | 38 | > Example: A month-long academic summer program for disadvantaged kids will reduce the drop in academic performance that occurs during the summer. 39 | 40 | 41 | ## Dependent variable 42 | 43 | 44 | > Example: Simple average GPA across all courses during the first semester after the intervention. 45 | 46 | 47 | ## Conditions 48 | 49 | 50 | > Example 1: Two conditions: Offering summer program: yes vs no. 51 | 52 | > Example 2: 12 conditions in a mixed design lab study. Participants will be assigned to one of four conditions: math training, verbal training, memory task, or control (4 between-subject conditions). Each participant will complete a math test, a verbal test, and a memory test (3 within-subject conditions). 53 | 54 | 55 | ## Analyses 56 | 57 | 58 | > Example: Linear regression predicting the simple average GPA in the semester after the intervention with a dummy variable indicating whether the participant was offered the summer program or not (intention-to-treat analysis). We will also conduct the same regression controlling for simple average GPA during the semester before the intervention, gender, & household income (an 8-point scale ranging from 1 = below $20,000 and 8 = above $150,000). 59 | 60 | 61 | ## Outliers and exclusions 62 | 63 | 64 | > Example 1: We will compute the overall mean and standard deviation across all conditions, and winsorize at 2.5 SD above/below the mean. 65 | > Example 2: We will exclude participants who incorrectly answer at least 2 of our 3 attention check questions. 66 | > Example 3: We will exclude any participants who complete the survey in less than 30 seconds. 67 | 68 | 69 | ## Sample size 70 | 71 | 72 | > Example: We will offer the program until 500 people have agreed to participate in it or until June 30, 2016 (whichever comes first). 73 | 74 | 75 | ## Other 76 | 77 | 78 | > Example: We will include a battery of questions for exploratory purposes, including life satisfaction, amount of videogame playing, and family activity. We will also provide an additional survey with 24 questions assessing achievement orientation. We will not report the results of those analyses for the project being pre-registered. 79 | > NOTE: If you leave this blank it will read 'Nothing else to pre-register.' 80 | 81 | ## Study type 82 | Finally. For record keeping purposes, please tell us the type of study you are pre-registering. 83 | 84 | * Class project or assignment 85 | * Experiment 86 | * Survey 87 | * Observational/archival study 88 | * Other: 89 | 90 | 91 | # References 92 | ## 93 | \vspace{-2pc} 94 | \setlength{\parindent}{-0.5in} 95 | \setlength{\leftskip}{-1in} 96 | \setlength{\parskip}{8pt} 97 | \noindent 98 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/aspredicted_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: AsPredicted.org preregistration (PDF) 2 | description: > 3 | Preregistration template based on the AsPredicted.org questions. 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/brandt_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My replication recipe preregistration based on Brandt et al. (2013) template" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | # The original effect 22 | 23 | ## Description 24 | 25 | 26 | Enter your response here. 27 | 28 | 29 | ## Importance 30 | 31 | 32 | Enter your response here. 33 | 34 | 35 | ## Effect size 36 | 37 | 38 | Enter your response here. 39 | 40 | 41 | ## Confidence interval 42 | 43 | 44 | Enter your response here. 45 | 46 | 47 | ## Sample size 48 | 49 | 50 | Enter your response here. 51 | 52 | 53 | ## Location 54 | 55 | 56 | Enter your response here. 57 | 58 | 59 | ## Country/Region 60 | 61 | 62 | Enter your response here. 63 | 64 | 65 | ## Kind of sample 66 | 67 | 68 | Enter your response here. 69 | 70 | 71 | ## Survey format 72 | 73 | 74 | Enter your response here. 75 | 76 | 77 | # Design of the replication study 78 | 79 | ## Materials available? 80 | 81 | 82 | **Yes** 83 | 84 | **No** 85 | 86 | 87 | ## Assumptions will hold 88 | 89 | 90 | Enter your response here. 91 | 92 | 93 | ## Location of experimenter 94 | 95 | 96 | Enter your response here. 97 | 98 | 99 | ## Experimenter knowledge 100 | 101 | 102 | Enter your response here. 103 | 104 | 105 | ## Sample size 106 | 107 | 108 | Enter your response here. 109 | 110 | 111 | ## Sample size rationale 112 | 113 | 114 | Enter your response here. 115 | 116 | 117 | # Deviations from the original study 118 | 119 | 120 | ## Instructions 121 | 122 | 123 | **Exact** 124 | 125 | **Close** 126 | 127 | **Different** 128 | 129 | 130 | ## Measures 131 | 132 | 133 | **Exact** 134 | 135 | **Close** 136 | 137 | **Different** 138 | 139 | 140 | ## Stimuli 141 | 142 | 143 | **Exact** 144 | 145 | **Close** 146 | 147 | **Different** 148 | 149 | 150 | ## Procedure 151 | 152 | 153 | **Exact** 154 | 155 | **Close** 156 | 157 | **Different** 158 | 159 | 160 | ## Location 161 | 162 | 163 | **Exact** 164 | 165 | **Close** 166 | 167 | **Different** 168 | 169 | 170 | ## Remuneration 171 | 172 | 173 | **Exact** 174 | 175 | **Close** 176 | 177 | **Different** 178 | 179 | 180 | ## Populations 181 | 182 | 183 | **Exact** 184 | 185 | **Close** 186 | 187 | **Different** 188 | 189 | 190 | ## Expected differences 191 | 192 | 193 | Enter your response here. 194 | 195 | 196 | ## Tests of differences 197 | 198 | 199 | Enter your response here. 200 | 201 | 202 | # Analysis and replication evaluation 203 | 204 | ## Exclusion criteria 205 | 206 | 207 | Enter your response here. 208 | 209 | 210 | ## Analysis plan 211 | 212 | 213 | Enter your response here. 214 | 215 | 216 | ## Successful replication 217 | 218 | 219 | Enter your response here. 220 | 221 | 222 | ## Further comments (optional) 223 | 224 | Enter your response here. 225 | 226 | 227 | # References 228 | ## 229 | \vspace{-2pc} 230 | \setlength{\parindent}{-0.5in} 231 | \setlength{\leftskip}{-1in} 232 | \setlength{\parskip}{8pt} 233 | \noindent 234 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/brandt_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: Brandt et al. replication recipe preregistration (PDF) 2 | description: > 3 | Preregistration template for social psychology based on suggestion by Brandt et al. (2013, doi: 10.1016/j.jesp.2013.10.005). 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/cos_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My preregistration for the COS Preregistration Challenge" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | # Study Information 22 | 23 | ## Title 24 | 27 | 28 | `r rmarkdown::metadata$title` 29 | 30 | 31 | ## Description 32 | 35 | 36 | Enter your response here. 37 | 38 | 39 | ## Hypotheses 40 | 43 | 44 | Enter your response here. 45 | 46 | 47 | # Design Plan 48 | 49 | 50 | 51 | ## Study type 52 | 53 | **Experiment**. A researcher randomly assigns treatments to study subjects, this includes field or lab experiments. This is also known as an intervention experiment and includes randomized controlled trials. 54 | 55 | **Observational Study**. Data is collected from study subjects that are not randomly assigned to a treatment. This includes surveys, natural experiments, and regression discontinuity designs. 56 | 57 | **Meta-Analysis**. A systematic review of published studies. 58 | 59 | **Other**. Please explain. 60 | 61 | 62 | ## Blinding 63 | 64 | 65 | No blinding is involved in this study. 66 | 67 | For studies that involve human subjects, they will not know the treatment group to which they have been assigned. 68 | 69 | Personnel who interact directly with the study subjects (either human or non-human subjects) will not be aware of the assigned treatments. 70 | 71 | Personnel who analyze the data collected from the study are not aware of the treatment applied to any given group. 72 | 73 | 74 | ## Study design 75 | 80 | 81 | Enter your response here. 82 | 83 | 84 | ## Randomization 85 | 88 | 89 | Enter your response here. 90 | 91 | 92 | # Sampling Plan 93 | 94 | 95 | 96 | ## Existing data 97 | 98 | 99 | **Registration prior to creation of data**. As of the date of submission of this research plan for preregistration, the data have not yet been collected, created, or realized. 100 | 101 | **Registration prior to any human observation of the data**. As of the date of submission, the data exist but have not yet been quantified, constructed, observed, or reported by anyone - including individuals that are not associated with the proposed study. Examples include museum specimens that have not been measured and data that have been collected by non-human collectors and are inaccessible. 102 | 103 | **Registration prior to accessing the data**. As of the date of submission, the data exist, but have not been accessed by you or your collaborators. Commonly, this includes data that has been collected by another researcher or institution. 104 | 105 | **Registration prior to analysis of the data**. As of the date of submission, the data exist and you have accessed it, though no analysis has been conducted related to the research plan (including calculation of summary statistics). A common situation for this scenario when a large dataset exists that is used for many different studies over time, or when a data set is randomly split into a sample for exploratory analyses, and the other section of data is reserved for later confirmatory data analysis. 106 | 107 | **Registration following analysis of the data**. As of the date of submission, you have accessed and analyzed some of the data relevant to the research plan. This includes preliminary analysis of variables, calculation of descriptive statistics, and observation of data distributions. Please see https://cos.io/prereg for more information. 108 | 109 | 110 | 111 | ## Explanation of existing data 112 | 117 | 118 | Enter your response here. 119 | 120 | 121 | ## Data collection procedures 122 | 127 | 128 | Enter your response here. 129 | 130 | 131 | ## Sample size 132 | 135 | 136 | Enter your response here. 137 | 138 | 139 | ## Sample size rationale 140 | 143 | 144 | Enter your response here. 145 | 146 | 147 | ## Stopping rule 148 | 153 | 154 | Enter your response here. 155 | 156 | 157 | 158 | # Variables 159 | 160 | 161 | 162 | ## Manipulated variables 163 | 166 | 167 | Enter your response here. 168 | 169 | 170 | ## Measured variables 171 | 176 | 177 | Enter your response here. 178 | 179 | 180 | ## Indices 181 | 186 | 187 | Enter your response here. 188 | 189 | 190 | # Analysis Plan 191 | 194 | 195 | 196 | ## Statistical models 197 | 205 | 206 | Enter your response here. 207 | 208 | 209 | ## Transformations 210 | 213 | 214 | Enter your response here. 215 | 216 | 217 | ## Inference criteria 218 | 223 | 224 | 225 | ## Data exclusion 226 | 229 | 230 | Enter your response here. 231 | 232 | 233 | ## Missing data 234 | 237 | 238 | Enter your response here. 239 | 240 | 241 | ## Exploratory analyses (optional) 242 | 245 | 246 | Enter your response here. 247 | 248 | 249 | # Other 250 | 251 | ## Other (Optional) 252 | 253 | 254 | Enter your response here. 255 | 256 | 257 | # References 258 | ## 259 | \vspace{-2pc} 260 | \setlength{\parindent}{-0.5in} 261 | \setlength{\leftskip}{-1in} 262 | \setlength{\parskip}{8pt} 263 | \noindent 264 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/cos_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: COS Preregistration Challenge (PDF) 2 | description: > 3 | Preregistration template based on the Center for Open Science Preregistration Challenge questions. 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/cruewell_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My preregistration for the application of cognitive models" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | # Study Information 22 | 23 | ## Description 24 | 28 | 29 | Enter your response here. 30 | 31 | 32 | ## Hypotheses 33 | 34 | 35 | Enter your response here. 36 | 37 | 38 | # Data Description for Preexisting Data 39 | 40 | 41 | 42 | ## Dataset(s) 43 | 44 | 45 | Enter your response here. 46 | 47 | 48 | ## Publically available? 49 | 50 | **Yes** 51 | 52 | **No** 53 | 54 | 55 | ## Access 56 | 57 | 58 | Enter your response here. 59 | 60 | 61 | ## Date of access 62 | 63 | Enter your response here. 64 | 65 | 66 | ## Data Source 67 | 68 | 69 | Enter your response here. 70 | 71 | 72 | ## Codebook 73 | 74 | 75 | Enter your response here. 76 | 77 | 78 | ## Survey format 79 | 80 | 81 | Enter your response here. 82 | 83 | 84 | ## Sampling and data collection 85 | 86 | 87 | Enter your response here. 88 | 89 | 90 | ## Prior work 91 | 92 | 93 | Enter your response here. 94 | 95 | 96 | ## Prior research 97 | 98 | 99 | Enter your response here. 100 | 101 | 102 | ## Prior knowledge 103 | 104 | 105 | Enter your response here. 106 | 107 | 108 | # Sampling Plan 109 | 110 | 111 | 112 | ## Data collection 113 | 114 | 117 | 118 | Enter your response here. 119 | 120 | 121 | ## Sample size 122 | 123 | 124 | Enter your response here. 125 | 126 | 127 | ## Sample size rationale 128 | 131 | 132 | Enter your response here. 133 | 134 | 135 | ## Stopping rule 136 | 139 | 140 | Enter your response here. 141 | 142 | 143 | 144 | # Design Plan 145 | 146 | 147 | ## Study type 148 | 149 | **A. Experiment --- A researcher randomly assigns treatments to study subjects, this includes field or lab experiments. This is also known as an intervention experiment and includes randomized controlled trials.** 150 | 151 | **B. Observational Study - Data is collected from study subjects that are not randomly assigned to a treatment. This includes surveys, natural experiments, and regression discontinuity designs.** 152 | 153 | **C. Other** 154 | 155 | ## Blinding 156 | 157 | 158 | **A. No blinding is involved in this study.** 159 | 160 | **B. For studies that involve human subjects, they will not know the treatment group to which they have been assigned.** 161 | 162 | **C. Personnel who interact directly with the study subjects (either human or non-human subjects) will not be aware of the assigned treatments. (Commonly known as "double blind").** 163 | 164 | **D. Personnel who analyze the data collected from the study are not aware of the treatment applied to any given group.** 165 | 166 | ## Additional blinding 167 | 168 | Enter your response here. 169 | 170 | 171 | ## Experimental design 172 | 175 | 176 | Enter your response here. 177 | 178 | 179 | ## Randomization 180 | 183 | 184 | Enter your response here. 185 | 186 | 187 | # Variables 188 | 189 | 190 | 191 | ## Manipulated variables 192 | 195 | 196 | Enter your response here. 197 | 198 | 199 | ## Measured variables 200 | 203 | 204 | Enter your response here. 205 | 206 | 207 | ## Indices 208 | 211 | 212 | Enter your response here. 213 | 214 | # Data Cleaning 215 | 216 | 217 | ## Data exclusion 218 | 221 | 222 | Enter your response here. 223 | 224 | 225 | ## Missing data 226 | 229 | 230 | Enter your response here. 231 | 232 | 233 | # Cognitive modelling 234 | 235 | ## Cognitive model 236 | 239 | 240 | Enter your response here. 241 | 242 | 243 | ## Parameter estimation 244 | 247 | 248 | Enter your response here. 249 | 250 | 251 | # Analysis plan 252 | 253 | 254 | 255 | ## Statistical analyses 256 | 259 | 260 | Enter your response here. 261 | 262 | 263 | ## Other analyses 264 | 265 | 266 | Enter your response here. 267 | 268 | 269 | ## Inference criteria 270 | 271 | 272 | Enter your response here. 273 | 274 | 275 | ## Exploratory analysis 276 | 279 | 280 | Enter your response here. 281 | 282 | 283 | ## Robustness checks/ sensitivity analyses 284 | 287 | 288 | Enter your response here. 289 | 290 | 291 | ## Contingency plans 292 | 293 | 294 | 295 | # References 296 | ## 297 | \vspace{-2pc} 298 | \setlength{\parindent}{-0.5in} 299 | \setlength{\leftskip}{-1in} 300 | \setlength{\parskip}{8pt} 301 | \noindent 302 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/cruewell_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: Crüwell & Evans application of cognitive models preregistration (PDF) 2 | description: > 3 | Preregistration template for for the application of cognitive models (Crüwell & Evans, 2021, doi: 10.1098/rsos.210155). 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/fmri_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My fMRI preregistration" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | 22 | 40 | 41 | 42 | ## Working Title 43 | 44 | Enter your response here. 45 | 46 | 47 | ## Introduction 48 | 49 | 50 | Enter your response here. 51 | 52 | 53 | ## Current Study 54 | 55 | 56 | Enter your response here. 57 | 58 | 59 | **Aims & Hypotheses** 60 | 61 | | **Essential** | **Checklist** | 62 | | ----------- | ----------- | 63 | | Hypotheses include direction of expected results | ___ | 64 | | Interactions describe expected shape | ___ or NA | 65 | | Maniputated variables include manipulation checks or explain why not | ___ or NA | 66 | 67 | | **Recommended** | **Checklist** | 68 | | ----------- | ----------- | 69 | | Figure or table to describe expected results | ___ | 70 | | Rationals or frameworks included for why certain hypotheses are being tested | ___ | 71 | | Which outcome would be predicted by which theory | ___ or NA | 72 | 73 | 74 | 75 | ## Exisiting Data 76 | 77 | 78 | - Registration prior to creation of data 79 | 80 | - Registration prior to any human observation of the data 81 | 82 | - Registration prior to accessing the data 83 | 84 | - Registration prior to analysis of the data 85 | 86 | - Registration following analysis of the data 87 | 88 | 89 | ## Explanation of Exisiting Data 90 | 92 | 93 | Enter your response here. 94 | 95 | 96 | ## Details of Larger Study 97 | 98 | **Is your preregistration part of a larger project?** 99 | 100 | - Yes 101 | - No 102 | 103 | 110 | 111 | Enter your response here. 112 | 113 | 114 | ## Data Collection Procedures 115 | 118 | 119 | **For group comparisons, what variables (if any) were equated across groups?** 120 | 121 | Enter your response here. 122 | 123 | 124 | **Study timeline** 125 | 126 | Enter your response here. 127 | 128 | | **Collection** | **Checklist** | 129 | | ----------- | ----------- | 130 | | Population | ___ | 131 | | Recruitment efforts | ___ | 132 | | Inclusion/Exclusion criteria | ___ | 133 | | Clinical criteria (if applicable) | ___ | 134 | | Matching strategy (if applicable) | ___ | 135 | | Payment for participation | ___ | 136 | | IRB, consent/assent obtained | ___ | 137 | | Number of subjects participated and analyzed | ___ | 138 | | Age | ___ | 139 | | Sex | ___ | 140 | | Handedness | ___ | 141 | 142 | 144 | 145 | 146 | ## Sample Size & Stopping Rule 147 | 148 | **Target sample size** 149 | 150 | Enter your response here. 151 | 152 | 153 | **Justification of sample size** 154 | 155 | 156 | Enter your response here. 157 | 158 | 159 | **Power analyses** (e.g., Neuropowertools, fmri power) 160 | 161 | From Nichols et al., 2016, include: 162 | 163 | | **Effect Size Estimate** | **Checklist** | 164 | | ----------- | ----------- | 165 | | Effect size used | ___ or NA* | 166 | | Source of predicted effect size (prior lit, pilot etc.) | ___ or NA* | 167 | | Significant level | ___ or NA* | 168 | | Target power | ___ or NA* | 169 | | Outcome used to calculate | ___ or NA* | 170 | 171 | 173 | 174 | **Stopping rule** 175 | 179 | 180 | Enter your response here. 181 | 182 | 183 | **Contingencies for if your target sample size is not met** 184 | 185 | 186 | Enter your response here. 187 | 188 | 189 | 190 | ## Measured Behavioral Variables 191 | 192 | 193 | 194 | **Outcome measures** 195 | 196 | Enter your response here. 197 | 198 | 199 | **Predictor measures** 200 | 201 | Enter your response here. 202 | 203 | 204 | **Covariate measures** 205 | 206 | Enter your response here. 207 | 208 | 209 | **How was behavioral task performance measured?** 210 | 211 | Enter your response here. 212 | 213 | 214 | **Contingency plans for behavioral analysis** 215 | 216 | Enter your response here. 217 | 218 | 219 | 222 | 223 | 224 | ## Additional Operational Definitions 225 | 226 | **Region Specificity** 227 | 228 | Enter your response here. 229 | 230 | 231 | **Any other definitions used across study**: 232 | 233 | Enter your response here. 234 | 235 | 236 | ## Transformations 237 | 238 | 239 | Enter your response here. 240 | 241 | 242 | **Contingency plans for transformation** 243 | 244 | Enter your response here. 245 | 246 | 247 | Code, if applicable: for scoring behavioral data. 248 | ```{r scoring behav data, include =TRUE} 249 | 250 | ``` 251 | 252 | 253 | ## Analysis Data Exclusion 254 | 261 | 262 | Enter your response here. 263 | 264 | 265 | ## Experimental Design 266 | 267 | 268 | Enter your response here. 269 | 270 | 271 | **Design Specifications** 272 | 273 | | **Design** | **Checklist** | 274 | | ----------- | --- | 275 | | Design type (task, rest; event-related, block) | ___ | 276 | | Conditions & Stimuli (detailed as possible, pictures encouraged) | ___ | 277 | | Number of blocks, trials or experimental units per session and/or subject | ___ | 278 | | Timing and Duration (length of each trial and interval between trials) | ___ | 279 | | Length of experiment (length of full scan and each run) | ___ | 280 | | Was the design optimized for efficiency, and if so, how? | ___ | 281 | | Presentation software (name, version, operating system; code if possible) | ___ | 282 | 283 | **Task Specification** 284 | 285 | | **Task** | **Checklist** | 286 | | ----------- | --- | 287 | | Instructions to subjects (what were they asked to do?) | ___ | 288 | | Stimuli (what were they; how many were there; did it repeat across trials?) | ___ | 289 | | Stimuli presentation & response collection | ___ | 290 | | Randomization/pseudo-randomized (why/why not done & how) | ___ | 291 | | Run order (of tasks within scanner) | ___ | 292 | 293 | 295 | 296 | 297 | 298 | ## Data acquisition 299 | 300 | 301 | **Set up & Acquisitions** 302 | 303 | | **Set up & Acquisitions** | **Checklist** | 304 | | ----------- | --- | 305 | | **Participant Preparation** 306 | | Mock scanning (Report type of mock scanner and protocol; i.e. duration, types of sim scans, exper) | ___ or NA | 307 | | Specific accommodations (e.g., pediatric, parent present? Asleep?) | ___ or NA | 308 | | Experimental personnel (number of planned personnel to interact with subjects) | ___ or NA | 309 | | **MRI System** 310 | | Manufacturer, field strength (in Tesla), model name | ___ | 311 | | **MRI acquisition** 312 | | Pulse sequence (gradient/spin echo etc.) | ___ | 313 | | Image type (EPI, spiral, 3D etc.) | ___ | 314 | | **Essential sequence & imaging parameters** 315 | | *For All* 316 | | Echo time (TE) | ___ | 317 | | Repetition time (TR) | ___ | 318 | | For multi-shot acquisitions, additionally the time per volume | ___ or NA | 319 | | Flip angle (FA) | ___ | 320 | | Acquisition time (duration of acquisition) | ___ | 321 | | *Functional MRI* 322 | | Number of volumes | ___ | 323 | | *Inversion Recovery Sequences* 324 | | Sparse sampling delay (delay in TR) if used | ___ or NA | 325 | | *B0 Field Maps* 326 | | Inversion time (TI) for inversion recovery sequence | ___ or NA | 327 | | Echo time difference (dTE). Diffusion MRI | ___ or NA | 328 | | Number of directions | ___ or NA | 329 | | Direction optimization, if used and type | ___ or NA | 330 | | b-values | ___ or NA | 331 | | Number of b=0 images | ___ or NA | 332 | | Number of averages (if any) | ___ or NA | 333 | | Single shell, multi-shell (specify equal or unequal spacing) | ___ or NA | 334 | | Single- or dual-spin-echo, gradient mode (serial or parallel) | ___ or NA | 335 | | If cardiac gating used | ___ or NA | 336 | | *Imaging Parameters* 337 | | Field of view | ___ or NA | 338 | | In-plane matrix size, slice thickness and interslice gap, for 2D acquisitions | ___ or NA | 339 | | Slice orientation (Axial, sagittal, coronal or oblique) | ___ or NA | 340 | | Angulation: If acquistion not aligned with scanner axes, specified | ___ or NA | 341 | | angulation to AC-PC line (see Slice position procedure) | ___ or NA | 342 | | 3D matrix size, for 3D acquisitions | ___ or NA | 343 | | **Additional sequence & imaging parameters** 344 | | Phase encoding | ___ or NA | 345 | | Parallel imaging method & parameters | ___ or NA | 346 | | Multiband parameters | ___ or NA | 347 | | Readout parameters | ___ or NA | 348 | | Fat suppression (for anatomical, state if used) | ___ or NA | 349 | | Shimming | ___ or NA | 350 | | Slice order & timing | ___ or NA | 351 | | Brain coverage (e.g., whole brain, was cerebellum, brain stem included) | ___ or NA | 352 | |Scanner-side preprocessing* | ___ or NA | 353 | | Scan duration (in seconds) | ___ or NA | 354 | Other non-standard procedures | ___ or NA | 355 | | T1 stabilization (discarded "dummy" scans acquired discarded by scanner) | ___ or NA | 356 | |Diffusion MRI gradient table (Also referred to as the b-matrix, but not to be confused with the 3x3 matrix that describes diffusion weighting for a single diffusion weighted measurement) scanner-side preprocessing: (e.g., Including: Reconstruction matrix size differing from acquisition matrix size; Prospective-motion correction (including details of any optical tracking, and how motion parameters are used); Signal inhomogeneity correction; Distortion-correction.) | ___ or NA | 357 | 358 | | **Perfusion: Arterial Spin Labelling MRI** | **Checklist** | 359 | | ----------- | ----- | 360 | | ASL Labelling method (e.g. continuous ASL (CASL), pseudo-continuous ASL (PCASL), Pulsed ALS (PASL), velocity selective ASL (VSASL) | ___ or NA | 361 | | Use of background suppression pulses and their timing | ___ or NA | 362 | | label duration | ___ or NA if not PCASL or CASL | 363 | | Label Duration | ___ or NA if not PCASL or CASL | 364 | | Post labeling delay (PLD) | ___ or NA if not PCASL or CASL | 365 | | Location of the labeling plane | ___ or NA | 366 | | Average labeling gradient | ___ or NA if not PCASL | 367 | | Slice-selective labeling gradient | ___ or NA if not PCASL | 368 | | Flip angle of B1 pulses | ___ or NA if not PCASL| 369 | | Assessment of inversion efficiency | ___ or NA if not PCASL 370 | | QC used to ensure off-resonance artifacts not problematic | ___ or NA if not PCASL| 371 | | signal obtained over whole brain | ___ or NA if not PCASL | 372 | | Use of a separate labeling coil | ___ or NA if not CASL | 373 | | Control scan/pulse used | ___ or NA if not CASL | 374 | | B1 amplitude | ___ or NA if not CASL | 375 | | TI | ___ or NA if not PASL | 376 | | Labeling slab thickness | ___ or NA if not PASL | 377 | | Use of QUIPSS pulses and their timing | ___ or NA if not PASL | 378 | | TI | ___ or NA if not VSASL | 379 | | Choice of velocity selection cutoff ("VENC") | ___ or NA if not VSASL | 380 | | **Perfusion: Dynamic Susceptibility Contrast MRI** 381 | | Number of baseline volumes | ___ or NA if not Perfusion: Dynamic Susceptibility Contrast MRI | 382 | | Type, name and manufacturer of intravenous bolus (e.g. gadobutrol, Gadavist, Bayer) | ___ or NA if not Perfusion: Dynamic Susceptibility Contrast MRI | 383 | | Bolus amount and concentration (e.g. 0.1 ml/kg and 0.1 mmol/kg). - Injection rate (e.g. 5 ml/s) | ___ or NA if not Perfusion: Dynamic Susceptibility Contrast MRI | 384 | | Post-injection of saline (e.g. 20 ml) | ___ or NA if not Perfusion: Dynamic Susceptibility Contrast MRI | 385 | | Injection method (e.g. power injector) | ___ or NA if not Perfusion: Dynamic Susceptibility Contrast MRI | 386 | 387 | 389 | 390 | 391 | ## Preprocessing 392 | 393 | 394 | **Preliminary quality control** 395 | 396 | | **Preliminary quality control** | **Checklist** | 397 | | ----------- | --- | 398 | | Motion monitoring (For functional or diffusion acquisitions, any visual or quantitative checks for severe motion; likewise, for structural images, checks on motion or general image quality.) | ___ | 399 | | Incidental findings (Protocol for review of any incidental findings, and how they are handled in particular with respect to possible exclusion of a subject's data.) | ___ | 400 | 401 | **Data preprocessing** 402 | 403 | ___ For each piece of software used, give the version number (or, if no version number is available, date of last application of updates) 404 | 405 | ___ If any subjects required different processing operations or settings in the analysis, those differences should be specified explicitly 406 | 407 | | **Pre-processing: general** | **Checklist** | 408 | | ----------- | --- | 409 | | Specify order of preprocessing operations | ___ | 410 | | Describe any data quality control measures | ___ | 411 | | Unwarping of B0 distortions | ___ | 412 | | Slice timing correction | ___ | 413 | | Reference slice and type of interpolation used (e.g., "Slice timing correction to the first slice as performed, using SPM5's | Fourier phase shift interpolation") | ___ | 414 | | Motion correction | ___ | 415 | | Reference scan, image similarity metric, type of interpolation used, degrees-of-freedom (if not rigid body) and, ideally, optimization method, e.g., "Head motion corrected with FSL's MCFLIRT by maximizing the correlation ratio between each timepoint and the middle volume, using linear interpolation." | ___ | 416 | | Motion susceptibility correction used | ___ | 417 | | Smoothing | ___ | 418 | | Size and type of smoothing kernel (provide justification for size; e.g., for a group study, "12 mm FHWM Gaussian smoothing applied to ameliorate differences in intersubject localization"; for single subject fMRI "6 mm FWHM Gaussian smoothing used | to reduce noise") | ___ | 419 | 420 | 421 | | **Intersubject registration** | **Checklist** | 422 | | ----------- | --- | 423 | | Intersubject registration method used | ___ | 424 | | Illustration of the voxels present in all subjects ("mask image") can be helpful, particularly for restricted fields of view (to illustrate overlap of slices across all subjects). Better still would be an indication of average BOLD sensitivity within each voxel in the mask | ___ | 425 | | Transformation model and optimization | ___ | 426 | | Transformation model (linear/affine, nonlinear), type of any non-linear transformations (polynomial, discrete cosine basis), number of parameters (e.g., 12 parameter affine, 3 x 2 x 3 DCT basis), regularization, image-similarity metric, and interpolation method | ___ | 427 | | Object image information (image used to determine transformation to atlas) | ___ | 428 | | Anatomical MRI? Image properties (see above) | ___ | 429 | | Co-planar with functional acquisition? | ___ | 430 | | Functional acquisition co-registered to anatomical? if so, how? | ___ | 431 | | Segmented gray image? | ___ | 432 | | Functional image (single or mean) | ___ | 433 | | Atlas/target information | ___ | 434 | | Brain image template space, name, modality and resolution (e.g., "FSL's MNI Avg152, T1 2 x 2 x 2 mm"; "SPM2's MNI gray matter template 2 x 2 x 2 mm") | ___ | 435 | | Coordinate space | ___ | 436 | | (Typically MNI, Talairach, or MNI converted to Talairach | ___ | 437 | | If MNI converted to Talairach, what method? e.g., Brett's mni2tal? | ___ | 438 | | How were anatomical locations (e.g., gyral anatomy, Brodmann areas) determined? (e.g., paper atlas, Talairach Daemon, manual inspection of individuals' anatomy, etc.) | ___ | 439 | | Smoothing | ___ | 440 | | Size and type of smoothing kernel (provide justification for size; e.g., for a group study, "12 mm FHWM Gaussian smoothing applied to ameliorate differences in intersubject localization"; for single subject fMRI "6 mm FWHM Gaussian smoothing used | to reduce noise") | ___ | 441 | 442 | 444 | 445 | 446 | ## Statistical modeling 447 | 448 | 449 | **Planned comparison** 450 | 451 | 452 | Enter your response here. 453 | 454 | 455 | **General issues** 456 | 458 | 459 | Enter your response here. 460 | 461 | 462 | **First level (fx) modeling** 463 | 464 | | **First level (fx) modeling** | **Checklist** | 465 | | ----------- | --- | 466 | | *Event related design predictors* 467 | | Modeled duration, if other than zero | ___ | 468 | | Parametric modulation | ___ | 469 | | Block Design predictors(Note whether baseline was explicitly modeled) | ___ | 470 | | *HRF basis, typically one of*: 471 | | Canonical only | ___ | 472 | | Canonical plus temporal derivative | ___ | 473 | | Canonical plus temporal and dispersion derivative. Smooth basis (e.g. SPM "informed" or Fourier basis; FSL's FLOBS) | ___ | 474 | | Finite Impulse Response model | ___ | 475 | | Drift regressors (e.g. DCT basis in SPM, with specified cut-off) | ___ | 476 | | Movement regressors; specify if squares and/or temporal derivative used | ___ | 477 | | Any other nuisance regressors, and whether they were entered as interactions (e.g. with a task effect in 1st level fMRI, or with group effect) | ___ | 478 | | Any orthogonalization of regressors, and set of other regressors used to orthogonalize against | ___ | 479 | | Contrast construction (Exactly what terms are subtracted from what? Define these in terms of task or stimulus conditions (e.g., using abstract names such as AUDSTIM, VISSTIM) instead of underlying psychological concepts | ___ | 480 | | Autocorrelation model type (e.g., AR(1), AR(1) + WN, or arbitrary autocorrelation function), and whether global or local (e.g., for SPM2/SPM5, ‘Approximate AR(1) autocorrelation model estimated at omnibus F-significant voxels (P < 0.001), used globally over the whole brain'; for FSL, ‘Autocorrelation function estimated locally at each voxel, tapered and regularized in space.') | ___ | 481 | 482 | 483 | **Second level (group) modeling** 484 | 485 | | **Second level (group) modeling** | **Checklist** | 486 | | ----------- | --- | 487 | | Statistical model and estimation method, inference type (mixed/random effects or fixed), e.g., "Mixed effects inference with one sample t-test on summary statistic" (SPM2/SPM5), e.g., "Mixed effects inference with Bayesian 2-level model with fast approximation to posterior probability of activation." (FSL) 488 | If fixed effects inference used, justify | ___ | 489 | | If more than 2-levels, describe the levels and assumptions of the model (e.g., are variances assumed equal between groups) | ___ | 490 | | Repeated measures? 491 | If multiple measurements per subject, list method to account for within subject correlation, exact assumptions made about correlation/variance e.g., SPM: "Within-subject correlation estimated at F-significant voxels (P <0.001), then used globally over whole brain"; or, if variances for each measure are allowed to vary, "Within-subject correlation and relative variance estimated…" | ___ | 492 | | *For group model with repeated measures, specify:* 493 | | How condition effects are modeled (e.g. as factors, or as linear trends) | ___ | 494 | | Whether subject effects are modeled (i.e. as regressors, as opposed to 495 | with a covariance structure) | ___ | 496 | | For group effects: clearly state whether or not covariates are split by group (i.e. fit as a group-by-covariate interaction) 497 | | *Model type (Some suggested terms include:* 498 | | "Mass Univariate" | ___ | 499 | | "Multivariate" (e.g. ICA on whole brain data) | ___ | 500 | | "Mass Multivariate" (e.g. MANOVA on diffusion or morphometry tensor data) | ___ | 501 | | "Local Multivariate" (e.g. "searchlight") | ___ | 502 | | "Multivariate, intra-subject predictive" (e.g. classify individual trials in 503 | event-related fMRI) | ___ | 504 | | "Multivariate inter-subject predictive" (e.g. classify subjects as patient vs. 505 | control) | ___ | 506 | | "Representational Similarity Analysis") | ___ | 507 | | Model settings (The essential details of the model For mass univariate, first level fMRI, these include: 508 | | Drift model, if not already specified as a dependent variable (e.g. locally linear detrending of data & regressors, as in FSL) | ___ | 509 | | Autocorrelation model (e.g. global approximate AR(1) in SPM; locally regularized autocorrelation function in FSL) | ___ | 510 | | *For mass univariate second level fMRI these include:* 511 | | Fixed effects (all subjects' data in one model) | ___ | 512 | | Random or mixed-effects model, implemented with: 513 | | Ordinary least squares (OLS, aka unweighted summary statistics approach; SPM default, FSL FEAT's "Simple OLS") | ___ | 514 | | weighted least squares (i.e. FSL FEAT's "FLAME 1"), using voxel-wise estimate of between subject variance | ___ | 515 | | Global weighted least squares (i.e. SPM's MFX) | ___ | 516 | | With any group (multi-subject) model, indicate any specific variance structure, e.g. 517 | | Un-equal variance between groups (and if globally pooled, as in SPM) | ___ | 518 | | If repeated measures, the specific covariance structure assumed (e.g. 519 | compound symmetric, or arbitrary; if globally pooled) | ___ | 520 | | *For local-multivariate report:* 521 | | The number of voxels in the local model | ___ | 522 | | Local model used (e.g. Canonical Correlation Analysis) with any 523 | constraints (e.g. positive weights only) | ___ | 524 | 525 | 526 | **ROI analysis** 527 | 528 | | **ROI analysis** | **Checklist** | 529 | | ----------- | --- | 530 | | How were ROIs defined (e.g., functional, anatomical, parcel localizer)? | ___ | 531 | | How was signal extracted within ROI? (e.g., average parameter estimates, FIR deconvolution?) | ___ | 532 | | If percent signal change reported, how was scaling factor determined (e.g., height of block regressor or height of isolated event regressor)? | ___ | 533 | | Is change relative to voxel-mean, or whole-brain mean? | ___ | 534 | | Justify definition of ROI and analysis conducted with it: (e.g., if your ROI is defined based on the cluster; how will you ensure your ROI analyses are not circular?) | ___ | 535 | 536 | 537 | 538 | Enter your response here. 539 | 540 | 542 | 543 | 544 | ## Statistical inference 545 | 546 | 547 | **Statistical inference** 548 | 549 | | **Statistical inference** | **Checklist**| 550 | | ----------- | --- | 551 | | Search region (Type of search region for analysis, and the volume in voxels or CC) | ___ or NA | 552 | | If not whole brain, state how region was determined; method for constructing region should be independent of present statistic image | ___ or NA | 553 | | Whole brain or "small volume"; carefully describe any small volume correction used for each contrast | ___ or NA | 554 | | If a small-volume correction mask is defined anatomically, provide named anatomical regions from a publicly available ROI atlas | ___ or NA | 555 | | If small-volume correction mask is functionally defined, clearly describe the functional task and identify any risk of circularity | ___ or NA | 556 | | All small-volume corrections should be fully described in the methods section, not just mentioned in passing in the results | ___ or NA | 557 | | Statistical type (Typically one of: 558 | | Voxel-wise (aka peak-wise in SPM) | ___ or NA | 559 | | Cluster-wise | ___ or NA | 560 | | Cluster size | ___ or NA | 561 | | Cluster mass | ___ or NA | 562 | | Threshold-free Cluster Enhancement (TFCE) | ___ or NA | 563 | | *For cluster size or mass, report:* 564 | | Cluster-forming threshold | ___ or NA | 565 | | For all cluster-wise methods, report: 566 | | Neighborhood size used to form clusters (e.g. 6, 18 or 26) | ___ or NA | 567 | | *For TFCE, report:* 568 | | Use of non-default TFCE parameters.) | ___ or NA | 569 | | P value computation (Report if anything but standard parametric inference used to obtain (uncorrected) P-values. If nonparametric method was used, report method (e.g. permutation or bootstrap) and number of permutations/samples used.) 570 | Multiple test correction (For mass-univariate, specify the type of correction and how it is obtained, especially if not the typical usage.) | ___ or NA | 571 | | Usually one of: 572 | | *Familywise Error * 573 | | Random Field Theory (typical) | ___ or NA | 574 | | Permutation | ___ or NA | 575 | | Monte Carlo | ___ or NA | 576 | | Bonferroni | ___ or NA | 577 | | *False Discovery Rate * 578 | | Benjamini & Hochberg FDR (typical) | ___ or NA | 579 | | Positive FDR | ___ or NA | 580 | | Local FDR | ___ or NA | 581 | | Cluster-level FDR | ___ or NA | 582 | | None/Uncorrected | ___ or NA | 583 | | If permutation or Monte Carlo, report the number of permutations/samples. If Monte Carlo, note the brain mask and smoothness used, and how smoothness was estimated | ___ or NA | 584 | | If correction is limited to a small volume, the method for selecting the region should be stated explicitly | ___ or NA | 585 | | If no formal multiple comparisons method is used, the inference must be explicitly labeled "uncorrected." | ___ or NA | 586 | | If FWE found by random field theory list the smoothness in mm FWHM and the RESEL count | ___ or NA | 587 | | If FWE found by simulation (e.g., AFNI AlphaSim), provide details of parameters for simulation | ___ or NA | 588 | | If not a standard method, specify the method for finding significance (e.g., "Custom in-lab software was used to construct statistic maps and thresholded at FDR< 0.05 (Benjamini and Hochberg, 1995)" | ___ or NA | 589 | | If cluster-wise significance, state cluster-defining threshold (e.g., P = 0.001) | ___ or NA | 590 | | *False negative discussion * 591 | |Any discussion of failure to reject the null hypothesis (e.g., lack of activation in a particular region) should be accompanied by SNR or effect size of the actually observed effect (allows reader to infer power to estimate an effect) | ___ or NA | 592 | 593 | 594 | **Functional Connectivity** 595 | 596 | | **Functional Connectivity** | **Checklist** | 597 | | ----------- | --- | 598 | | Confound adjustment & filtering Report: 599 | | Method for detecting movement artifacts, movement-related variation, and remediation (e.g. ‘scrubbing', ‘despiking', etc) | ___ or NA | 600 | | Use of global signal regression, exact type of global signal used and how it 601 | was computed | ___ or NA | 602 | | Whether a high or lowpass temporal filtering is applied to data, and at which point in the analysis pipeline. Note, any temporal regression model using filtered data should have its regressors likewise filtered | ___ or NA | 603 | | *Multivariate method: Independent Component Analysis Report:* 604 | | Algorithm to estimate components | ___ or NA | 605 | | Number of components (if fixed), or algorithm for estimating number of 606 | components | ___ or NA | 607 | | If used, method to synthesize multiple runs | ___ or NA | 608 | | Sorting method of IC's, if any | ___ or NA | 609 | | Detailed description of how components were chosen for further analysis | ___ or NA | 610 | | Dependent variable definition 611 | | *For seed--based analyses report:* 612 | | Definition of the seed region(s) | ___ or NA | 613 | | Rationale for choosing these regions | ___ or NA | 614 | | *For region--based analyses report:* 615 | | Number of ROIs | ___ or NA | 616 | | How the ROI's are defined (e.g. citable anatomical atlas; auxiliary fMRI 617 | experiments); note if ROIs overlap | ___ or NA | 618 | | Assignment of signals to regions (i.e. how a time series is obtained from 619 | each region, e.g. averaging or first singular vector) | ___ or NA | 620 | | Note if considering only bilateral (L+R) merged regions | ___ or NA | 621 | | Note if considering only interhemispheric homotopic connectivity | ___ or NA | 622 | | *Functional connectivity measure/model Report:* 623 | | Measure of dependence used, e.g. Pearson's (full) correlation, partial correlation, mutual information, etc; also specify: 624 | | Use of Fisher's Z-transform (Yes/No) and, if standardised, effective N is used to compute standard error (to account for any filtering operations on the data) | ___ or NA | 625 | | Estimator used for partial correlation | ___ or NA | 626 | | Estimator used for mutual information | ___ or NA | 627 | | Regression model used to remove confounding effects (Pearson or partial correlation) | ___ or NA | 628 | | *Effectivity connectivity Report:* 629 | | Model | ___ or NA | 630 | | Algorithm used to fit model | ___ or NA | 631 | | If per subject model, method used to generalize inferences to population. Itemize models considered, and method used for model comparison | ___ or NA | 632 | | *Graph analysis* 633 | | Report the ‘dependent variable' and ‘functional connectivity measure' used (see above). Specify either: 634 | | Weighted graph analysis or | ___ or NA | 635 | | Binarized graph analysis is used, clarifying the method used for thresholding (e.g. a 10% density threshold, or a statistically -defined threshold); consider the sensitivity of your findings to the particular choice of threshold used | ___ or NA | 636 | | Itemise the graph summaries used (e.g. clustering coefficient, efficiency, etc), whether these are global or per-node/per-edge summaries. In particular with fMRI or EEG, clarify if measures applied to individual subject networks or group networks | ___ or NA | 637 | 638 | 640 | 641 | 642 | ## Follow-up Analyses 643 | 644 | 645 | Enter your response here. 646 | 647 | 648 | ## Exploratory Analyses 649 | 650 | 651 | Enter your response here. 652 | 653 | 654 | 655 | 656 | # References 657 | ## 658 | \vspace{-2pc} 659 | \setlength{\parindent}{-0.5in} 660 | \setlength{\leftskip}{-1in} 661 | \setlength{\parskip}{8pt} 662 | \noindent 663 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/fmri_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: fMRI preregistration template (PDF) 2 | description: > 3 | Knit a PDF document using the fMRI preregistration template suggested by Jessica Flannery (https://osf.io/maqwc/). 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/prp_quant_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My preregistration based on the Psychological Research Preregistration-Quantitative (aka PRP-QUANT) Template^[This document was created using the Psychological Research Preregistration-Quantitative (aka PRP-QUANT) Template, version 2 (available at https://www.psycharchives.org/). The template was developed by 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). This work is licensed under the CC BY 4.0 license (https://creativecommons.org/licenses/by/4.0/). Thus, you are free to share and adapt the content, given that you attribute the source and indicate if changes were made.]" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | 25 | 26 | 27 | \newpage 28 | # Title and title page 29 | 30 | ## T1 31 | ### Title 32 | 33 | 34 | Enter your response here. 35 | 36 | 37 | ## T2 38 | ### Contributors, Affiliations, and Persistent IDs (recommend ORCID iD) 39 | 40 | 41 | Enter your response here. 42 | 43 | 44 | 47 | 48 | 49 | ## T6 50 | ### Estimated duration of project 51 | 52 | 53 | Enter your response here. 54 | 55 | 56 | ## T7 57 | ### IRB Status (Institutional Review Board/Independent Ethics Committee/Ethical Review Board/Research Ethics Board) 58 | 59 | 60 | Enter your response here. 61 | 62 | 63 | ## T8 64 | ### Conflict of Interest Statement 65 | 66 | 67 | Enter your response here. 68 | 69 | 70 | ## T9 71 | ### Keywords 72 | 73 | 74 | Enter your response here. 75 | 76 | 77 | ## T10 78 | ### Data accessibility statement and planned repository 79 | 80 | **We plan to make the data available:** 81 | 82 | - yes 83 | - no 84 | 85 | ### Planned data availability level: 86 | 87 | - Data access via download; usage of data for all purposes (public use file) 88 | - Data access via download; usage of data restricted to scientific purposes (scientific use file) 89 | - Data access via download; usage of data has to be agreed and defined on an individual case basis 90 | - Data access via secure data center (no download, usage/analysis only in a secure data center) 91 | - Data available upon email request by member of scientific community 92 | - Other 93 | 94 | 95 | ## T11 96 | ### Optional: Code availability 97 | 98 | **We plan to make the code available:** 99 | 100 | - yes 101 | - no 102 | 103 | ### Planned code availability level: 104 | 105 | - Code access via download; usage of code for all purposes (public use file) 106 | - Code access via download; usage of code restricted to scientific purposes (scientific use file) 107 | - Code access via download; usage of code has to be agreed and defined on an individual case basis 108 | - Code access via secure data center (no download, usage/analysis only in a secure data center) 109 | - Code available upon email request by member of scientific community 110 | - Other 111 | 112 | 113 | ## T12 114 | ### Optional: Standard lab practices 115 | 116 | 117 | **We plan to make the standard lab practices available:** 118 | 119 | - yes 120 | - no 121 | 122 | ### Planned standard lab practices availability level: 123 | 124 | - Standard lab practices access via download; usage of standard lab practices for all purposes (public use file) 125 | - Standard lab practices access via download; usage of standard lab practices restricted to scientific purposes (scientific use file) 126 | - Standard lab practices access via download; usage of standard lab practices has to be agreed and defined on an individual case basis 127 | - Standard lab practices access via secure data center (no download, usage/analysis only in a secure data center) 128 | - Standard lab practices available upon email request by member of scientific community 129 | - Other 130 | 131 | 132 | 133 | \newpage 134 | # Abstract 135 | 136 | 137 | ## A1 138 | ### Background 139 | 140 | 141 | Enter your response here. 142 | 143 | 144 | ## A2 145 | ### Objectives and Research questions 146 | 147 | 148 | Enter your response here. 149 | 150 | 151 | ## A3 152 | ### Participants 153 | 154 | 155 | Enter your response here. 156 | 157 | 158 | ## A4 159 | ### Study method 160 | 161 | 162 | Enter your response here. 163 | 164 | 165 | 166 | \newpage 167 | # Introduction 168 | 169 | 170 | ## I1 171 | ### Theoretical background 172 | 173 | 174 | Enter your response here. 175 | 176 | 177 | ## I2 178 | ### Objectives and Research question(s) 179 | 180 | 181 | Enter your response here. 182 | 183 | 184 | ## I3 185 | ### Hypothesis (H1, H2, ...) 186 | 187 | 188 | Enter your response here. 189 | 190 | 191 | ## I4 192 | ### Exploratory research questions 193 | 195 | 196 | Enter your response here. 197 | 198 | 199 | 200 | \newpage 201 | # Method 202 | 203 | ## M1 204 | ### Time point of registration 205 | 206 | 207 | - Registration prior to creation of data 208 | - Registration prior to any human observation of the data 209 | - Registration prior to accessing the data 210 | - Registration prior to analysis of the data 211 | - Other 212 | 213 | 214 | ## M2 215 | ### Proposal: Use of pre-existing data (re-analysis or secondary data analysis) 216 | 217 | 218 | Enter your response here. 219 | 220 | 221 | # Sampling Procedure and Data Collection 222 | 223 | ## M3 224 | ### Sample size, power and precision 225 | 226 | 227 | Enter your response here. 228 | 229 | 230 | ## M4 231 | ### Participant recruitment, selection, and compensation 232 | 233 | 234 | Enter your response here. 235 | 236 | 237 | ## M5 238 | ### How will participant drop-out be handled? 239 | 240 | 241 | Enter your response here. 242 | 243 | 244 | ## M6 245 | ### Masking of participants and researchers 246 | 247 | 248 | Enter your response here. 249 | 250 | 251 | ## M7 252 | ### Data cleaning and screening 253 | 254 | 255 | Enter your response here. 256 | 257 | 258 | ## M8 259 | ### How will missing data be handled? 260 | 261 | 262 | Enter your response here. 263 | 264 | 265 | ## M9 266 | ### Other information (optional) 267 | 268 | 269 | 270 | # Conditions and design 271 | 272 | ## M10 273 | ### Type of study and study design 274 | 275 | 276 | Enter your response here. 277 | 278 | 279 | ## M11 280 | ### Randomization of participants and/or experimental materials 281 | 282 | 283 | Enter your response here. 284 | 285 | 286 | ## M12 287 | ### Measured variables, manipulated variables, covariates 288 | 289 | 290 | Enter your response here. 291 | 292 | 293 | ## M13 294 | ### Study Materials 295 | 296 | 297 | Enter your response here. 298 | 299 | 300 | ## M14 301 | ### Study Procedures 302 | 303 | 304 | Enter your response here. 305 | 306 | 307 | ## M15 308 | ### Other information (optional) 309 | 310 | Enter your response here. 311 | 312 | 313 | 314 | \newpage 315 | # Analysis Plan 316 | 317 | 318 | ## AP1 319 | ### Criteria for post-data collection exclusion of participants, if any 320 | 321 | 322 | Enter your response here. 323 | 324 | 325 | ## AP2 326 | ### Criteria for post-data collection exclusions on trial level (if applicable) 327 | 328 | 329 | Enter your response here. 330 | 331 | 332 | ## AP3 333 | ### Data preprocessing 334 | 335 | 336 | Enter your response here. 337 | 338 | 339 | ## AP4 340 | ### Reliability analysis (if applicable) 341 | 342 | 343 | Enter your response here. 344 | 345 | 346 | ## AP5 347 | ### Descriptive statistics 348 | 349 | 350 | 351 | ## AP6 352 | ### Statistical models (provide for each hypothesis if varies) 353 | 354 | 355 | Enter your response here. 356 | 357 | 358 | ## AP7 359 | ### Inference criteria 360 | 361 | 362 | Enter your response here. 363 | 364 | 365 | ## AP8 366 | ### Exploratory analysis (optional) 367 | 368 | 369 | Enter your response here. 370 | 371 | 372 | ## AP9 373 | ### Other information (optional) 374 | 375 | Enter your response here. 376 | 377 | 378 | 379 | # Other 380 | 382 | 383 | ## O1 384 | ### Other information (optional) 385 | 386 | 387 | Enter your response here. 388 | 389 | 390 | 391 | 405 | 406 | \newpage 407 | # References 408 | ## 409 | \vspace{-2pc} 410 | \setlength{\parindent}{-0.5in} 411 | \setlength{\leftskip}{-1in} 412 | \setlength{\parskip}{8pt} 413 | \noindent 414 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/prp_quant_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: Psychological Research Preregistration-Quantitative (aka PRP-QUANT) Template (PDF) 2 | description: > 3 | As an international effort toward increasing psychology’s commitment to creating a stronger culture and practice of preregistration, a multi-society Preregistration Task Force* was formed, following the 2018 meeting of the German Psychological Society in Frankfurt, Germany. The Task Force created a detailed preregistration template that benefited from the APA JARS Quantitative Research guidelines, as well as a comprehensive review of many other preregistration templates. 4 | The PRP_QUANT template ist available at PsychArchives (http://dx.doi.org/10.23668/psycharchives.4463), in its current (and previous) version(s). There, the template can be downloaded as .xlsx (Microsoft Excel), .docx (Microsoft Word), .odt (Libre Office) or .ipynb (JupyterLab) file or it can be filled out online via https://forms.gle/9YgAoJn4ZYPXtHGk9 (a PDF will be automatically generated and sent via email). 5 | For more information about preregistration and the template in particular, we recommend watching the following webinar: http://bit.ly/PreRegWebinar (or browse the slides via the link under "related items" at PsychArchives). It shows the launch of the template on October 27, 2020, featuring two keynote speakers: Simine Vazire of University of Melbourne, and E. J. Wagenmakers of University of Amsterdam. 6 | *Preregistration Task Force members from the American Psychological Association (APA): Fred Oswald - Open Science and Methodology Committee Member; Rose Sokol-Chang - Publisher, APA Journals and Books; Amanda Clinton - Director, APA International Affairs, from the British Psychological Society (BPS): Daryl O'Connor - Chair of the BPS Research Board; Lisa Coulthard - Head of Research and Impact, from the German Psychological Society (DGP): Christian Fiebach - Secretary and Open Science Committee Member, from the Leibniz Institute for Psychology (ZPID): Michael Bosnjak - Director; Stefanie Müller - Head of study planning, data collection, and data analysis services; Camila Azúa - Research Assistant, from the Center for Open Science (COS): David Mellor - Director of Policy Initiatives. 7 | This work is licensed under the CC BY 4.0 license (https://creativecommons.org/licenses/by/4.0/). Thus, you are free to share and adapt the content, given that you attribute the source (see http://dx.doi.org/10.23668/psycharchives.4320) and indicate if changes were made. 8 | create_dir: false 9 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/rr_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My preregistration for a Registered Report" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | 22 | 23 | 24 | ## Main question 25 | 27 | 28 | Enter your response here. 29 | 30 | 31 | ## Dependent variable(s) 32 | 33 | 34 | Enter your response here. 35 | 36 | 37 | ## Hypotheses 38 | 39 | 40 | Enter your response here. 41 | 42 | 43 | ## Conditions 44 | 45 | 46 | Enter your response here. 47 | 48 | 49 | ## Data collection 50 | 51 | 52 | Enter your response here. 53 | 54 | 55 | ## Inclusion criteria 56 | 57 | 58 | Enter your response here. 59 | 60 | 61 | ## Exclusion criteria 62 | 63 | 64 | Enter your response here. 65 | 66 | 67 | ## Quality checks 68 | 69 | 70 | Enter your response here. 71 | 72 | 73 | ## Confirmatory analyses 74 | 76 | 77 | Enter your response here. 78 | 79 | 80 | ## Data type 81 | 82 | 83 | Enter your response here. 84 | 85 | 86 | 87 | 88 | 89 | 112 | 113 | 114 | # References 115 | ## 116 | \vspace{-2pc} 117 | \setlength{\parindent}{-0.5in} 118 | \setlength{\leftskip}{-1in} 119 | \setlength{\parskip}{8pt} 120 | \noindent 121 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/rr_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: Registered Report Protocol Preregistration (PDF) 2 | description: > 3 | Preregistration template for Preregistration of Registered Reports. 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/vantveer_prereg/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title : "My social psychology preregistration based on van 't Veer and Giner-Sorolla (2016) template" 3 | shorttitle : "My preregistration" 4 | date : "`r Sys.setlocale('LC_TIME', 'C'); format(Sys.time(), '%d\\\\. %B %Y')`" 5 | 6 | author: 7 | - name : First Author 8 | affiliation : 1 9 | - name : Ernst-August Doelle 10 | affiliation : "1,2" 11 | 12 | affiliation: 13 | - id : 1 14 | institution : Wilhelm-Wundt-University 15 | - id : 2 16 | institution : Konstanz Business School 17 | 18 | output: prereg::prereg_pdf 19 | --- 20 | 21 | # Hypotheses 22 | 23 | ## Predictions 24 | 25 | 26 | Enter your response here. 27 | 28 | 29 | ## Rationale (optional) 30 | 31 | 32 | Enter your response here. 33 | 34 | 35 | # Methods 36 | 37 | ## Design 38 | 43 | 44 | Enter your response here. 45 | 46 | 47 | ## Planned sample 48 | 49 | 50 | Enter your response here. 51 | 52 | 53 | ## Exclusion criteria 54 | 60 | 61 | Enter your response here. 62 | 63 | 64 | ## Procedure 65 | 66 | 67 | 68 | 69 | Enter your response here. 70 | 71 | 72 | # Analysis plan 73 | 74 | ## Confirmatory analyses 75 | 82 | 83 | Enter your response here. 84 | 85 | 86 | ## Details of analysis 87 | 94 | 95 | Enter your response here. 96 | 97 | 98 | ## Existing data 99 | 100 | 101 | **Data collection has not begun.** 102 | 103 | **Data collection is underway or complete but I have not yet looked at the data.** 104 | 105 | **Data collection is underway or complete and I have looked at the data.** 106 | 107 | 108 | ## Project schedule (optional) 109 | 110 | 111 | Enter your response here. 112 | 113 | 114 | ## Further comments (optional) 115 | 116 | Enter your response here. 117 | 118 | 119 | # References 120 | ## 121 | \vspace{-2pc} 122 | \setlength{\parindent}{-0.5in} 123 | \setlength{\leftskip}{-1in} 124 | \setlength{\parskip}{8pt} 125 | \noindent 126 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/vantveer_prereg/template.yaml: -------------------------------------------------------------------------------- 1 | name: van 't Veer & Giner-Sorolla preregistration (PDF) 2 | description: > 3 | Preregistration template for social psychology based on suggestion by van 't Veer and Giner-Sorolla (2016, doi: 10.1016/j.jesp.2016.03.004). 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rmd/apa6.csl: -------------------------------------------------------------------------------- 1 | 2 | 485 | -------------------------------------------------------------------------------- /inst/rmd/prereg_form.tex: -------------------------------------------------------------------------------- 1 | % Options for packages loaded elsewhere 2 | \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} 3 | \PassOptionsToPackage{hyphens}{url} 4 | $if(colorlinks)$ 5 | \PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} 6 | $endif$ 7 | $if(CJKmainfont)$ 8 | \PassOptionsToPackage{space}{xeCJK} 9 | $endif$ 10 | 11 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} 12 | \usepackage{amsmath,amssymb} 13 | $if(fontfamily)$ 14 | \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} 15 | $else$ 16 | \usepackage{lmodern} 17 | $endif$ 18 | $if(linestretch)$ 19 | \usepackage{setspace} 20 | $endif$ 21 | \usepackage{iftex} 22 | \ifPDFTeX 23 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 24 | \usepackage[utf8]{inputenc} 25 | \usepackage{textcomp} % provide euro and other symbols 26 | \else % if luatex or xetex 27 | $if(mathspec)$ 28 | \ifXeTeX 29 | \usepackage{mathspec} 30 | \else 31 | \usepackage{unicode-math} 32 | \fi 33 | $else$ 34 | \usepackage{unicode-math} 35 | $endif$ 36 | \defaultfontfeatures{Scale=MatchLowercase} 37 | \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} 38 | $if(mainfont)$ 39 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} 40 | $endif$ 41 | $if(sansfont)$ 42 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} 43 | $endif$ 44 | $if(monofont)$ 45 | \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$} 46 | $endif$ 47 | $for(fontfamilies)$ 48 | \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} 49 | $endfor$ 50 | $if(mathfont)$ 51 | $if(mathspec)$ 52 | \ifXeTeX 53 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 54 | \else 55 | \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 56 | \fi 57 | $else$ 58 | \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 59 | $endif$ 60 | $endif$ 61 | $if(CJKmainfont)$ 62 | \ifXeTeX 63 | \usepackage{xeCJK} 64 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 65 | \fi 66 | $endif$ 67 | $if(luatexjapresetoptions)$ 68 | \ifLuaTeX 69 | \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} 70 | \fi 71 | $endif$ 72 | $if(CJKmainfont)$ 73 | \ifLuaTeX 74 | \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} 75 | \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 76 | \fi 77 | $endif$ 78 | \fi 79 | $if(zero-width-non-joiner)$ 80 | %% Support for zero-width non-joiner characters. 81 | \makeatletter 82 | \def\zerowidthnonjoiner{% 83 | % Prevent ligatures and adjust kerning, but still support hyphenating. 84 | \texorpdfstring{% 85 | \textormath{\nobreak\discretionary{-}{}{\kern.03em}% 86 | \ifvmode\else\nobreak\hskip\z@skip\fi}{}% 87 | }{}% 88 | } 89 | \makeatother 90 | \ifPDFTeX 91 | \DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner} 92 | \else 93 | \catcode`^^^^200c=\active 94 | \protected\def ^^^^200c{\zerowidthnonjoiner} 95 | \fi 96 | %% End of ZWNJ support 97 | $endif$ 98 | 99 | % use upquote if available, for straight quotes in verbatim environments 100 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 101 | % use microtype if available 102 | \IfFileExists{microtype.sty}{% 103 | \usepackage{microtype} 104 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 105 | }{} 106 | $if(geometry)$ 107 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 108 | $endif$ 109 | \ifxetex 110 | \usepackage[setpagesize=false, % page size defined by xetex 111 | unicode=false, % unicode breaks when used with xetex 112 | xetex]{hyperref} 113 | \else 114 | \usepackage[unicode=true]{hyperref} 115 | \fi 116 | \hypersetup{breaklinks=true, 117 | bookmarks=true, 118 | pdfauthor={$author-meta$}, 119 | pdftitle={$title-meta$}, 120 | colorlinks=true, 121 | citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 122 | urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 123 | linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, 124 | pdfborder={0 0 0}} 125 | \urlstyle{same} % don't use monospace font for urls 126 | $if(lang)$ 127 | \ifxetex 128 | \usepackage{polyglossia} 129 | \setmainlanguage{$mainlang$} 130 | \setotherlanguages{$for(otherlang)$$otherlang$$sep$,$endfor$} 131 | \else 132 | \usepackage[shorthands=off,$lang$]{babel} 133 | \fi 134 | $endif$ 135 | $if(natbib)$ 136 | \usepackage[$natbiboptions$]{natbib} 137 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 138 | $endif$ 139 | $if(biblatex)$ 140 | \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} 141 | $for(bibliography)$ 142 | \addbibresource{$bibliography$} 143 | $endfor$ 144 | $endif$ 145 | $if(csl-refs)$ 146 | % definitions for citeproc citations 147 | \NewDocumentCommand\citeproctext{}{} 148 | \NewDocumentCommand\citeproc{mm}{% 149 | \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} 150 | \makeatletter 151 | % allow citations to break across lines 152 | \let\@cite@ofmt\@firstofone 153 | % avoid brackets around text for \cite: 154 | \def\@biblabel#1{} 155 | \def\@cite#1#2{{#1\if@tempswa , #2\fi}} 156 | \makeatother 157 | \newlength{\cslhangindent} 158 | \setlength{\cslhangindent}{1.5em} 159 | \newlength{\csllabelwidth} 160 | \setlength{\csllabelwidth}{3em} 161 | \newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing 162 | {\begin{list}{}{% 163 | \setlength{\itemindent}{0pt} 164 | \setlength{\leftmargin}{0pt} 165 | \setlength{\parsep}{0pt} 166 | % turn on hanging indent if param 1 is 1 167 | \ifodd #1 168 | \setlength{\leftmargin}{\cslhangindent} 169 | \setlength{\itemindent}{-1\cslhangindent} 170 | \fi 171 | % set entry spacing 172 | \setlength{\itemsep}{#2\baselineskip}}} 173 | {\end{list}} 174 | %For backward compatibility 175 | \newenvironment{cslreferences}% 176 | {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% 177 | \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% 178 | {\par} 179 | $endif$ 180 | $if(csquotes)$ 181 | \usepackage{csquotes} 182 | $endif$ 183 | 184 | $if(listings)$ 185 | \usepackage{listings} 186 | \newcommand{\passthrough}[1]{#1} 187 | \lstset{defaultdialect=[5.3]Lua} 188 | \lstset{defaultdialect=[x86masm]Assembler} 189 | $endif$ 190 | $if(lhs)$ 191 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 192 | $endif$ 193 | $if(highlighting-macros)$ 194 | $highlighting-macros$ 195 | $endif$ 196 | $if(verbatim-in-note)$ 197 | \usepackage{fancyvrb} 198 | \VerbatimFootnotes 199 | $endif$ 200 | $if(graphics)$ 201 | \usepackage{graphicx} 202 | \makeatletter 203 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 204 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 205 | \makeatother 206 | % Scale images if necessary, so that they will not overflow the page 207 | % margins by default, and it is still possible to overwrite the defaults 208 | % using explicit options in \includegraphics[width, height, ...]{} 209 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 210 | % Set default figure placement to htbp 211 | \makeatletter 212 | \def\fps@figure{htbp} 213 | \makeatother 214 | $endif$ 215 | $if(links-as-notes)$ 216 | % Make links footnotes instead of hotlinks: 217 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 218 | $endif$ 219 | $if(strikeout)$ 220 | \usepackage[normalem]{ulem} 221 | % avoid problems with \sout in headers with hyperref: 222 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 223 | $endif$ 224 | \setlength{\parindent}{0pt} 225 | \setlength{\parskip}{6pt plus 2pt minus 1pt} 226 | \setlength{\emergencystretch}{3em} % prevent overfull lines 227 | \providecommand{\tightlist}{% 228 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 229 | $if(numbersections)$ 230 | \setcounter{secnumdepth}{5} 231 | $else$ 232 | \setcounter{secnumdepth}{0} 233 | $endif$ 234 | $if(verbatim-in-note)$ 235 | \VerbatimFootnotes % allows verbatim text in footnotes 236 | $endif$ 237 | 238 | % Customization for cos_prereg 239 | \usepackage{longtable,booktabs,threeparttable,tabularx} 240 | \linespread{1.5} 241 | \newcounter{question} 242 | \setcounter{question}{0} 243 | \usepackage{calc} % for calculating minipage widths 244 | 245 | %%% Use protect on footnotes to avoid problems with footnotes in titles 246 | \let\rmarkdownfootnote\footnote% 247 | \def\footnote{\protect\rmarkdownfootnote} 248 | 249 | %%% Change title format to be more compact 250 | \usepackage{titling} 251 | 252 | \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]} 253 | \let\endchangemargin=\endlist 254 | 255 | \setlength{\droptitle}{-2em} 256 | $if(title)$ 257 | \title{$title$} 258 | \pretitle{\begin{changemargin}{-8pc}{0pc} \centering\large Preregistration\\ \Huge} 259 | \posttitle{\end{changemargin}} 260 | $else$ 261 | \title{} 262 | \pretitle{\vspace{\droptitle}} 263 | \posttitle{} 264 | $endif$ 265 | $if(subtitle)$ 266 | % Create subtitle command for use in maketitle 267 | \usepackage{etoolbox} 268 | \makeatletter 269 | \providecommand{\subtitle}[1]{% add subtitle to \maketitle 270 | \apptocmd{\@title}{\par {\large #1 \par}}{}{} 271 | } 272 | \makeatother 273 | \subtitle{$subtitle$} 274 | $endif$ 275 | $if(author)$ 276 | \author{ 277 | $for(author)$ 278 | $author.name$$if(author.affiliation)$\textsuperscript{$author.affiliation$}$endif$$sep$, 279 | $endfor$ 280 | $if(affiliation)$ 281 | \\ \vspace{0.5cm} 282 | $for(affiliation)$ 283 | \textsuperscript{$affiliation.id$} $if(affiliation.institution)$$affiliation.institution$$else$$if(affiliation.city)$$affiliation.city$$endif$$if(affiliation.state)$, $affiliation.state$$endif$$if(affiliation.country)$, $affiliation.country$$endif$$endif$$sep$\\ 284 | $endfor$ 285 | $endif$ 286 | } 287 | 288 | \def\affdep{{$for(author)$"$author.department$"$sep$, $endfor$}}% 289 | \def\affcity{{$for(author)$"$author.city$"$sep$, $endfor$}}% 290 | \preauthor{\begin{changemargin}{-8pc}{0pc} \centering\large} 291 | \postauthor{\end{changemargin}} 292 | $else$ 293 | \author{} 294 | \preauthor{}\postauthor{} 295 | $endif$ 296 | $if(date)$ 297 | \date{$date$} 298 | \predate{\begin{changemargin}{-8pc}{0pc} \centering\large\emph} 299 | \postdate{\end{changemargin}} 300 | $else$ 301 | \date{} 302 | \predate{}\postdate{} 303 | $endif$ 304 | $if(shorttitle)$ 305 | \usepackage{fancyhdr} 306 | \pagestyle{fancy} 307 | \setlength{\headheight}{14.0pt} 308 | \renewcommand{\headrulewidth}{0pt} 309 | \lhead{} 310 | \rhead{\large\textsc{\MakeLowercase{$shorttitle$}}} 311 | $endif$ 312 | 313 | $for(header-includes)$ 314 | $header-includes$ 315 | $endfor$ 316 | 317 | 318 | % Title settings 319 | \usepackage{titlesec} 320 | $if(numbersections)$ 321 | \titleformat{\section}[hang]{\bfseries\Large}{\thesection}{0.5em}{}[] 322 | $else$ 323 | \titleformat{\section}[display]{\bfseries\Large}{\thesection}{}{}[] 324 | $endif$ 325 | \titlespacing{\section}{0pc}{*3}{*1.5} 326 | \titleformat{\subsection}[leftmargin]{\titlerule\bfseries\filleft}{\thesubsection}{.5em}{} 327 | \titlespacing{\subsection}{8pc}{5ex plus .1ex minus .2ex}{1.5pc} 328 | 329 | 330 | % Redefines (sub)paragraphs to behave more like sections 331 | \ifx\paragraph\undefined\else 332 | \let\oldparagraph\paragraph 333 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 334 | \fi 335 | \ifx\subparagraph\undefined\else 336 | \let\oldsubparagraph\subparagraph 337 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 338 | \fi 339 | 340 | 341 | \begin{document} 342 | \maketitle 343 | \vspace{2pc} 344 | $if(abstract)$ 345 | \begin{abstract} 346 | $abstract$ 347 | \end{abstract} 348 | $endif$ 349 | 350 | $for(include-before)$ 351 | $include-before$ 352 | 353 | $endfor$ 354 | $if(toc)$ 355 | { 356 | \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} 357 | \setcounter{tocdepth}{$toc-depth$} 358 | \tableofcontents 359 | } 360 | $endif$ 361 | $if(lot)$ 362 | \listoftables 363 | $endif$ 364 | $if(lof)$ 365 | \listoffigures 366 | $endif$ 367 | 368 | \ifPDFTeX 369 | \newcommand\Question[2]{% 370 | \leavevmode\par 371 | \stepcounter{question} 372 | \noindent 373 | \textbf{\thequestion. #1}. #2\par} 374 | \else % if luatex or xetex 375 | \NewCommandCopy{\oldQuestion}{\Question} 376 | \renewcommand\Question[2]{% 377 | \leavevmode\par 378 | \stepcounter{question} 379 | \noindent 380 | \textbf{\thequestion. #1}. #2\par} 381 | \fi 382 | 383 | 384 | 385 | \newcommand\Answer[1]{% 386 | \noindent 387 | \textit{Registered response}: #1\par} 388 | 389 | $body$ 390 | 391 | $if(natbib)$ 392 | $if(bibliography)$ 393 | $if(biblio-title)$ 394 | $if(book-class)$ 395 | \renewcommand\bibname{$biblio-title$} 396 | $else$ 397 | \renewcommand\refname{$biblio-title$} 398 | $endif$ 399 | $endif$ 400 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 401 | 402 | $endif$ 403 | $endif$ 404 | $if(biblatex)$ 405 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 406 | 407 | $endif$ 408 | $for(include-after)$ 409 | $include-after$ 410 | 411 | $endfor$ 412 | \end{document} 413 | -------------------------------------------------------------------------------- /man/prereg.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/prereg.R 3 | \docType{package} 4 | \name{prereg} 5 | \alias{prereg-package} 6 | \alias{prereg} 7 | \title{R Markdown Templates to Preregister Scientific Studies} 8 | \description{ 9 | The provided \href{https://rmarkdown.rstudio.com/}{R Markdown} templates are based 10 | on the \href{https://osf.io/x5w7h/}{Center for Open Science Preregistration Challenge}, 11 | the \href{https://aspredicted.org/}{AsPredicted.org} questions, a template suggested 12 | for social psychology by van 't Veer and Giner-Sorolla (2016), and the replication recipe 13 | suggested by Brandt et al. (2013). 14 | } 15 | \section{System requirements}{ 16 | 17 | Before using \pkg{prereg} to create a preregistration document, make sure the following 18 | software is installed on your computer: 19 | 20 | \itemize{ 21 | \item{\href{https://rstudio.com/}{RStudio} (>= 0.98.932); if you don't use RStudio 22 | , you need to install \href{https://pandoc.org/}{pandoc} using the 23 | \href{https://pandoc.org/installing.html}{instructions for your operating system}} 24 | \item{A \href{https://de.wikipedia.org/wiki/TeX}{TeX} distribution (2013 or later; e.g., \href{https://miktex.org/}{MikTeX} 25 | for Windows, \href{https://tug.org/mactex/}{MacTeX} for Mac, obviously, or \href{https://www.tug.org/texlive/}{TeX Live} 26 | for Linux)} 27 | } 28 | 29 | If you are running \emph{Windows}, use MikTex if possible. Currently, pandoc and the Windows version of Tex Live 30 | \href{https://github.com/rstudio/rmarkdown/issues/6}{don't seem to like each other}. Make sure you install the 31 | \emph{complete}---not the basic---version. 32 | } 33 | 34 | \section{Author and Maintainer}{ 35 | 36 | Frederik Aust (frederik.aust at uni-koeln.de). 37 | } 38 | 39 | \references{ 40 | 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: \href{https://doi.org/10.1016/j.jesp.2013.10.005}{10.1016/j.jesp.2013.10.005} 41 | van 't Veer, A. E., & Giner-Sorolla, R. (2016). Pre-registration in social psychology---A discussion and 42 | suggested template. Journal of Experimental Social Psychology, 67, 2--12. doi: 43 | \href{https://doi.org/10.1016/j.jesp.2016.03.004}{10.1016/j.jesp.2016.03.004} 44 | } 45 | \seealso{ 46 | Useful links: 47 | \itemize{ 48 | \item \url{https://github.com/crsh/prereg} 49 | \item Report bugs at \url{https://github.com/crsh/prereg/issues} 50 | } 51 | 52 | } 53 | \author{ 54 | \strong{Maintainer}: Frederik Aust \email{frederik.aust@uni-koeln.de} (\href{https://orcid.org/0000-0003-4900-788X}{ORCID}) 55 | 56 | Authors: 57 | \itemize{ 58 | \item Lisa Spitzer \email{lisa.spitzer95@yahoo.de} 59 | } 60 | 61 | Other contributors: 62 | \itemize{ 63 | \item Jeffrey R. Stevens \email{jeffrey.r.stevens@gmail.com} (\href{https://orcid.org/0000-0003-2375-1360}{ORCID}) [contributor] 64 | \item Masataka Ogawa \email{ogawa@phiz.c.u-tokyo.ac.jp} [contributor] 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /man/prereg_pdf.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/prereg_pdf.R 3 | \name{prereg_pdf} 4 | \alias{prereg_pdf} 5 | \alias{aspredicted_prereg} 6 | \alias{brandt_prereg} 7 | \alias{cos_prereg} 8 | \alias{fmri_prereg} 9 | \alias{psyquant_prereg} 10 | \alias{prp_quant_prereg} 11 | \alias{rr_prereg} 12 | \alias{vantveer_prereg} 13 | \title{Preregistration renderer} 14 | \usage{ 15 | prereg_pdf(...) 16 | 17 | aspredicted_prereg(...) 18 | 19 | brandt_prereg(...) 20 | 21 | cos_prereg(...) 22 | 23 | fmri_prereg(...) 24 | 25 | psyquant_prereg(...) 26 | 27 | prp_quant_prereg(...) 28 | 29 | rr_prereg(...) 30 | 31 | vantveer_prereg(...) 32 | } 33 | \arguments{ 34 | \item{...}{additional arguments to \code{\link[rmarkdown]{pdf_document}}; 35 | \code{template} is ignored.} 36 | } 37 | \description{ 38 | Knit a PDF document using preregistration document template 39 | } 40 | \examples{ 41 | \dontrun{ 42 | # Create R Markdown file 43 | rmarkdown::draft( 44 | "my_preregistration.Rmd" 45 | , "cos_prereg" 46 | , package = "prereg" 47 | , create_dir = FALSE 48 | , edit = FALSE 49 | ) 50 | 51 | # Render file 52 | rmarkdown::render("my_preregistration.Rmd") 53 | } 54 | 55 | } 56 | \references{ 57 | 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. \emph{American Psychologist}. http://dx.doi.org/10.1037/amp0000879 58 | 59 | 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? \emph{Journal of Experimental Social Psychology}, 50, 217--224. https://doi.org/10.1016/j.jesp.2013.10.005 60 | 61 | Crüwell, S. & Evans, N. J. (2021). Preregistration in diverse contexts: a preregistration template for the application of cognitive models. \emph{Royal Society Open Science}. 8:210155 https://doi.org/10.1016/j.jesp.2013.10.005 62 | 63 | Flannery, J. E. (2020, October 22). fMRI Preregistration Template. Retrieved from https://osf.io/6juft 64 | 65 | van 't Veer, A. E., & Giner-Sorolla, R. (2016). Pre-registration in social psychology---A discussion and suggested template. \emph{Journal of Experimental Social Psychology}, 67, 2--12. https://doi.org/10.1016/j.jesp.2016.03.004 66 | } 67 | -------------------------------------------------------------------------------- /tests/test_prereg.R: -------------------------------------------------------------------------------- 1 | require("testthat") 2 | test_check("prereg") -------------------------------------------------------------------------------- /tests/testthat/test_skeletons.R: -------------------------------------------------------------------------------- 1 | test_that( 2 | "Knit COS skeleton" 3 | , { 4 | skip_on_cran() 5 | 6 | # Render skeleton 7 | rmarkdown::draft( 8 | "cos_skeleton.Rmd" 9 | , "cos_prereg" 10 | , package = "prereg" 11 | , create_dir = FALSE 12 | , edit = FALSE 13 | ) 14 | rmarkdown::render("cos_skeleton.Rmd") 15 | 16 | # Clean up 17 | file.remove(list.files(pattern = "cos")) 18 | } 19 | ) 20 | 21 | test_that( 22 | "Knit AsPredicted skeleton" 23 | , { 24 | skip_on_cran() 25 | 26 | # Render skeleton 27 | rmarkdown::draft( 28 | "aspredicted_skeleton.Rmd" 29 | , "aspredicted_prereg" 30 | , package = "prereg" 31 | , create_dir = FALSE 32 | , edit = FALSE 33 | ) 34 | rmarkdown::render("aspredicted_skeleton.Rmd") 35 | 36 | # Clean up 37 | file.remove(list.files(pattern = "aspredicted")) 38 | } 39 | ) 40 | 41 | test_that( 42 | "Knit van 't Veer and Giner-Sorolla skeleton" 43 | , { 44 | skip_on_cran() 45 | 46 | # Render skeleton 47 | rmarkdown::draft( 48 | "vantveer_skeleton.Rmd" 49 | , "vantveer_prereg" 50 | , package = "prereg" 51 | , create_dir = FALSE 52 | , edit = FALSE 53 | ) 54 | rmarkdown::render("vantveer_skeleton.Rmd") 55 | 56 | # Clean up 57 | file.remove(list.files(pattern = "vantveer")) 58 | } 59 | ) 60 | 61 | test_that( 62 | "Knit Brandt et al. skeleton" 63 | , { 64 | skip_on_cran() 65 | 66 | # Render skeleton 67 | rmarkdown::draft( 68 | "brandt_skeleton.Rmd" 69 | , "brandt_prereg" 70 | , package = "prereg" 71 | , create_dir = FALSE 72 | , edit = FALSE 73 | ) 74 | rmarkdown::render("brandt_skeleton.Rmd") 75 | 76 | # Clean up 77 | file.remove(list.files(pattern = "brandt")) 78 | } 79 | ) 80 | 81 | test_that( 82 | "Knit PRP-QUANT skeleton" 83 | , { 84 | skip_on_cran() 85 | 86 | # Render skeleton 87 | rmarkdown::draft( 88 | "prp_quant_skeleton.Rmd" 89 | , "prp_quant_prereg" 90 | , package = "prereg" 91 | , create_dir = FALSE 92 | , edit = FALSE 93 | ) 94 | rmarkdown::render("prp_quant_skeleton.Rmd") 95 | 96 | # Clean up 97 | file.remove(list.files(pattern = "prp_quant")) 98 | } 99 | ) 100 | 101 | test_that( 102 | "Knit Registered Report skeleton" 103 | , { 104 | skip_on_cran() 105 | 106 | # Render skeleton 107 | rmarkdown::draft( 108 | "rr_skeleton.Rmd" 109 | , "rr_prereg" 110 | , package = "prereg" 111 | , create_dir = FALSE 112 | , edit = FALSE 113 | ) 114 | rmarkdown::render("rr_skeleton.Rmd") 115 | 116 | # Clean up 117 | file.remove(list.files(pattern = "rr")) 118 | } 119 | ) 120 | 121 | test_that( 122 | "Knit FMRI skeleton" 123 | , { 124 | skip_on_cran() 125 | 126 | # Render skeleton 127 | rmarkdown::draft( 128 | "fmri_skeleton.Rmd" 129 | , "fmri_prereg" 130 | , package = "prereg" 131 | , create_dir = FALSE 132 | , edit = FALSE 133 | ) 134 | rmarkdown::render("fmri_skeleton.Rmd") 135 | 136 | # Clean up 137 | file.remove(list.files(pattern = "fmri")) 138 | } 139 | ) 140 | 141 | test_that( 142 | "Knit Crüwell & Evans skeleton" 143 | , { 144 | skip_on_cran() 145 | 146 | # Render skeleton 147 | rmarkdown::draft( 148 | "cruewell_skeleton.Rmd" 149 | , "cruewell_prereg" 150 | , package = "prereg" 151 | , create_dir = FALSE 152 | , edit = FALSE 153 | ) 154 | rmarkdown::render("cruewell_skeleton.Rmd") 155 | 156 | # Clean up 157 | file.remove(list.files(pattern = "cruewell")) 158 | } 159 | ) 160 | -------------------------------------------------------------------------------- /tools/images/pkg-deps-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crsh/prereg/bfcb02b0ec2ca57456f28bb636bbc1c1c3d8acd7/tools/images/pkg-deps-1.png -------------------------------------------------------------------------------- /tools/images/prereg_page1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crsh/prereg/bfcb02b0ec2ca57456f28bb636bbc1c1c3d8acd7/tools/images/prereg_page1.png -------------------------------------------------------------------------------- /tools/images/prereg_page2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crsh/prereg/bfcb02b0ec2ca57456f28bb636bbc1c1c3d8acd7/tools/images/prereg_page2.png -------------------------------------------------------------------------------- /tools/images/prereg_rmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crsh/prereg/bfcb02b0ec2ca57456f28bb636bbc1c1c3d8acd7/tools/images/prereg_rmd.png -------------------------------------------------------------------------------- /tools/images/template_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crsh/prereg/bfcb02b0ec2ca57456f28bb636bbc1c1c3d8acd7/tools/images/template_selection.png --------------------------------------------------------------------------------