Below you will find the Student Resources for the book, and you will be able to download the data sets and R scripts by chapter.
- An R package, which contains all the code and data for QSS is available with instructions for download at these three links:
- Directions to download swirl exercises are available at these two links:
- Interactive Tutorials for Quantitative Social Science: qsslearnr
- The exercises available on these resource pages are in standard R code. A tidyverse version of the QSS code has been created by Jeff Arnold (University of Washington) and is available at https://jrnold.github.io/qss-tidy/. For more information on tidyverse see http://tidyverse.org/
- Download the complete Illustration Package
- Download the Errata (6-28-20) [PDF]
Chapter 1: Introduction
Download all the supporting files for Chapter 1: Introduction
Code
- The markdown file for the entire chapter: intro.Rmd
- The pdf file with outputs: intro.pdf
- The script for the entire chapter: intro.R
- The script used in Section 1.3.8: UNpop.R
Data sets
Main text
- World population estimates data (Table 1.2): UNpop.csv, UNpop.RData, UNpop.dta
Exercises
- US election turnout data (Table 1.3): turnout.csv
- Fertility and Mortality estimates data (Table 1.4): World.csv, Kenya.csv, Sweden.csv
Chapter 2: Causality
Download all the supporting files for Chapter 2: Causality
Code
- The markdown file for the entire chapter: causality.Rmd
- The pdf file with outputs: causality.pdf
- The script for the entire chapter: causality.R
Data sets
Main text
- Resume experiment data (Table 2.1): resume.csv
- Social Pressure Experiment Data (Table 2.4): social.csv
- Minimum-Wage Study Data (Table 2.5): minwage.csv
Exercises
- STAR Project Data (Table 2.6): STAR.csv
- Gay Marriage Study Data (Table 2.7): gay.csv
- Leader Assassination Data (Table 2.8): leaders.csv
Chapter 3: Measurement
Download all the supporting files for Chapter 3: Measurement
Code
- The markdown file for the entire chapter: measurement.Rmd
- The pdf file with outputs: measurement.pdf
- The script for the entire chapter: measurement.R
- The script used in Section 1.3.8: UNpop.R
Data sets
Main text
- Afghanistan Survey Data (Table 3.1): afghan.csv
- Afghanistan Village Data (Table 3.2): afghan-village.csv
- Legislative Ideal Points Data (Table 3.3): congress.csv
- US Gini Coefficient Data (Table 3.4): USGini.csv
Exercises
- Reshaped Gay Marriage Study Data (Table 3.5): gayreshaped.csv
- Cooperative Campaign Analysis Project (CCAP) Data (Table 3.6): ccap2012.csv
- Political Efficacy Data (Table 3.7): vignettes.csv
- UN Voting Data (Table 3.8): unvoting.csv
Chapter 4: Prediction
Download all the supporting files for Chapter 4: Prediction
Code
- The markdown file for the entire chapter: prediction.Rmd
- The pdf file with outputs: prediction.pdf
- The script for the entire chapter: prediction.R
Data sets
Main text
- 2008 Presidential Election Data (Table 4.1): pres08.csv
- 2008 Presidential Polling Data (Table 4.2): polls08.csv
- 2008 Presidential National Polling Data (Table 4.3): pollsUS08.csv
- Facial Appearanace Experiment Data (Table 4.4): face.csv
- 2012 US Presidential Election Data (Table 4.5): pres12.csv
- 1996 and 2000 US Presidential Election Data for Florida Counties (Table 4.6): florida.csv
- Women as Policy Makers Experiment Data (Table 4.7): women.csv
- Revisiting the Social Pressure Experiment Data (Table 2.4): social.csv
- British Parliament Member Personal Wealth Data (Table 4.8): MPs.csv
Exercises
- 2008 Intrade Prediction Market Data (Table 4.9): intrade08.csv
- 2012 Intrade Prediction Market Data (Table 4.9): intrade12.csv
- Progresa Program Data (Table 4.11): progresa.csv
- Brazilian Government Transfer Data (Table 4.12): transfer.csv
Chapter 5: Discovery
Download all the supporting files for Chapter 5: Discovery
Code
- The markdown file for the entire chapter: discovery.Rmd
- The pdf file with outputs: discovery.pdf
- The script for the entire chapter: discovery.R
Data sets
Main text
- ‘The Federal Papers’ Data (Table 5.1): federalist/
- Florence Marriage Network Data (Table 5.3): florentine.csv
- Senator Follow / Following Data (Table 5.4): twitter-following.csv
- Senator Information Data (Table 5.4): twitter-senator.csv
- 2008 Presidential Election Results (Table 4.1): pres08.csv
- Walmart Store Opening Data (Table 5.5): walmart.csv
Exercises
- Analyzing the Preambles of Constitutions (Table 5.6): constitution.csv
- International Trade Network Data (Table 5.7): trade.csv
- County-Level US Presidential Election Data (Table 5.8): elections.csv
Chapter 6: Probability
Download all the supporting files for Chapter 6: Probability
Code
- The markdown file for the entire chapter: probability.Rmd
- The pdf file with outputs: probability.pdf
- The script for the entire chapter: probability.R
Data sets
Main text
- Florida Registered Voter List Sample Data (Table 6.1): FLVoters.csv
- US Census Bureau Surname List Data (Table 6.3): names.csv
- Florida Census Data at the Voting District Level (Table 6.4): FLCensusVTD.csv
- 2008 US Presidential Election Data (Table 4.1): pres08.csv
Exercises
- Intrade Betting Market Data (Table 4.9): intrade08.csv
- Russian and Canadian Election Data (Table 6.5): fraud.RData
Chapter 7: Uncertainty
Download all the supporting files for Chapter 7: Uncertainty
Code
- The markdown file for the entire chapter: uncertainty.Rmd
- The pdf file with outputs: uncertainty.pdf
- The script for the entire chapter: uncertainty.R
Data sets
Main text
- 2008 US Presidential Election Data (Table 4.1): pres08.csv
- 2008 US Presidential Polls Data (Table 4.2): polls08.csv
- Student-Teacher Achievement Ratio (STAR) Data (Table 2.6): STAR.csv
- Resume Experiment Data (Table 2.1): resume.csv
- Minimum Wage Study Data (Table 2.5): minwage.csv
- Women as Policy Makers Experiment (Table 4.7): women.csv
- British Parliament Personal Wealth Data (Table 4.8): MPs.csv
Exercises
- Sex Ratio and the Price of Agricultural Crops in China (Table 7.4): chinawomen.csv
- TESS Program Academic Research Data (Table 7.5): filedrawer.csv
- Published Journal Article Data (Table 7.6): published.csv
- Analysis of the 1932 German Election (Table 7.7): nazis.csv