Statistical Programming for the Social Sciences Using R
Preface
Welcome! This is the companion website for Statistical Programming for the Social Sciences Using R, taught at the Sciences Po Reims campus in the Spring 2024 term. The course is a broad introduction to the general programming skills required for data analysis in the social sciences.
This online textbook contains the relevant tutorials for each week’s lesson as well as other resources that you may find helpful throughout the course. The syllabus, slides, assignment submission portals, and other files can be found on the course Moodle site.
Resources
There are a variety of R resources out there, many of which have been useful in developing this course.
If you would like to dig deeper into a particular topic or simply want to read other explanations of the concepts discussed in this course, here is a list of helpful resources:
- R for Data Science, 2e by Hadley Wickham, Mine Çetinkaya-Rundel, and Garrett Grolemund (link): A free introductory textbook on how to use the many features of
Rto make sense of data, co-authored by the creator of the tidyverse package. - Data Visualization by Kieran Healy (draft textbook): An introductory textbook on how to make practical and beautiful data visualizations in
R. Healy has a distinctive and appealing visual style. He also happens to be an accomplished sociologist, known especially for his disdain of nuanced theory and his broader contributions to the study of morals and markets. His examples are especially relevant to the social sciences as a result. - Introduction to Econometrics with R by Florian Oswald and colleagues at Sciences Po (companion textbook and slides): you may very well be taking this course because you couldn’t get into this other course. For this, I am both sorry, because you are missing out, and not sorry, because it keeps me gainfully employed and gives me an excuse to write this textbook. Fortunately for you, the course developed by Professor Oswald and colleagues is freely-available online. If you’d like to see material which is more heavily-weighted towards applied statistical methods (especially applied economics), take a look at their extremely well put together course. You may very well rue the day you woke up late for course sign-ups.
- ggplot2: Elegant Graphics for Data Analysis (3e) by Hadley Wickham, Danielle Navarro, and Thomas Lin Pedersen (link): An in-depth explanation of how the popular
ggplot2data visualization package works.
Change Log
I’ll be making frequent updates to the textbook, often changing the appearance, structure, and/or content. In general, these changes won’t be substantive. In other words, they won’t change what you are required to know or how you are expected to do things. You might, however, find that certain sections become more detailed as the course progresses. If you would like to see a detailed list of changes (including my frequent struggles with word choice), take a look at the GitHub repository. For those of you with better things to do in your spare time, a brief chronological summary of updates is provided below:
- 2024.04.09 - Minor edits to Chapter 8.
- 2024.04.08 - Chapter 8 has been posted.
- 2024.03.26 - Minor edits to Chapter 7.
- 2024.03.25 - Chapter 7 has been posted.
- 2024.03.19 - Minor edits to Chapter 6.
- 2024.03.17 - Chapter 6 has been posted.
- 2024.03.07 - More minor edits to Chapter 5.
- 2024.03.06 - Minor edits to Chapter 5 for clarity, typos.
- 2024.03.05 - Homework 3 has been posted.
- 2024.03.03 - Chapter 5 has been posted.
- 2024.03.01 - Fixes to Chapter 4 code. A couple of functions were missing
scales::. - 2024.02.25 - Chapter 4 has been posted.
- 2024.02.22 - Another resource added to the preface. Minor copy edits.
- 2024.02.18 - I’ve refactored the course website from R Markdown to Quarto. You may notice some significant changes to the appearance of the website, including the appearance of a new navigation bar on the right-hand side (used for navigating sections within a chapter) and changes to the standard navigation bar on the left-hand side (no more sections and subsections). I’m not completely in love with the navigation bar changes, but the other benefits of switching to Quarto are worth it (more functionality, better visual appeal in other areas). Links have been updated as a result (apologies to those of you who may have bookmarked sections). Also, a technical note has been added to Homework #2 (it will not affect the grading of relevant questions).