Photo credit: Pixabay

The Analysis on American National Election Studies (ANES)

Statistics, survey, vote intention, public opinion, Joe Biden, Donald Trump

--

Recently, I have been very interested in analyzing data for political science research. Fortunately, its easy to find political science data, encyclopedias, and information about quantitative and qualitative research methods.

The Data

The ANES collects high quality, non-partisan survey data on voting and public opinion.

After creating an user account and password, you will be able to download the data from its data center.

I downloaded the ANES 2020 Exploratory Testing Survey data, its purpose is to assess new questions under consideration for inclusion in the ANES 2020 Time Series Study, especially related to novel issues arising in the election year, question wording effects, and the scaling properties of lengthy question batteries. The dataset includes 3,080 cases, its collection was conducted between April 10, 2020 and April 18, 2020. You can find questionnaire specifications here.

anes_data.py
Figure 1

The data set contains 470 variables (i.e. survey questions), I will only select what I am interested in. In the meantime, I am going to re-name some columns to make them more user friendly, and re-code all the categorical variables according to questionnaire specifications. The missing values will be replaced by “NaN”.

anes_data_prep.py

Vote Choice

vote_choice.py
Figure 2

According to the data, Donald Trump and Joe Biden were neck to neck as of April 2020 on vote intention.

vote_choice_by_party.py
Figure 3

Little surprise here, when you look at the numbers by party.

df_clean.query("vote == 'Donald Trump' & fttrump1 < 5")
Table 1

The above 10 voters gave Trump thermometer rating < 5 but stated that they would vote for him. It looks like they disliked Biden as much.

df_clean.query("vote == 'Joe Biden' & ftbiden1 < 5")
Table 2

The above 15 voters gave Biden thermometer rating < 5 but stated that they would still vote for him. They are mostly democrats, and liked Obama.

df_clean.query("ftbiden1 == 100 & fttrump1 == 100")
Table 3

The above 10 voters rated Joe Biden 100 and Trump 100 at the same time, while almost all of them stated that they would vote for Trump.

Likability

biden_like.py
Figure 4

Among voters who would vote for Biden, 54% liked him, roughly 13% disliked him.

trump_like.py
Figure 5

Among voters who would vote for Trump, 71% liked him, roughly 5% disliked him. Indeed, Trump was able to stir a lot of apathy within the republicans.

Voters’ Age

age_dist.py
Figure 6

According to the data, more voters between 30 and 45 year old, and again 55 and 70 year old would vote for Trump, as of April 2020.

age_gender_violin.py
Figure 7

Interesting, Trump was more favored by senior women and younger (around 40 years old) men.

Economy

biden_eco.py
Figure 8

Among Biden’s voters, over 86% worried about current state of the economy. 14% did not worry about current state of the economy.

trump_eco.py
Figure 9

Among Trump’s voters, over 64% worried about current state of the economy. 36% did not worry about current state of the economy.

confecon.py
Figure 10

Vast majority of voters worried about the current state of the economy, with 53% very or extremely worried about the current state of the economy.

confecon_by_party.py
Figure 11

85% of democrats worried about current state of the economy, with 63% very or extremely worried about current state of the economy. While 65% of republicans worried about current state of the economy, with 41% very or extremely worried about current state of the economy.

confecon_party_gender.py
Figure 12

Female democrats are most worried about current state of the economy, 18% more than female republicans among extremely and very worried about current state of the economy. While male democrats only 6% more than male republicans among extremely and very worried about current state of the economy.

confecon_age.py
Figure 13

35–45 year old & 55–75 year old age groups were the most worried about current state of the economy.

Universal Basic Income

uni_income_t.py
Table 4

32% of Trump’s voters oppose universal basic income a great deal, while 18% favor a great deal.

uni_income_b.py
Table 5

6% of Biden’s voters oppose universal basic income a great deal, while 26% favor a great deal.

Universal Basic Income vs. Political Ideology

uni_ideo.py
Table 6

Over 50% of the conservatives oppose universal basic income, and 36% oppose a great deal. Almost 70% liberals favor universal basic income and 34% favor a great deal.

Universal Basic Income & Free College

uni_col_b.py
Figure 14

Among Biden’s voters, 45% favor both universal basic income and free college, 55% oppose both.

uni_col_t.py
Figure 15

Among Trump’s voters, 29% favor both universal basic income and free college, 71% oppose both.

MeToo vs. Feminists

metoo_fem.py
Table 7

Voters who favored Trump had the lowest favorability on #MeToo & feminists, voters who favored Biden had the highest favorability on these two movements.

Thermometer Rating

ther_corr.py
Table 8

The correlation between Biden and Trump’s thermometer ratings is negative, as it should be.

ther_by_party.py
Figure 16

Democrats were mostly united in rating Trump very low, but they had a wide range of mixed feelings towards Biden. Republicans were united in rating Biden very low, and they were a little bit more clustered around higher ratings for Trump. Independents were spread out all over the place.

ther_by_gender.py
Figure 17

There isn’t obvious difference between how male vs. female rated on both candidates.

ther_by_age
Figure 18

Apparently, Biden’s average thermometer rating was higher among younger voters, and Biden and Trump average thermometer ratings among older voters were similar.

ther_dist.py
Figure 18

More people had extreme opinions of Trump, and more people had mediocre opinions of Biden.

Statistical Analysis

quantile.py
Table 9

There is a clear relationship between party affiliation and candidates’ thermometer ratings.

partisan.py
Table 10

Liberals who extremely worried about economic impact of the coronavirus rated Biden 40.57 points higher than Trump on average, and conservatives who did not at all worry about economic impact of the coronavirus rated Trump 60.71 points higher than Biden on average.

Hypothesis Tests

Whether there is a significant difference between men and women on how they rate Trump vs. Biden.

ttest_ind_t.py

We can reject the null hypothesis and conclude that there is a statistically significant difference between men and women in terms of how highly they rate Trump, on average.

ttest_ind_b.py

We failed to reject the null hypothesis and that women and men have the same average thermometer rating to Biden.

Compare the Average Rating of Trump to the Average Rating of Biden

compare.py
ttest_rel.py

We reject the null hypothesis and conclude that there is a statistically significant difference between voters rate Trump vs. Biden, on average.

Test of Multiple Comparisons

Whether there is a significant difference between the average age of democrat, independent, and republican voters.

age_by_party
f_oneway.py

The p-value is much smaller than .05, so we reject the null hypothesis and conclude that there is a statistically significant difference between these three parties in terms of voters’ average age.

Tests of Association

test_ass.py

Conservatives overwhelmingly oppose both universal basic income & free college, with 79% of conservatives stating that they oppose them. Only 44% of liberals, in contrast, oppose both universal basic income & free college.

Whether these differences are strong enough for us to conclude that there are ideological differences in support for both universal basic income & free college.

chi2_contingency.py

The p-value at 3.56e-73 is much less than .05. Therefore, we reject the null hypothesis and conclude that there is a statistically significant relationship between ideology and support for both universal basic income & free college.

Principal Component Analysis (PCA)

pca.py
Table 11

The first feature (dim1) seems to represent the traditional left-right ideological spectrum. The republican party, Trump, Pence, Haley, Rubio, along with big business, capitalists and white load most strongly on one side of this index, and Warren, Pelosi, Harris, democratic party load most strongly on the other side.

loadings.sort_values('dim2')
Table 12

The second feature(dim2) seems associated with left-right political ideology as well.

Multiple Correspondence Analysis (MCA)

Similar to PCA, but MCA works with categorical features instead of continuous-valued ones.

mca.py
Table 13

The first latent feature (0) starts from the top, it represents categories for liberal ideology, for example: voting for Hillary Clinton in 2016, identifying as a Democrat, voting for Joe Biden in 2020, favoring free college a great deal, and believing science is extremely important. On the other end we have categories for conservative ideology, for example: opposing a great deal on both universal basic income and free college, identifying as a republican, no at all worried about the economy. This first latent feature appears to be the left-right ideological dimension.

mca.column_coordinates(df_cat).sort_values(1)
Table 14

For the second latent feature, we have positions that do not take a position: Did not vote in 2016, probably will not vote in 2020, and neither favor nor oppose universal basic income, and free college. This appears to measure voter apathy.

Jupyter notebook can be found on Github, enjoy the long weekend!

Reference:

https://jkropko.github.io/surfing-the-data-pipeline/ch12.html

--

--