The psyTeachR team at the University of Glasgow School of Psychology and Neuroscience has successfully made the transition to teaching reproducible research using R across all undergraduate and postgraduate levels. Our curriculum now emphasizes essential ‘data science’ graduate skills that have been overlooked in traditional approaches to teaching, including programming skills, data visualisation, data wrangling and reproducible reports. Students learn about probability and inference through data simulation as well as by working with real datasets.

This website contains our open materials for teaching reproducible research. See our GitHub for open data and code.


Course Books

Undergraduate Series

Level 1: Data Skills

Our first-year undergraduate course covers current state of psychological science and what Open Science is as well as its importance. It also aims to make students confident and competent at using RStudio as a tool to achieve good data management skills.

Authors: Emily Nordmann, Heather Cleland-Woods
Contact: Emily Nordmann
Contributors: Jack Taylor, Shannon McNee

Level 2: Analysis

Our second-year undergraduate course covers data skills such as R Markdown, data wrangling with tidyverse, and data visualisation with ggplot2. It also introduces statistical concepts such as permutation tests, NHST, alpha, power, effect size, and sample size. Semester 2 focusses on correlations and the general linear model.

This book is currently being updated and many chapters have not yet been posted. Access the older version.

Authors: Phil McAleer, Carolina Kuepper-Tetzel, Helena Paterson
Contact: Carolina Kuepper-Tetzel

Level 3: Statistical Models

This third-year undergraduate course teaches students how to specify, estimate, and interpret statistical models corresponding to various study designs, using a General Linear Models approach.

Author: Dale Barr

Postgraduate Books

Fundamentals of Quantitative Analysis

This book contains materials for students on the MSc Conversion in Psychological Studies/Science, a one-year postgraduate degree for students with a non-psychology undergraduate degree. This research methods course covers core data skills that allow you to manipulate and analyse quantitative data.

Author: Emily Nordmann
Contact: Phil McAleer

Data Skills for Reproducible Research

This book provides an overview of skills needed for reproducible research and open science using the statistical programming language R and tidyverse packages. It covers reproducible workflows, data visualisation, data tidying and wrangling, archiving, iteration and functions, probability and data simulations. It assumes at least an undergraduate level of methods training, but no prior experience in R.

Authors: Lisa DeBruine, Dale Barr
Contact: Lisa DeBruine
Contributors: Rebecca Lai

Statistics and Research Design

Coming soon! The second term statistics course for our MSc in Research Methods.

Authors: James Bartlett, Christoph Scheepers, Guillaume Rousselet
Contact: James Bartlett

Other Books

Glossary of Terms

PsyTeachR books (and external websites) can link to the glossary to define common terms. Anyone can contribute to the glossary through the github project.

Contact: Lisa DeBruine

Applied Data Skills

This book provides an overview of the basic skills needed to turn raw data into informative summaries and visualisations presented in professional reports and presentations.

Authors: Emily Nordmann, Lisa DeBruine

A Handy Workbook for Research Methods & Statistics

A Handy Workbook to help students understand Research Methods and Statistics through worked examples and self-tests.

Author: Phil McAleer

Data Visualisation Using R, For Researchers Who Don’t Use R

In this tutorial, we provide a practical introduction to data visualisation using R, specifically aimed at researchers who have little to no prior experience of using R.

Authors: Emily Nordmann, Phil McAleer, Wilhelmiina Toivo, Helena Paterson, Lisa DeBruine

Contact: Emily Nordmann

Tutorials

Collected short tutorials in R.

Authors: psyTeachR Team

Contact: Dale Barr

Building Web Apps with R Shiny

Learn the basics of Shiny app programming, including skills that will form the basis of almost any app you want to build.

Contact: Lisa DeBruine

Coding Club: Creating an R Package

Making an R package develops generic coding skills and gives you valuable insight to how R works. Covers setting up a package project, creating functions, documenting them with roxygen, creating vignettes, unit testing, package testing, version control with git, and distribution with github.

Contact: Lisa DeBruine

PsyTeachR Book Template

Fork the GitHub project to get started making a book with the psyTeachR styles and conventions. This includes custom code to make the subheader menu accessible on mobile or smaller screens, and integrated support for webexercises. The template has a CC-BY-SA license, so feel free to make any modifications.

Contact: Lisa DeBruine

R Packages

{webexercises}

The R package {webexercises} helps instructors easily create interactive web pages that students can use in self-guided learning. (formerly webex )

Authors: Dale Barr, Lisa DeBruine

{markr}

The R package {markr} helps instructors create individual feedback documents and marking summaries from flexibly organised spreadsheets and other types of input.

Authors: Lisa DeBruine, Helena Paterson, Phil McAleer

{faux}

The R package {faux} package makes it easier to simulate data with a specified structure.

Author: Lisa DeBruine

Web Apps

simulate

Shiny app exploring a few basic distributions that you can sample in R. Generating random samples is a good way to get better intuitions about what data look like. By Lisa DeBruine, source code on github, License: CC-BY-SA

normal-distributions

Shiny app to help students understand how to use the distribution and quantile functions pnorm() and rnorm() for the normal distribution. By Jack Taylor, source code on github, License: CC-BY-SA

peek

Shiny app that asks: Just how bad is it to peek at your data every few observations and stop collecting data once you have a significant result? By Lisa DeBruine, source code on github, License: CC-BY-SA

bivariate

d3.js (JavaScript) app to help students understand bivariate distributions. By Dale Barr, source code on github, License: CC-BY-SA

covariance-quiz

Shiny app quiz on covariance matrices. By Dale Barr, source code on github, License: CC-BY-SA

plotdemo

Shiny app to visualize simulated data from a 2x2 factorial design with 6 different plots. By Lisa DeBruine, source code on github, License: CC-BY-SA

faux-app

Shiny app to set up a factorial design, simulate data, visualise and download it. By Lisa DeBruine, source code on github, License: CC-BY-SA

lmem_sim

Shiny app demonstrating simulation of data with crossed random effects of subjects and items, to accompany tutorial paper by Debruine and Barr (2021). By Lisa DeBruine, source code on github, License: CC-BY-SA