Office Hours: Tuesdays, 2:30-3:30, Baldwin 414 (or by appointment)
Introduction to R: Code and Examples - Load and manipulate 2016 precinct-level presidential election data.
Linear Regression in R with code.
Problem set 1
Problem set 2
- Questions - ps2.pdf
- Data - 2016 and 2008 Election Data and U.S. County Demographics - votes-trunc.csv
- Solutions: Solutions, Solutions with R Code and Explanations for "Election Forensics" and "Hillary's 2020 Vision"
01-10-Introduction to Quantitative Methods and R - What is data? Parameters and statistics. What are variables? How do we go about measuring variables?
- 2016 Presidential Election Data by Precinct and State (thanks to Stephen Pettigrew!) - president-long.csv
- R code - election-data.r
01-12-R, Randomization and Sampling - Continuation of discussion about variables. Manipulating variables in R. Randomization and sampling. Simple random sampling.