Introduction

Whereas the death penalty, abortion and LGBT rights are different issues, they are often classified as cultural issues in public opinon. It has been controversial among researchers whether and how people’s attitudes toward the issues are related to each other. This analysis seeks to provide a better understanding on the relationships by answering the following questions.

  • Question 1: Is a person’s view on the death penalty related to their view on abortion?
  • Question 2: Is a person’s view on the death penalty related to their feelings toward gays and lesbians?

Data

In order to investigate the questions outlined above, I utilize the dataset offered by the Democracy Fund Voter Study Group and analyze the resposes to the VOTER Survey, which was published as the first original reserach of the group in 2017.

Variables

In order to conduct the analysis, I focus on respondants’ answers to the following three survay questions.

  • DeathPenalty: Are you in favor or opposed to the death penalty for persons convicted of murder?
  • Abortion: Do you think abortion should be…Legal in all cases / Legal in some cases and illegal in others / Illegal in all cases?
  • FTGays: We would like to get your feelings toward [Gays/Lesbians]. Ratings between 50 degrees and 100 degrees mean that you feel favorable and warm toward the group. Ratings between 0 degrees and 50 degrees mean that you do not feel favorable toward the group and that you don???t care too much for that group. You would rate the group at the 50 degree mark if you don???t feel particularly warm or cold toward the group.

Note: Respondants’ answers “Not sure” are coded as NA in the analysis to meet the purpose of this research.

Analysis Plan

Firstly, I look at how the averate rating of FTGays varies based on a person’s DeathPenalty by taking the following measures.

  • Create a crosstab to investigate how people are distributed across categories
  • Run a chi-squared test to determine whether DeathPenalty and Abortion are independent from one another, or are influencing one another

Secondly, I look at how a person’s Abortion varies based on their DeathPenalty by taking the following measures.

  • Calculate the mean and standard deviation of FTGays and look at the differences between those who favor death penalty and those who are opposeed to it
  • Visualize the distribution as a bar chart and histogram
  • Plot a sampling distribution to check whether a t-test on the difference is likely to reach statistical significance.
  • Run a t-test to determine whether the difference in the average FTGays between the two groups is statistically significant or not

Data Preparation

#install.packages("readr")
#install.packages("dplyr")
#install.packages("ggplot2")

library(readr) 
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(knitr)
library(ggplot2)

VoterData <- read_csv("~/Tsukasa/NY/CUNY/Class/Spring 2019/Programming for Social Research/VoterData2017(1).csv")
## Parsed with column specification:
## cols(
##   .default = col_double(),
##   redovote2016_t_2017 = col_character(),
##   job_title_t_2017 = col_character(),
##   izip_2016 = col_character(),
##   presvote16post_t_2016 = col_character(),
##   second_chance_t_2016 = col_character(),
##   race_other_2016 = col_character(),
##   healthcov_t_2016 = col_character(),
##   employ_t_2016 = col_character(),
##   pid3_t_2016 = col_character(),
##   religpew_t_2016 = col_character(),
##   votemeth16_rnd_2016 = col_character(),
##   presvote16post_rnd_2016 = col_character(),
##   vote2016_cand2_rnd_2016 = col_character(),
##   Clinton_Rubio_rnd_2016 = col_character(),
##   Clinton_Cruz_rnd_2016 = col_character(),
##   Sanders_Trump_rnd_2016 = col_character(),
##   Sanders_Rubio_rnd_2016 = col_character(),
##   second_chance_rnd_2016 = col_character(),
##   obamaapp_rnd_2016 = col_character(),
##   fav_grid_row_rnd_2016 = col_character()
##   # ... with 121 more columns
## )
## See spec(...) for full column specifications.
## Warning: 13 parsing failures.
##  row                      col           expected actual                                                                                       file
## 1418 religpew_muslim_baseline 1/0/T/F/TRUE/FALSE     90 '~/Tsukasa/NY/CUNY/Class/Spring 2019/Programming for Social Research/VoterData2017(1).csv'
## 1531 child_age7_1_baseline    1/0/T/F/TRUE/FALSE     6  '~/Tsukasa/NY/CUNY/Class/Spring 2019/Programming for Social Research/VoterData2017(1).csv'
## 1531 child_age8_1_baseline    1/0/T/F/TRUE/FALSE     4  '~/Tsukasa/NY/CUNY/Class/Spring 2019/Programming for Social Research/VoterData2017(1).csv'
## 1531 child_age9_1_baseline    1/0/T/F/TRUE/FALSE     2  '~/Tsukasa/NY/CUNY/Class/Spring 2019/Programming for Social Research/VoterData2017(1).csv'
## 2947 religpew_muslim_baseline 1/0/T/F/TRUE/FALSE     2  '~/Tsukasa/NY/CUNY/Class/Spring 2019/Programming for Social Research/VoterData2017(1).csv'
## .... ........................ .................. ...... ..........................................................................................
## See problems(...) for more details.
NewVoterData <- VoterData%>%
  select(deathpen_2016,
         abortview3_2016,
         ft_gays_2017)%>%
  rename("DeathPenalty" = deathpen_2016, 
         "Abortion" = abortview3_2016,
         "FTGays"= ft_gays_2017)%>%
  mutate(DeathPenalty = ifelse(DeathPenalty==1,"Favor the death penalty",
                         ifelse(DeathPenalty==2,"Opposed to the death penalty",NA)),
         Abortion=ifelse(Abortion==1, "Legal in all cases",
                         ifelse(Abortion==2,"Legal in some cases and illegal in others",
                         ifelse(Abortion==3,"Illegal in all cases",NA))), 
         FTGays=ifelse(FTGays>100, NA,FTGays))

Q1. View on Abortion

Do people who support the death penalty and those who are opposed to it differ in their view on abortion?

Views on Abortion by DeathPenalty (Crosstab)

  • Fifteen percent of the respondants who favor the death penalty and eleven percent of those who are opposed to it report that they believe abortion should be illegal in all cases.
  • Fifty-three percent of the respondants who are opposed to the death penalty and twenty-six percent of those who favor the death penalty report that they believe abortion should be legal in all cases.
  table(NewVoterData$Abortion, NewVoterData$DeathPenalty) %>%
  prop.table(2) %>%
  round(2) %>%
  kable()
Favor the death penalty Opposed to the death penalty
Illegal in all cases 0.15 0.11
Legal in all cases 0.26 0.53
Legal in some cases and illegal in others 0.60 0.36

Views on Abortion by DeathPenalty (Bar Chart)

NewVoterData%>%
  group_by(DeathPenalty,Abortion)%>%
  summarize(n=n())%>%
  filter(!is.na(DeathPenalty))%>% 
  filter(!is.na(Abortion))%>% 
  mutate(PercentOfSamples = n/sum(n))%>% 
  ggplot()+
  geom_col(aes(x=DeathPenalty, y=PercentOfSamples, fill=Abortion))

Views on Abortion by DeathPenalty (Chi-Squared Test)

Null Hyposethsis

This is how many people should be in each category of response, if the variables are completely independent from one another.

chisq.test(NewVoterData$DeathPenalty, NewVoterData$Abortion)[7] %>%
  kable()
Illegal in all cases Legal in all cases Legal in some cases and illegal in others
Favor the death penalty 590.5781 1544.435 2308.987
Opposed to the death penalty 295.4219 772.565 1155.013

Actual Observations

This is how many people are actually in each category of response.

chisq.test(NewVoterData$DeathPenalty, NewVoterData$Abortion)[6] %>%
  kable()
Illegal in all cases Legal in all cases Legal in some cases and illegal in others
Favor the death penalty 647 1142 2655
Opposed to the death penalty 239 1175 809

Chi-Squared Test

A p-value <.001 in the result below indicates that there is a statistically significant relationship between these two variables.

chisq.test(NewVoterData$DeathPenalty, NewVoterData$Abortion)
## 
##  Pearson's Chi-squared test
## 
## data:  NewVoterData$DeathPenalty and NewVoterData$Abortion
## X-squared = 486.17, df = 2, p-value < 2.2e-16

Q2. Feelings Toward Gays and Lesbians

When asked to rate gays and lesbians in general on a scale from 0 to 100, with 0 being negative, 50 being neutral, and 100 being positive, how do people who support the death penalty and those who are opposed to it differ in ther average ratings?

Average FT Rating toward Gays and Lesbians (Mean and Standard Deviation)

  • The average rate of FTGays of people who favor the death penalty is about fifty-three percent while that of those who disfavor the death penalty is about seventy-four percent.
NewVoterData%>%
   filter(!is.na(DeathPenalty)) %>%
   group_by(DeathPenalty) %>%
   summarize(FTGaysMean=mean(FTGays, na.rm=TRUE), FTGaysSD=sd(FTGays, na.rm=TRUE)) %>%
   kable
DeathPenalty FTGaysMean FTGaysSD
Favor the death penalty 52.97678 31.25537
Opposed to the death penalty 74.11577 26.34952

Average FT Rating toward Gays and Lesbians (Bar Chart)

NewVoterData%>%
   filter(!is.na(DeathPenalty)) %>%
   group_by(DeathPenalty) %>%
   summarize(FTGaysMean=mean(FTGays, na.rm=TRUE), FTGaysSD=sd(FTGays, na.rm=TRUE))%>%
  ggplot()+geom_col(aes(x=DeathPenalty, y=FTGaysMean, fill=DeathPenalty))+geom_segment(aes(x=DeathPenalty, xend=DeathPenalty, y=FTGaysMean+FTGaysSD, yend=FTGaysMean-FTGaysSD))+geom_label(aes(x=DeathPenalty, y=FTGaysMean, label=round(FTGaysMean)))

Average FT Rating toward Gays and Lesbians (Population Distribution)

Visualizing the distribution of the ratings allows us to how members of each group rated their feelings toward gays and lesbians.

  • The most common rating given by the respondants who favor the death penalty is forty-eight or forty-nine while that of those who are opposed to it is one hundred.
  • While the respondants who are opposed to the death penalty tend to have warm feelings toward gays and lesbians, the ratings of those who support it look scattered.
NewVoterData%>%
   filter(!is.na(DeathPenalty)) %>%
   group_by(DeathPenalty) %>%
   ggplot()+geom_histogram(aes(x=FTGays,fill=DeathPenalty))+facet_wrap(~DeathPenalty)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 2732 rows containing non-finite values (stat_bin).

Average FT Rating toward Gays and Lesbians (Sampling Distribution)

Preparing Sampling Distribution Data

RepProDP <- NewVoterData %>%
  filter(DeathPenalty=="Favor the death penalty")
ProSample <- replicate(10000, mean(sample(RepProDP$FTGays, 40), na.rm = TRUE)) %>%
  data.frame() %>%
  rename("mean"=1)

RepAntiDP <- NewVoterData %>%
  filter(DeathPenalty=="Opposed to the death penalty")
AntiSample <- replicate(10000, mean(sample(RepAntiDP$FTGays, 40), na.rm = TRUE)) %>%
  data.frame() %>%
  rename("mean"=1)

Plotting Histogram of Sampling Distribution

The sampling distribution of the ratings of the anti-death penalty group sits to the right of that of the pro-death penalty group.

ggplot()+geom_histogram(data=ProSample, aes(x=mean), fill="#FF0000")+geom_histogram(data=AntiSample, aes(x=mean), fill="#0000FF")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

T-test: Comparing Average FT Rating toward Gays and Lesbians by DeathPenalty

A p-value <.001 in the test result below indicates that the mean feelings toward gays and lesbians of these two groups is statistically different.

t.test(FTGays~DeathPenalty, data=NewVoterData)
## 
##  Welch Two Sample t-test
## 
## data:  FTGays by DeathPenalty
## t = -22.961, df = 3288.9, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -22.94407 -19.33391
## sample estimates:
##      mean in group Favor the death penalty 
##                                   52.97678 
## mean in group Opposed to the death penalty 
##                                   74.11577

Conclusion

Question 1

Is a person’s view on the death penalty related to their view on abortion?

  • Fifteen percent of the pro-death penalty respondants and eleven percent of the anti-death penalty think abortion should be illegal in all cases.
  • Fifty-three percent of the anti-death penalty respondants and twenty-six percent of the pro-death penalty believe abortion should be legal in all cases.
  • A chi-squared test confirms that their view on the death penalty and that on abortion are not independent from one another.

Question 2

Is a person’s view on the death penalty related to their feelings toward gays and lesbians?

  • The average feelings toward gays and lesbians of the pro-death penalty group is about fifty-three percent.
  • The average feelings toward gays and lesbians of the anti-death penalty group is about seventy-four percent.

The analytical results suggest that people’s view on the death penaly is related to their view on the other two cultural issues: abortion and LGBTQ. One of the interesting findings is that people who support the death penalty tend to be more pro-life and support abortion bans compared to those who disfavor the policy. In general, pro-life people defend abortion regulations to save lives of persons, especially those of the unborn babies. Then, how is it possible to support the death penalty policy that kills felons and hold the pro-life position at the same time? Does that mean people answer these questions based on their political ideology and fail to consider each policy issue carefully? Future reseach is needed to clarify people’s attitudes towards these cultural issues and how are related to each other.