By the end of the lab you will be able to…
The data for this assignment comes from an online Ipsos survey that was conducted for the FiveThirtyEight article “Why Many Americans Don’t Vote”. You can read more about the survey design and respondents in the README of the GitHub repo for the data.
Respondents were asked a variety of questions about their political beliefs, thoughts on multiple issues, and voting behavior. We will focus on using the demographic variables and someone’s party identification to understand whether a person is a probable voter.
The variables we’ll focus on are (definitions from the codebook in data set GitHub repo):
ppage
: Age of respondent
educ
: Highest educational attainment category.
race
: Race of respondent, census categories. Note: all categories except Hispanic are non-Hispanic.
gender
: Gender of respondent
income_cat
: Household income category of respondent
Q30
: Response to the question “Generally speaking, do you think of yourself as a…”
voter_category
: past voting behavior:
You can read in the data directly from the GitHub repo:
<- read_csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/non-voters/nonvoters_data.csv") voter_data
Note that the authors use weighting to make the final sample more representative on the US population for their article. We will not use the weighting in this assignment, so we should treat the sample as a convenience sample rather than a random sample of the population.
Why do you think the authors chose to only include data from people who were eligible to vote for at least four election cycles?
Let’s prepare the data for analysis and modeling.
Q30
contains the respondent’s political party identification. Make a new variable that simplifies Q30
into four categories: “Democrat”, “Republican”, “Independent”, “Other” (“Other” also includes respondents who did not answer the question).voter_category
identifies the respondent’s past voter behavior. Relevel the variable to make rarely/never the baseline level, followed by sporadic, then always.In the FiveThirtyEight article, the authors include visualizations of the relationship between the voter category and demographic variables such as race, age, education, etc. Select two demographic variables. For each variable, interpret the plot to describe its relationship with voter category.
Fit a model using mean-centered age, race, gender, income, and education to predict voter category. Show the code used to fit the model, but do not display the model output.
Should party identification be added to the model? Use a drop-in-deviance test to determine if party identification should be added to the model. Include the hypotheses in mathematical notation, the output from the test, and the conclusion in the context of the data. Then, neatly display the model you selected.
Use the model you select for the remainder of the assignment.
Interpret the following coefficents in the context of the data in terms of the odds of voting sporadically versus rarely/never.
In the article, the authors write
“Nonvoters were more likely to have lower incomes; to be young; to have lower levels of education; and to say they don’t belong to either political party, which are all traits that square with what we know about people less likely to engage with the political system.”
Does your model support this statement? Briefly explain why or why not.
Let’s use the model to predict the voting categories. Obtain the predicted voter category for each observation.
There should only be one submission per team on Gradescope.
Component | Points |
---|---|
Ex 1 - 8 | 45 |
Workflow & formatting | 5 |
Grading notes: