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.
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.
In order to conduct the analysis, I focus on respondants’ answers to the following three survay questions.
Note: Respondants’ answers “Not sure” are coded as NA in the analysis to meet the purpose of this research.
Firstly, I look at how the averate rating of FTGays varies based on a person’s DeathPenalty by taking the following measures.
Secondly, I look at how a person’s Abortion varies based on their DeathPenalty by taking the following measures.
#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))
Do people who support the death penalty and those who are opposed to it differ in their view on abortion?
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 |
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))
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()
|
This is how many people are actually in each category of response.
chisq.test(NewVoterData$DeathPenalty, NewVoterData$Abortion)[6] %>%
kable()
|
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
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?
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 |
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)))
Visualizing the distribution of the ratings allows us to how members of each group rated their feelings toward gays and lesbians.
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).
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)
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`.
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
Is a person’s view on the death penalty related to their view on abortion?
Is a person’s view on the death penalty related to their feelings toward gays and lesbians?
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.