R for Reproducible Psychological Research
Overview
- Credit value: 15 credits at Level 6
- Convenor: Dr Marie Smith
- Assessment: two coursework assessments (40% and 60%)
Module description
This module will introduce you to the fundamentals of programming and data science using R Studio, an interactive environment for statistical computing, data visualisation and research. It will focus on learning the tools necessary to be able to analyse and visualise data via a scripted, open workflow as a cornerstone to building transparency and reproducibility in psychological research. The module assumes knowledge of statistical approaches covered in the Introduction to Research Methods and Research Methods 1 modules. You will need access to a PC or Mac with R Studio installed.
Indicative module syllabus
- Getting started in R Studio, and learning the basics of object-orientated programming
- Installing R and R Studio
- Objects and assignments
- Getting help
- Workspaces (how to save stuff)
- Reading data in and out
- Intro to R packages
- Working with data in R
- Basic data types and structures
- Data visualisation with base R
- Data vis with ggplot2
- Reshaping data frames in base R
- Advanced functions and/r packages
- Difference between base R and tidyverse packages
- Application of statistical approaches in R
- T tests
- Correlation and regression
- ANOVA
- Categorical data
- Programming in R
- Scripting
- Piping
- Loops
- Conditional statements
- Writing functions
- Debugging
- R Markdown for reproducibility
- Intro to R Markdown for project management
- Basics of R Markdown + R code chunk
- Knitr and output formats
Learning objectives
By the end of this module, you will be able to:
- import and export data into/out of R Studio
- understand R data types and structures
- manipulate and clean data into an appropriate format for analysis
- perform descriptive and inferential statistical techniques learnt in IRM and RM1 (e.g. t-test, correlation, ANOVA)
- produce informative data visualisations using base R and ggplot2
- understand the basic principles of programming and scripting
- produce reproducible reports using R Markdown.