The DSS folder with all the files necessary to complete the exercises in the book
Students' and instructors' repository for Llaudet, Elena and Kosuke Imai. Data Analysis for Social Science, A Friendly and Practical Introduction (Princeton University Press, 2022)
This repository contains the R scripts (.R files) and datasets (.csv files) used in the book exercises.
-
Chapter 1: Introduction
- R Script: Introduction.R
- Dataset: STAR.csv
-
Chapter 2: Estimating Causal Effects with Randomized Experiments
- Research Question: Do Small Classes Improve Student Performance?
- Based on: Frederick Mosteller, "The Tennessee Study of Class Size in the Early School Grades," Future of Children 5, no. 2 (1995): 113-27.
- R Script: Experimental.R
- Dataset: STAR.csv
-
Chapter 3: Inferring Population Characteristics via Survey Research
- Research Question: Who Supported Brexit?
- Based on: Sara B. Hobolt, "The Brexit Vote: A Divided Nation, a Divided Continent," Journal of European Public Policy 23, no. 9 (2016): 1259-77, and Sascha O. Becker, Thiemo Fetzer, and Dennis Novy, "Who Voted for Brexit? A Comprehensive District-Level Analysis," Economic Policy 32, no. 92 (2017): 601–50.
- R Script: Population.R
- Datasets: BES.csv, UK_districts.csv
-
Chapter 4: Predicting Outcome Using Linear Regression
- Goal: Predict GDP Growth Based on Night-Time Light Emissions
- Based on: J. Vernon Henderson, Adam Storeygard, and David N. Weil, "Measuring Economic Growth from Outer Space," American Economic Review 102, no. 2 (2012): 994–1028.
- R Script: Prediction.R
- Dataset: countries.csv
-
Chapter 5: Estimating Causal Effects with Observational Data
- Research Question: What Was the Effect of Russian TV Propaganda on Ukrainians' 2014 Voting Behavior?
- Based on: Leonid Peisakhin and Arturas Rozenas, "Electoral Effects of Biased Media: Russian Television in Ukraine," American Journal of Political Science 62, no. 3 (2018): 535–50.
- R Script: Observational.R
- Datasets: UA_survey.csv, UA_precincts.csv
-
Chapter 6: Probability
- Goal: Learn Basic Probability
- R Script: Probability.R
- Dataset: STAR.csv
-
Chapter 7: Quantifying Uncertainty
- Goal: Complete Some of the Analyses from Chapters 2 through 5 by Quantifying the Uncertainty in the Empirical Findings
- R Script: Uncertainty.R
- Datasets: BES.csv, STAR.csv, countries.csv, UA_survey.csv
We recommend downloading the whole folder and saving it directly on your Desktop.