Dear participant, thank you for registering for this online course co-organised by the NCRM, the University of Southampton and the Durham Research Methods Centre.

General practicalities

The course will run from October 25 to October 28. We will begin each day at 10am. The morning lecture will end at 11:30am, followed by a short tea break. At 11:40am we begin with the morning lab session, ending at 12:45pm. After the lunch break, we have the afternoon lecture from 1:30pm to 3pm, again followed by a short tea break and a lab session. We aim to finish each day by 4pm.

The course will be facilitated by Professor Jochen Einbeck, Dr Akansha Singh, Dr Janelle Wagnild, Dr Ehsan Kharati, Dr Bilal Ashraf, and Dimitris Vallis, from the Research Methods Centre at Durham University.

In terms of content, the four days are roughly organized as follows:

We will use a single zoom link for all teaching events, which is

https://durhamuniversity.zoom.us/j/97561332626?pwd=S1AzSmxkcnpxT0NkZDIvNys5dEFNdz09

with Meeting ID: 975 6133 2626 and Passcode: 839109.

In the labs, the tutors will arrange breakout rooms with 4-5 participants in each group.

Software

We will use the statstical programming language R for this course. R is free open source software (GPL-2 | GPL-3) and can be downloaded from CRAN. The best way of using R is through the Integrated Desktop Environment RStudio, which can be downloaded for free and from rstudio.com. A video with some instructions on downloading, and installing, and getting started with, R and RStudio can be found here.

Please make sure you have functioning versions of R and RStudio installed on your laptop before starting with the course. If you already have R and RStudio installed on your laptop, it is recommended to upgrade to versions 4.0.5 and 2021.08.0, respectively, or newer.

If you prefer not to install R and RStudio, or if you are using a chromebook etc and are not able to easily install software, another option is to create a free account under R Studio Cloud. (Note: This is a commercial cloud-based system for which neither the NCRM, nor Durham University nor the University of Southampton will offer any support nor accept any liability). Please ensure before the start of the course that your R system works.

The most important R package will be lme4 which you can install via

install.packages("lme4")

You can then load the package via

library("lme4")
## Loading required package: Matrix

To check whether this has worked, you may execute

fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
summary(fm1)

This will give you some output – you will understand later in this course what it means!

You need to do the installation only once, but you need to load the package everytime again that you open R.

Other R packages which will (or may) be needed during the labs are ggplot2, tidyverse, haven, eefanalytics, glmer, nlme, glmmTMB, lmerTest, sjPlot, and performance.

(It is noted that the labs can in principle also be worked through in STATA, but the support that we give for this is limited and may depend on the expertise of the tutors who are available on that day.)

R Notebooks

This document is produced through an R Notebook based on R Markdown. R Markdown documents can contain a mixture of text and R code (such as this document), and they have a .Rmd ending.

In R Studio, R Markdown documents can be “knitted” (i.e. compiled into a document) by clicking on the “Knit” or “Preview” button in the top menu bar. Several choices are then possible, including “Knit to PDF” or “Knit to HTML”. In this case, we have used “Knit to HTML”.

All lab sheets produced for this course are knitted Markdown scripts. Beside the PDF version, we will also provide you with the .Rmd version, so that, if you like, you can work directly with the Notebook in the labs. However, if you prefer, you can also just type your work into a plain R script (with .R ending).

Either way, in order to create a new file, you choose in the RStudio menu File –> New File, and then either R Script (to produce a .R file) R Notebook (to produce a .R file).

Access to course material

The .Rmd version of this document, along with all other material relating to this course, can be assessed through our NCRM course repository. (Depending on browser/configuration, the repository may look “empty” when you open it firstly. If so, please use the Previous and Next buttons at the top right of the page to navigate between the different items. There will then appear folders which contain the material for the individual days. If you just see a blank screen, refreshing the page might also help. Currently these folders are still empty though! Material will be filled in a few days before the start of the course).

Important: For your access to the Sharepoint area to work, we will need to give you shared access which we will do via the e-mail address that you have used for registration. If, for any reason, you need to have this sent to a different e-mail address to the one that you have originally registered with, please let us know the e-mail address that we shall use.

Preliminary reading

There is no preliminary reading required. However, if you have very little or no experience with R, a useful guide is the monograph

Discovering Statistics Using R, by Andy Field, Jeremy Miles and Zoë Field

For the purposes of this course, especially Section 3.4, 3.5, 3.9, 4.4, 4.5, and 7.4, 7.5, 7.8 are relevant (The book is not actually using RStudio, but rather the “R Commander” functionality within the plain R installation, but the shown R code is applicable either way.)

Another useful resource are the “Oxford R Lectures” which are also used by Academy for PhD Training in Statistics (APTS) as preliminary material for their training courses.