Is such a bias present in the american national

Info icon This preview shows pages 2–4. Sign up to view the full content.

because they may feel that they should have voted. Is such a bias present in the American National Election Studies (ANES)? The ANES is a national survey that has been conducted for every election since 1948. The ANES conducts face to face interviews with a nationally representative sample of adults. Download the dataset, turnout.Rdata, which you'll find on the course website. You may want to put it in your working directory to make it easy to find (use `getwd()` to see what your current working directory is; you can use the Session menu in Rstudio or the `setwd()` command to change your working directory.) Here is a brief description of the variables: * year - election year * ANES - ANES estimated turnout rate * VEP - Voting Eligible Population (in thousands) * VAP - Voting Age Population (in thousands) * total - total ballots cast for highest office (in thousands) * felons - total ineligible felons (in thousands) * noncitizens - total non-citizens (in thousands) * overseas - total eligible overseas voters (in thousands) * osvoters - total ballots counted by overseas voters (in thousands) ####Q1 ```{r} load("turnout.RData") ``` ####Q2 ```{r} #rows nrow(data) #columns ncol(data) #observations" 14
Image of page 2

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

#dimensions dim(data) #range range(data$year) ``` The observations for 2006 are missing, and the data for the odd years between 1990-2008 are missing. ####Q3 **3a** ```{r} data$difference <- abs(data$VAP - data$VEP) print(data$difference) #minimum difference min(data$difference) #maximum difference max(data$difference) ``` **3b** ```{r} model1 <- lm(data$difference ~ data$year) plot(data$year, data$difference, ylab = "difference between VAP and VEP", xlab = "election year", main = "Difference between VAP and VEP over Time") model2 <- lm(data$difference ~ data$felons) plot(data$felons, data$difference, ylab = "difference between VAP and VEP", xlab = "# of felons", main = "Difference between VAP and VEP based on Felons' Population") ``` ####Q4 **4a** ```{r} turnout <- data$total/(data$VEP + data$overseas) data$turnout <- data$total/(data$VEP + data$overseas) print(turnout) ``` **4b** ```{r} diff2 <- data$turnout - data$ANES print(diff2) #average difference mean(diff2) #minimum difference min(diff2)
Image of page 3
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern