::install_github("mattblackwell/gov50data") remotes
Prediction: Elections and Regression
This content is from Fall 2022. Go to Fall 2023 site
Readings
- For prediction and loops, see QSS 4.1 (you can skip 4.1.1)
- For regression, see either MD Ch 5 or QSS 4.2 (you can skip 4.2.5).
Data
- Reinstall the Gov 50 data package that has new data for this week:
- If you cannot install the package, you can download the data locally at
library(tidyverse)
<- read_csv("polls20.csv")
polls20 <- read_csv("pres20.csv")
pres20 <- read_csv("national_polls20.csv") national_polls20
- You may need to install the
lubridate
package if it’s not installed:
install.packages("lubridate")
- For Thursday, you may want to reinstall the
gov50date
package and install thebroom
package:
install.packages("broom")
Slides and Code
- Tuesday (10/11) lecture: Prediction and loops
- PDF of slides as I present them
- PDF of handout version of slides (no incremental slides)
- Tuesday (10/13) lecture: Regression
- PDF of slides as I present them
- PDF of handout version of slides (no incremental slides)