This course was originally written to teach researchers to analyse data using Stata, which was the analysis program of choice in the Centre for Epidemiology for many years. We are now encouraging the use of R within the Centre in parallel with Stata, and this material is aimed at helping people who have successfully completed the Stata course to apply what they have learnt in R.

Session Title Content Slides Handouts Solution Datafiles Further Reading
1 Introduction to RStudio
  • Windows
  • Manipulating Objects
2 Summarising Data
  • Types of data
  • Graphical Summaries
  • Numerical Summaries
Practical Solution
3 Sampling and Confidence Intervals
  • Types of sampling
  • Estimation from random samples
  • Sampling Error
  • Reference Ranges
  • Confidence Intervals
  • Sample Size
Practical Solution
4 Hypothesis Testing and Power
  • Hypothesis Tests
  • Power calculations
5 Linear Models 1
  • Assumptions
  • Interpretation
  • Inference
  • Goodness of Fit
  • Diagnostics
6 Linear Models 2
  • Categorical variables
  • Interactions
  • Confounding
  • Variable Selection
7 Modelling Binary Outcomes
  • Limits of Linear Regression
  • Generalised linear models
  • Logistic Regression
  • Logistic Regression Diagnostics
  • Sensitivity and specificity
  • Alternative Models
8 Modelling Categorical Outcomes
  • Nominal Outcomes
    • Multinomial Regression
      Lincom
  • Ordinal Outcomes
9 Modelling Counts
  • Poisson Regression
  • Constraints
  • Overdispersion
  • Negative Binomial Regression
10 Survival Analysis
  • Censoring
  • Survival Curves and Life Tables
  • Comparing Survival Curves
  • Parametric Regression
  • Cox Regression
11 Refinements of the Stata Language
  • Graphics
  • Summarising Data
  • More Syntax
  • Looping
  • Reshaping data