Problem Set 5
Data in the Tidyverse
Before attempting this assignment, be sure to follow the instructions noted in Week 4 page under “Course Content”.
Data Work
Use the Cooperative Congressional Election Study/Cooperative Election Study (CCES/CES) Cumulative file.
Use only the 2024 data. Recode the 5 category ideology variable to a three category variable: liberal, moderate, conservative.
Recode the presidential vote variable to look just at two party vote (in other words, recode vote so that respondents who reported voting for candidates other than Trump or Harris are “missing”).
Create a table. What proportion of respondents who are liberal voted for Trump? What proportion of respondents who are conservative voted for Harris?
Find the variable that refers to whether people own or rent their home. Recode the variable so that “other” is missing.
Create a table. What portion of people who own their homes voted for Trump? Harris? What portion of people who rented voted for Trump? Harris?
Finally, locate the education variable. Recode the variable so that those with a high school degree or less are in one category, those with some college but less than a four year degree are in a second, those with a college degree are in a third, and those with a post-grad degree are in a fourth.
Create a table. What does education tell us about vote in the 2024 election?
Submission
This is an optional assignment. We will go over it in class, but work is not due for it.