Create a histogram for clinton and each predictor variable. Discuss what they show you. Also, create two graphs with 4 histograms in each one.

Using the 2016 ANES, replicate the analysis with feelings towards Trump using feelings towards Hillary
Clinton. The variable for Clinton is V161086 and use the same 8 predictor variables.


GENDER



library(ggplot2)

nes2 <- subset(nes, !is.na(clinton) & !is.na(gender))

p1 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=gender), binwidth=10)





We see that roughly an equal number of men and women feel 0 - or very cold - towards Clinton. However,

women make up larger portions of the warm and hot feelings towards Clinton than men. Therefore, it

appears that women generally feel warmer to Clinton than men.

Education:



nes$education.fac <- as.factor(nes$education)

nes2 <- subset(nes, !is.na(clinton) & !is.na(education.fac))

p2 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=education.fac), binwidth=10)

x11()

p2





There does not appear to be much of a difference between education levels and feelings towards Clinton.

Each education level makes up a similar portion of each bar. We can therefore conclude that education does

not appear to matter for explaining feelings towards Clinton.

Partisan Identification:



nes2 <- subset(nes, !is.na(clinton) & !is.na(pid))

p3 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=pid), binwidth=10)

x11()

p3





As we would expect, strong Republicans feel the coldest towards Clinton and strong Democrats feel the

warmest towards Clinton.

Political Ideology:



nes2 <- subset(nes, !is.na(clinton) & !is.na(ideology))

p4 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=ideology), binwidth=10)

x11()

p4





Although not as strong as with partisan identification, conservatives feel the coldest towards Clinton while

liberals feel the warmest towards Clinton.

Health Care Law:



nes2 <- subset(nes, !is.na(clinton) & !is.na(hc.law))

p5 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=hc.law), binwidth=10)

x11()

p5





We see that those who opposed Obamacare feel the coldest towards Clinton while those who favoured

Obamacare feel the warmest towards Clinton.

Economy:



nes2 <- subset(nes, !is.na(clinton) & !is.na(economy))

p6 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=economy), binwidth=10)

x11()

p6





It does not appear that views on the state of the economy matter much for explaining feelings towards

Clinton. Certainly, respondents who believed the economy had gotten much worse had cold feelings towards

Clinton, but the portions are similar across the bars in the histogram.

Wall with Mexico:



nes2 <- subset(nes, !is.na(clinton) & !is.na(wall))

p7 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=wall), binwidth=10)

x11()

p7





Respondents’ opinions on building a wall with Mexico do appear to matter here. Respondents who greatly favoured the wall predominately have the coldest feelings towards Clinton and vice-versa.

Fighting ISIS:



nes2 <- subset(nes, !is.na(clinton) & !is.na(isis))

p8 <- ggplot(data=nes2) +

geom_histogram(mapping=aes(clinton, fill=isis), binwidth=10)

x11()

p8





As with Trump, this histogram is somewhat of a mixed picture. However, it does appear that respondents who strongly favoured sending US troops to fight ISIS generally have cold feelings towards Clinton and vice-versa.



library(gridExtra)

x11()

grid.arrange(p1, p2, p3, p4, ncol=2, nrow=2)







x11()

grid.arrange(p5, p6, p7, p8, ncol=2, nrow=2)



Social Work & Human Services

You might also like to view...

Many questions about the brain have not been answered

Indicate whether the statement is true or false

Social Work & Human Services

The ability to state with confidence that the factors that one plans to measure are in fact the actual factors that are measured refers to which of the following?

a. Internal validity b. External validity c. Internal appropriateness d. External appropriateness

Social Work & Human Services

Researchers who carefully guard the identity of the respondents are following the ethical principle of

A. self-determination B. objectivity C. anonymity D. informed consent

Social Work & Human Services

In regards to the Time Dimension, the multidimensional approach for human behavior includes all the following except?

a. Life Course Perspective b. Life Events c. Long Term and Short Term Changes d. Biological Functions

Social Work & Human Services