In January 2018 I was invited to teach a short course on survey statistics at the Chair of Political Science at the University of Heidelberg (Germany), headed by my friend and colleague Jale Tosun.
The course was meant to introduce the students to the issues that we all encounter when working with survey data, as well as to the perks of working with R for survey data analysis. It consisted of three theoretical sessions (general intro to survey methodology/design; sampling & weighting; measurement) and two practical sessions (intro to R and dplyr; working with survey weights with R using the srvyr and the survey packages).
The course drew shamelessly from two books: "Survey Methodology" by Robert Groves and colleagues, and "Complex Surveys: A Guide to Analysis Using R" by Thomas Lumley (who is also responsible for the famous survey package for R).
Below you can find the slides, as well as the R scripts for the two lab sessions.
Session 1: Survey Methodology 101 [Slides] [Lab]
Session 2: Sampling and weighting [Slides] [Lab]
Session 3: Measurement [Slides]