Being able to simulate data allows you to:

  • prep analysis scripts for pre-registration
  • calculate power and sensitivity for analyses that don’t have empirical methods
  • create reproducible examples when your data are too big or confidential to share
  • enhance your understanding of statistical concepts
  • create demo data for teaching and tutorials

Installation

You can install the packages used in these tutorials and get a function that makes it easy to access the workshop .Rmd files by running the following code:

devtools::install_github("debruine/data-sim-workshops")

Then you can load exercises with the following code:

dsw::exercise("faux")
dsw::exercise("calories")
dsw::exercise("fixed")
dsw::exercise("mixed")

Alternatively, download the stub files and install the specific packages for your workshop.

Upcoming Workshops

Fake It Until You Make It: How and why to simulate research data

When: Thursday, June 1, 2023 Where: European Evolutionary Biology Conference, Millport, Scotland

Being able to simulate data allows you to prep analysis scripts for pre-registration, calculate power and sensitivity for analyses that don’t have empirical methods, create reproducible examples when your data are too big or confidential to share, enhance your understanding of statistical concepts, and create demo data for teaching and tutorials. This workshop will cover the basics of simulation using the R package {faux}. We will simulate data with factorial designs by specifying the within and between-subjects factor structure, each cell mean and standard deviation, and correlations between cells where appropriate. This can be used to create simulated data sets to be used in preparing the analysis code for pre-registrations or registered reports. We will also create data sets for simulation-based power analyses.

Prerequisites

  • install R and RStudio on a laptop
  • have very basic knowledge of R
  • have very basic familiarity with R Markdown (just be able to knit the demo file when creating a new Rmd in RStudio)
  • install the packages {faux}, {afex}, {broom} and {tidyverse} from CRAN
  • download the file faux-stub.Rmd

Resources

Past Workshops

  • University of Glasgow Institute of Neuroscience & Psychology
    Data Simulation with {faux}
    2023 January 18 12:00 - 13:00 (GMT)

  • Netherlands Institute for the Study of Crime and Law Enforcement Data Simulation with {faux}
    2022 December 6 13:00 - 14:00 (CET)

  • Polish Association of Social Psychology Conference, Gdánsk
    Data simulation for fixed effects
    Data simulation for mixed designs
    Practical Session
    2022 September 14 09:00 - 16:00 (CET)

  • RLadies Glasgow
    Data simulation using faux
    2022 May 24 15:00-17:00 (BST)

  • University of York Data simulation for factorial designs
    Data simulation for mixed designs
    2022 April 27 09:00-17:00 (BST)

  • From Proposal to Publication: Pathways to Open Science
    Data simulation for factorial designs
    Data simulation for mixed designs
    2022 July 13 13:30-17:00

  • University of Glasgow
    Institute of Neuroscience and Psychology
    2020 Jan 28 13:00-15:00 and Feb 5 14:00-16:00

  • University of Grenoble
    Understanding Mixed-Effects Models through Data Simulation
    2021 February 5 13:00-15:00

  • PsyPAG Data Simulation Summer School
    Simulation for factorial designs with faux
    2021 June 4 13:00-15:00