Reproducibility package for the article:
The percentile bootstrap: a primer with step-by-step instructions in R
Rousselet G.A., Pernet C.R., Wilcox R.R. (2020)
Advances in Methods and Practices in Psychological Science
[Article]
This tutorial provides a very short and lightweight introduction to the percentile bootstrap. For a more substantial tutorial, see here.
The repository contains the R code used in the article. The code is best seen by running the RMarkdown notebook in RStudio.
The code is released under the MIT license. Copyright 2019-2020, Guillaume A. Rousselet.
The figures are released under the CC-BY 4.0 license. Copyright 2019-2020, Rousselet, Pernet & Wilcox.
| folder | description | location |
|---|---|---|
bootsteps.Rmd |
RMarkdown file to create figures and run the simulation | OSF + GitHub |
bootsteps.pdf |
pdf versions of the code, with embedded figures | OSF |
data |
simulation results needed to run the code | OSF + GitHub |
figures |
all the figures used in the article, in pdf format | OSF |
functions |
extra R functions defined in text files | OSF + GitHub |
If you want to run the code in RStudio and reproduce the figures, you will need to install three packages, which you can do by typing this in the console:
install.packages(c("ggplot2", "tibble", "boot", "simpleboot", "SimJoint"))
Or you can navigate in the GUI to Tools > Install Packages...
To get all the statistical functions from Rand Wilcox, select the Rallfun-v35.txt file in the functions folder. See details on this webpage. The full description of the functions is available in the book Introduction to Robust Estimation and Hypothesis Testing.
The notebook bootsteps.Rmd will install the appropriate functions for you; otherwise, in the console you can type source(file.choose()) and select the relevant .txt file.
The file theme_gar.txt contains custom code to set some ggplot2 parameters.
For packages not focused on bootstrap methods, example functions are provided in brackets. The full references are available in the article.
-
bootstrap(Efron & Tibshirani, 1994; Tibshirani & Leisch, 2019) -
boot(Canty & Ripley, 2017; Davison & Hinkley, 1997) -
simpleboot(Peng, 2019) -
WRS2(Mair & Wilcox, 2019) -
resample(Hesterberg, 2015a) -
car(Boot) (Fox & Weisberg, 2019) -
nlstools(nlsBoot) (Baty et al., 2015) -
dabestr(Ho, Tumkaya, Aryal, Choi, & Claridge-Chang, 2019) -
rogme(Rousselet, Pernet, & Wilcox, 2017)
Frequentist inference: confidence interval & bootstrap
Suggested books on bootstrap methods, robust statistics and simulations.
An Introduction to the Bootstrap
Introduction to Robust Estimation and Hypothesis Testing
Computer Age Statistical Inference
Statistics: Unlocking the Power of Data