Data Science Intermediate

Longitudinal Data Preparation and Visualisation for Epidemiological and Social Research
8 - 9 MARCH 2023
pre-recorded lectures available from 1st of March 2023

Giorgio Di Gessa, Alex Cernat, Andrea Aparicio Castro

This online course is for anyone that needs to prepare longitudinal data for analysis. It will cover the main procedures needed from converting raw longitudinal data to cleaned data that can be readily analysed.

The course will have two sessions, one covering data preparation and the other covering data description and visualization. Both will focus on longitudinal data and real-world data. You can take the module either in R or in Stata, each will have its own videos and practical exercises.

  • Importing and merging data
  • Selecting cases and variables
  • Reshaping data
  • Recoding variables (using loops)
  • Describing data using summary statistics
  • Creating transition tables
  • Using graphs for exploratory analysis

By the end of this course you will be able to:

  • Understand how complex large-scale datasets are structured
  • Prepare, using syntax files, complex datasets for appropriate statistical analysis by:
    • Combining multiple datasets, and aggregating/disaggregating data from different files in a relational database
    • Manipulating, recoding, and computing derived variables
  • Provide descriptive summary statistics and graphical representations of the data

There will be two sessions, each consisting of a pre-recorded lecture (length varies) and a 1.5-hour live computer practical session in R or Stata.



From Monday 1st March

Pre-recorded lectures available

Lecture 1

Lecture 2

Longitudinal data preparation

Longitudinal data description and visualisation

Wednesday 8th March


Practical 1 in either Stata or R

Tuesday 9th of March


Practical 2 in either Stata or R

An understanding of quantitative data structures and types of variables.


This is a UKRI funded project offering rigorous training in longitudinal data science. Please note that this training is NOT available to students due to the UKRI grant rules. Therefore, if you are an undergraduate or postgraduate (including PhD), you are not eligible to attend this training. You will be asked for your company email and job title in order to register.