{"id":17456088,"url":"https://github.com/debruine/data-sim-workshops","last_synced_at":"2025-04-19T16:05:10.033Z","repository":{"id":119797747,"uuid":"236701331","full_name":"debruine/data-sim-workshops","owner":"debruine","description":"Data simulation workshop materials and associated R package","archived":false,"fork":false,"pushed_at":"2024-04-24T08:07:55.000Z","size":13647,"stargazers_count":16,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T23:54:31.329Z","etag":null,"topics":["r","simulation"],"latest_commit_sha":null,"homepage":"https://debruine.github.io/data-sim-workshops/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debruine.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-28T09:41:48.000Z","updated_at":"2025-04-09T10:15:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"8dae416f-7820-43d1-9467-e251c30bab82","html_url":"https://github.com/debruine/data-sim-workshops","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2Fdata-sim-workshops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2Fdata-sim-workshops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2Fdata-sim-workshops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2Fdata-sim-workshops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debruine","download_url":"https://codeload.github.com/debruine/data-sim-workshops/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249733133,"owners_count":21317499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","simulation"],"created_at":"2024-10-18T02:24:12.489Z","updated_at":"2025-04-19T16:05:09.998Z","avatar_url":"https://github.com/debruine.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  warning = FALSE,\n  message = FALSE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\nset.seed(8675309)\n```\n\n# Data Simulation Workshop Materials ![](man/figures/logo.png){style=\"float:right; width:200px;\"}\n\nBeing able to simulate data allows you to:\n\n* prep analysis scripts for pre-registration\n* calculate power and sensitivity for analyses that don't have empirical methods\n* create reproducible examples when your data are too big or confidential to share\n* enhance your understanding of statistical concepts\n* create demo data for teaching and tutorials\n\n## Installation\n\nYou 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:\n\n```{r, eval = FALSE}\ndevtools::install_github(\"debruine/data-sim-workshops\")\n```\n\nThen you can load exercises with the following code:\n\n```{r, eval = FALSE}\ndsw::exercise(\"faux\")\ndsw::exercise(\"calories\")\ndsw::exercise(\"fixed\")\ndsw::exercise(\"mixed\")\n```\n\nAlternatively, download the stub files and install the specific packages for your workshop. \n\n* [faux-stub.Rmd](https://raw.githubusercontent.com/debruine/data-sim-workshops/master/inst/stubs/faux-stub.Rmd)\n* [calories-stub.Rmd](https://raw.githubusercontent.com/debruine/data-sim-workshops/master/inst/stubs/calories-stub.Rmd)\n* [fixed-stub.Rmd](https://raw.githubusercontent.com/debruine/data-sim-workshops/master/inst/stubs/fixed-stub.Rmd)\n* [mixed-stub.Rmd](https://raw.githubusercontent.com/debruine/data-sim-workshops/master/inst/stubs/mixed-stub.Rmd)\n\n## Upcoming Workshops\n\n\u003c!--\n### Simulating data with faux\n\nWhen: 9:00 - 12:00, Thursday, July 27, 2023  \nWhere: Max Planck Institute for Evolutionary Anthropology, Leipzig, Germany\n\nBeing 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}. In the first half of the workshop, 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. We will use these to set up simulation-based power analyses. In the second half of the workshop, we will cover simulating data for a mixed design, where trials are crossed with subjects. We will learn how to analyse this using {lme4}, with a focus on understanding how the simulation parameters correspond to the output. \n\nPrep: Install R and RStudio, and run the following code to produce two HTML files. If you have trouble with this, please contact [Lisa](mailto:lisa.debruine@glasgow.ac.uk), who will help you troubleshoot.\n\n``` r\n# install workshop package that includes all packages used\ndevtools::install_github(\"debruine/data-sim-workshops\")\n\n# create stub files for the workshop\ndsw::exercise(\"faux\")\ndsw::exercise(\"mixed\")\n\n# render files (may require some rmarkdown setup)\nrmarkdown::render(\"faux-stub.Rmd\")\nrmarkdown::render(\"mixed-stub.Rmd\")\n```\n\n\n### Fake It Until You Make It: How and why to simulate research data\n\nWhen: Wednesday, September 20, 2023  \nWhere: Vrije Universiteit Amsterdam, NL\n\nBeing 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. \n\n### Prerequisites\n\n* install R and RStudio on a laptop \n* have very basic knowledge of R \n* have very basic familiarity with R Markdown (just be able to knit the demo file when creating a new Rmd in RStudio)\n* install the packages {faux}, {afex}, {broom} and {tidyverse} from CRAN\n* download the file [faux-stub.Rmd](https://raw.githubusercontent.com/debruine/data-sim-workshops/master/inst/stubs/faux-stub.Rmd)\n\n--\u003e\n\nWhen: 2024 February 1-2 \nWhere: [Data Simulation Workshop 2024](https://kogpsy.github.io/datasimulationcourse_24/), Institute of Psychology, Bern, Switzerland\n\n### Data Simulation with {faux}\n\nThis session will cover the basics of simulation using {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. Students will need to have very basic knowledge of R and R Markdown, and have installed {faux}, {afex}, {broom} and {tidyverse}.\n\n#### Prep\n\n* Install R packages from CRAN: `tidyverse`, `afex`, `faux`, and `broom`\n* Download files:  [faux-stub.Rmd](https://raw.githubusercontent.com/debruine/data-sim-workshops/master/inst/stubs/faux-stub.Rmd)\n\n\n### Data simulation for mixed designs\n\nThis session will cover simulating data for a mixed design, where trials are crossed with subjects. We will learn how to analyse this using {lme4}, with a focus on understanding how the simulation parameters correspond to the output. Finally, we will learn how to use simulation to calculate power. Students will need to have basic knowledge of R and R Markdown, some familiarity with mixed designs (even if they don't currently analyse them with mixed models) and have installed {faux}, {afex}, {tidyverse}, and {lme4}.\n\n#### Prep\n\n* Install R packages from CRAN: `tidyverse`, `afex`, `lme4`, `broom`, `broom.mixed`, `faux`\n* Download files: [mixed-stub.Rmd](https://raw.githubusercontent.com/debruine/data-sim-workshops/master/inst/stubs/mixed-stub.Rmd)\n\n\n\n## Resources\n\n* [Faux Shiny App](https://rstudio-connect.psy.gla.ac.uk/faux/) \n* [Data Skills for Reproducible Research](https://psyteachr.github.io/reprores/) open source textbook introducing tidyverse for psychologists\n* [Understanding mixed effects models through data simulation](https://osf.io/3cz2e/) (preprint, code, and shiny apps) \n* [Simulate Basic Distributions](https://rstudio-connect.psy.gla.ac.uk/simulate/)\n\n## Past Workshops\n\n* Vrije Universiteit Amsterdam, NL\n    Fake It Until You Make It: How and why to simulate research data\n    2023 September 20  \n\n* Max Planck Institute for Evolutionary Anthropology, Leipzig, Germany  \n    Simulating data with {faux}  \n    2023 July 27 9:00 - 12:00 (CET)\n\n* [European Evolutionary Biology Conference](https://www.empseb28.com/workshops), Millport, Scotland  \n    Fake It Until You Make It: How and why to simulate research data  \n    2023 June 1 14:30 - 16:30 (GMT)\n\n* University of Glasgow Institute of Neuroscience \u0026 Psychology  \n    Data Simulation with {faux}  \n    2023 January 18 12:00 - 13:00 (GMT)\n\n* Netherlands Institute for the Study of Crime and Law Enforcement  \n    Data Simulation with {faux}  \n    2022 December 6 13:00 - 14:00 (CET)  \n\n* Polish Association of Social Psychology Conference, Gdánsk  \n    Data simulation for fixed effects  \n    Data simulation for mixed designs  \n    Practical Session  \n    2022 September 14 09:00 - 16:00 (CET) \n\n* [RLadies Glasgow](https://www.meetup.com/rladies-glasgow/events/285942871/)  \n    Data simulation using faux  \n    2022 May 24 15:00-17:00 (BST)  \n\n* University of York\n    Data simulation for factorial designs  \n    Data simulation for mixed designs  \n    2022 April 27 09:00-17:00 (BST)  \n\n*  [From Proposal to Publication: Pathways to Open Science](https://www.dropbox.com/s/aydsuk6eahxumzu/OSW-Jul21.pdf?dl=0)  \n    Data simulation for factorial designs   \n    Data simulation for mixed designs  \n    2022 July 13 13:30-17:00 \n    \n* University of Glasgow  \n    Institute of Neuroscience and Psychology  \n    2020 Jan 28 13:00-15:00 and Feb 5 14:00-16:00 \n    \n* University of Grenoble  \n    Understanding Mixed-Effects Models through Data Simulation  \n    2021 February 5 13:00-15:00 \n\n* [PsyPAG Data Simulation Summer School](https://simsummerschool.github.io/)  \n    Simulation for factorial designs with faux  \n    2021 June 4 13:00-15:00 \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebruine%2Fdata-sim-workshops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebruine%2Fdata-sim-workshops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebruine%2Fdata-sim-workshops/lists"}