Resources associated with each day of the workshop. The content is organised slightly differently to how it was on the day (we’ve had a little more time to merge content), but the material itself is unchanged.

Day 0


Content: R Bootcamp

Instructors: Amy Perfors & Danielle Navarro


The goal in Day 0 is to provide an “R Bootcamp”, which provides a basic introduction to programming in R. The content of the bootcamp covers the core toolkit section of Danielle Navarro’s R for Psychological Science. Other resources for the day:

Day 1


Content: Online Experiments

Instructor: Amy Perfors


The content in Day 1 provides a discussion of the replication crisis in psychology, and an overview of replication, powering studies and the use of pre-registration. It also discusses workflow and file organisation. The technical side covers how to code online experiments (using javascript, and the jsPsych library in particular), hosting the experiment as a web application using Google App Engine, and downloading data from the web application

Note: the files provided above do not contain what you need to download the data; we had to modify them slightly to do that. Here is a new backend.py file and a new index.html file; both of these are slight modifications of the existing ones so go ahead and copy over the ones we gave you with them. (Then type gcloud init and gcloud app deploy to make sure that the new version in the gloud uses them). As explained in the slides, you can now download data by going to your url and adding on /info at the end. This should automatically download a file called results.csv. (If you want to test this, remember to do the experiment at least one time, otherwise you’ll have no data to download!) Once you have the results.csv file, you will need to parse it with the read.R script which will turn it into a tidyverse-friendly csv format. Note also that your experiment is still up! If you want to delete it or take it down, that can be done from cloud.google.com.

Day 2


Content: Data analysis in R

Instructor: Danielle Navarro


The goal in Day 2 is to cover topics relevant to data analysis with R. The coverage is somewhat eclectic: there are sections that discuss tools that will help you with your workflow (e.g., git, R Markdown, etc), sections that discuss how to manipulate and visualise data (e.g., tidyverse), and a section that discusses statistical modelling in R (e.g., linear models, mixed models). Given the breadth of coverage, we won’t go into much detail on any topic. You should think of each section as an initial introduction to something that is itself a much larger topic.

Within each content section, there is a written tutorial linked to below and as well as the HTML slides that I’ll be presenting from. Eventually the intention is to have the tutorials go into more detail on topics, but at the moment they’re a bit hit and miss!

The interactive components to each section:

  • For the git and projects sections, the goal will be to create your own repository and initialise an RStudio project within it. The repository that I created is the summerschool repo.
  • For the data wrangling section, there is a structured sequence of six exercises that you can work through in parallel with the session (the slides have explicit break points). Each exercise is an R Markdown file that you’ll need to make changes to. You can download zip files with all exercises and solutions. In addition to the frames data the exercises use the tidy_users data and the tidy_nails data.
  • For the data visualisation, the DIY section is entirely freeform. The way this session will run is that I’ll give a very brief lecture on the grammar of graphics package, and then you should feel free to explore ggplot to your hearts content!
  • For the statistical modelling section… oh, let’s be honest. By this point in the day we’ll all need a break so it’s probably easiest to do this one lecture style!

Before the session: You’ll need to have git installed on your computer. If you’re using Windows you can install Git for Windows. For Mac users, the easiest (but most wasteful) way to do it is to install Xcode from the App store. But that contains all the developer tools and it’s 6Gb in size. Alternatively, it should be possible to install just the command line tools by following these instructions.

Day 3


Content: Probabilistic modelling

Instructor: Charles Kemp


  • Please install JAGS before December 12.
  • Resources can be downloaded from this zip file

Day 4


Content: Experience sampling

Instructor: Simon Dennis


Other

Some additional online resources that you may find useful

Additionally… one goal we had when putting all this together was to try to provide you with a sense of the extent to which the tools in this Summer School can be adapted to many different purposes. One hint to that is to look at how the resources for Day 2 have been constructed.

  • Obviously, we use R for the analyses, for drawing the images, etc.
  • Everything is hosted on GitHub, https://github.com/djnavarro/chdss2018
  • The website and tutorials is written in R Markdown, and updates on GitHub are automatically made live on this site
  • The slides are written using xaringan, an R package that provides an interface between R Markdown and some neat javascript libraries.
  • The graphic for the t-shirt were generated in R: https://github.com/djnavarro/asciify
  • So was animated GIF that we used to advertise: https://github.com/djnavarro/chdss-logo (using an in-development package called gganimate that extends the functionality of ggplot2 to allow animation)

Once you start feeling comfortable in R, it’s remarkable what fun things you can find to do with it!