Question: Utilize RStudio to answer this question (this is a data science class). 2. In this question we're going to look at some data from a

Utilize RStudio to answer this question (this is a data science class).

Utilize RStudio to answer this question (this is a data science class).

2. In this question we're going to look at some data from a recent Marist poll. The survey was conducted between January 11th and 13th, 2021. The sampling frame was all American adults. When you're analyzing these data, you can ignore the survey weights. We'll talk later in the semester about generally you would want to use them, but for simplicity, we'll pretend we don't need them here. We've also included a codebook, which should help you to identify which variables you should use in each stage of the analysis. a. Begin by reading in the data. There's lots of options for doing this, but the import() function in the rio package might be helpful here. How many rows and columns appear in the dataset? b. What proportion of the people in the survey said that they were male? What proportion said that they were female? c. Now let's look at how survey respondents evaluated the historical legacy of President Trump (question TRUD016). For anybody who was unsure of their answer to that question, or who refused to answer, set their value in the survey to missing. Then calculate the percentage of survey respondents who said that President Trump would go down as one of the best presidents in US history. What is that percentage? What percentage of respondents said they think he'll go down as one of the worst presidents in history? d. Using the question about who the respondents voted for in the 2020 election (PZ20VT), how many people in this survey said that they thought Trump would be one of the best presidents in US history, but also voted for Biden? Of the people who said Trump was one of the best presidents in US history, what proportion voted for Biden? How many people said Trump would go down as one of the worst presidents in US history, but still voted for Trump? Of the people who said Trump was one of the worst presidents in US history, what proportion voted for him? For this question, be sure to code responses of 'unsure' and 'refused' to missing in the 2020 vote choice question. e. Let's dig a little further into these people who said Trump would go down as one of the worst presidents, but still voted for him. Let's start by creating a new dataframe that only includes people who said that they voted for Trump in 2020. Then create a dummy variable (true/false) that indicates whether or not they said they thought Trump would go down as one of the worst presidents. What proportion of Trump voters said they thought he would go down as one of the worst presidents? f. Let's compare these worst-president-Trump-voters to Trump voters who didn't say he would go down as one of the worst. What proportion of each of these two groups said they were Democrats (question PRTD3)? What proportions of the groups said they had a favorable opinion of Joe Biden (question BIDJ020)? What might these numbers tell us about these unusual survey respondents? g. Choose another question in the survey (like a demographic feature or an attitude toward some other political issue) and use it to compare the Trump voters who think he'll go down as one of the worst presidents to all the other Trump voters. Discuss what you've found

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!