Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 5.75 KB

README.md

File metadata and controls

50 lines (38 loc) · 5.75 KB

Introduction to Simulations in R

About this work

This work was originally created by Malika Ihle based on materials from Joel Pick, Hadley Wickham, Kevin Hallgren, and with large contributions from James Smith.
It is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Prerequisites

Prior to the session

  1. Watch this 30 min introduction to credible research, which contextualise the importance of simulations for reliable research.

  2. Fork and clone this repository (here is a reminder on how to fork and clone and what it means). If you have never been introduced to version control system, follow these instructions instead.

  3. Optional (to start getting familiarised with the content of the session): Read Hallgren A. K. 2013. Conducting simulation studies in the R programming environment. Tutor Quant Methods Psychol. ; 9(2): 43–60. and answer the following 3 questions in your local copy of the reading sheet:

  • describe 6 steps common to all simulations
  • describe 3 types of simulations use
  • describe 4 limitations of simulations

During the session: self-paced workshop

How it works

The self-paced tutorial (pages linked below) will alternate presentation of concepts and simple exercises for you to try to apply them in R. Each time you see written YOUR TURN, switch to your local copy of the exercise script (you can chose between a file with or without the solutions depending on e.g. your level of familiarity with R), review the examples if needed, complete the exercise, and check out the proposed answer (which often contains additional tips). Come back to the online tutorial and after finishing one page, you can click 'next' at the bottom to continue. The exercise script contains code for all the exercises and code that generates the plots that appear in the online tutorial, all in order of appearance in the tutorial.

It is necessary that you work through the sections of the tutorial in order. Please read the blurbs of each sections below to get an overview of this workshop.

Additional note for online instruction: The main instructor will stay in the main room. Everyone is welcome to stay there and ask questions as necessary. Two additional break out rooms will be permanently opened that you can join/leave at any time: one quiet room to work in silence and one collaborative room to work out loud. The co-instructor will answer questions in the collaborative room.

Tutorial

During the session: personal project

In your local repository, write your own simulation in R to help you prepare the data analyses of your current or next study. When you require help, first push your current work on your GitHub remote (for a reminder on how to do this, see here) for us to be able to access it easily and possibly review and edit your code!