Political Party on COVID, Racial Discrimination, and Climate Change
- gina2805
- Dec 27, 2021
- 10 min read
Updated: Jan 14, 2022
Regina Calloway, Ph.D.

There have been so many important issues covered in the news over the past year, but I wanted to take brief look at how people in the U.S. felt about three topics that dominated the news cycle in 2021:
I've had countless conversations with friends and family about personal beliefs I often think can be predicted by one's political affiliation. But most of it was anecdotal at best and speculative at worst. So, instead of talking myself in circles I decided to dive into some actual data and explore my interests in political differences and personal beliefs that help shed light on how U.S. citizens view the above topics. I aim to interpret the analysis outputs without adding my own political or personal beliefs.
About the Dataset
Data are from the 2021 PEW RESEARCH CENTER’S AMERICAN TRENDS PANEL WAVE 82 FEBRUARY SURVEY FEBRUARY 1 – 7, 2021.
Joe Biden (Democrat) took office Jan. 20, 2021, a few weeks prior to this survey.
Data were accessed from the Pew Research Center's website. The Dataset is in .sav, which is SPSS format (n = 2596). As a note, many of the survey items I used do not have intuitive scales, e.g., sometimes 1 = good and 4 = bad. So oftentimes lower is better (I'm used to designing scales in the opposite direction). I try to describe effects based on the scale descriptions as much as possible.
I'm using linear regression models on this data because I haven't had a chance to use them in a while. However, other analysis techniques such as the chi-square test or ANOVAs could also be used. Regression is more useful if we want to treat some categorical variables as continuous (which I will be be doing here for some questions).
I'll include relevant code chunks, but the full .RMD can be downloaded as a .pdf below. In the .RMD, I build the models up by adding variables, but for brevity, only the final models are discussed here. Let’s get started!
Libraries loaded
library(haven) # to read .sav data
library(naniar)
# data manipulation
library(dplyr)
library(tidyverse)
# For graphing
library(ggplot2)
1. COVID: How as the U.S. handled the COVID outbreak?

Let's take a look at how 1) political affiliation and 2) people's perception on how their lives have changed due to the pandemic relate to how U.S. citizens think the U.S. handled COVID.
The relevant questions are:
F_PARTY_FINAL ~ Political party (1 = Republican, 2 = Democrat, 3 = Independent, 4 = Something else, 99 = Refused)
GAP21Q7 ~ Would you say each of the following has done a good or bad job dealing with the coronavirus outbreak? (1-4; very good to very bad)
the U.S. **
China
The European Union
The World Health Organization, or WHO
Germany
GAP21Q8 ~ As a result of the coronavirus outbreak, has your own life changed… (1-4; a great deal to not at all)
After reading in the data, mark which columns to keep, trim the data, and run a linear model.
# Subset the data so we're only working with variables of interest
keep.cols <- c("QKEY", "F_PARTY_FINAL", "GAP21Q8_W82", "GAP21Q7_a_W82")
m1.dat <- dataset2[,keep.cols] # datset2 is the name of the full dataset
m1.dat <- na.omit(m1.dat)
# Rename columns
colnames(m1.dat) <- c("ID", "Party", "LifeChange", "U.S.Job")
## Adjust the columns of interest
m1.dat$ID <- as.character(m1.dat$ID)
# Make some variables into factors
m1.dat$Party <- factor(m1.dat$Party,
levels=c(1, 2, 3, 4),
labels=c("Republican", "Democrat", "Independent", "Something else"))
# Make some variables numeric
m1.dat$LifeChange <- as.numeric(m1.dat$LifeChange)
m1.dat$U.S.Job <- as.numeric(m1.dat$U.S.Job)
# Make the model and get the summary
covid.m1.2 <- lm(U.S.Job ~ Party*LifeChange, data=m1.dat)
summary(covid.m1.2)
Model output
Call:
lm(formula = U.S.Job ~ Party * LifeChange, data = m1.dat)
Residuals:
Min 1Q Median 3Q Max
-2.1988 -0.7470 -0.1598 0.8012 1.8092
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.38865 0.08964 26.648 < 2e-16 ***
PartyDemocrat 0.84912 0.11723 7.243 5.78e-13 ***
PartyIndependent 0.67477 0.12990 5.194 2.22e-07 ***
PartySomething else 0.81659 0.16933 4.822 1.50e-06 ***
LifeChange -0.04945 0.03897 -1.269 0.205
PartyDemocrat:LifeChange 0.01048 0.05465 0.192 0.848
PartyIndependent:LifeChange -0.05603 0.05871 -0.954 0.340
PartySomething else:LifeChange -0.08938 0.07835 -1.141 0.254
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.8503 on 2555 degrees of freedom
Multiple R-squared: 0.155, Adjusted R-squared: 0.1527
F-statistic: 66.95 on 7 and 2555 DF, p-value: < 2.2e-16
Let's graph the data to help with interpretation.
# Get means, SD, and s.e. for each party
party.covid <- m1.dat %>%
group_by(Party) %>%
summarise(m.resp=mean(U.S.Job),
sd.resp=sd(U.S.Job),
sample.size=n())
party.covid <- party.covid %>%
mutate(se.resp=sd.resp/sqrt(sample.size))
## Show data frame
party.covid
# Make plot
ggplot(party.covid, aes(x=Party, y=m.resp, fill=Party)) +
geom_bar(stat="identity",
position=position_dodge()) +
geom_errorbar(aes(ymin=m.resp-se.resp, ymax=m.resp+se.resp), width=.2,
position=position_dodge(.9)) +
labs(title="U.S. Response to COVID by Party", x="Political Party", y = "U.S. Response to COVID (1=very good; 4 = very bad)")+
theme_classic() +
scale_fill_manual(values=c('red3','blue3', 'lightseagreen' ,'lightblue1')) +
theme(plot.title = element_text(hjust = 0.5)) +
guides(fill=guide_legend(title="Political Party")) +
coord_cartesian(ylim = c(1,4))

Republicans were more likely to think the U.S. was doing a good job in response to COVID compared to Democrats, Independents, and those who identified as something else.
At the time of the survey (Feb. 2021), Republicans were more likely to think the U.S. was doing a good job in response to COVID compared to Democrats, Independents, and those who identified as something else (lower numbers = better job).
Democrats did not differ from Independents or those who identified as something else (based on re-leveled model with Democrat as reference level). People's thoughts on COVID changing their lives did not influence thoughts on U.S. handling of COVID when accounting for Political Party.
2. How do people's thoughts on diversity and political affiliation predict people's thoughts on racial discrimination being a problem in the U.S.?

The relevant survey questions, along with political affiliation, are:
GAP21Q20 ~ Overall, do you think having people of many different backgrounds, such as different ethnic groups, religions and races, makes the U.S.…(1 better place; 2 worse place)
GAP21Q23 ~ In the U.S., do you think discrimination against people based on their race or ethnicity is a... (1 very serious to 4 not a problem at at all)
Trim the data.
keep.cols <- c("QKEY", "GAP21Q20_W82", "GAP21Q23_W82", "F_PARTY_FINAL")
dis.dat <- dataset2[,keep.cols]
dis.dat <- na.omit(dis.dat)
# Rename columns for easier reading
colnames(dis.dat) <- c("ID", "Place", "DiscSerious", "Party")
dis.dat$Place <- factor(dis.dat$Place, levels=c(1, 2), labels=c("Better Place", "Worse Place"))
## Make relevant variables numeric or factors
dis.dat$DiscSerious <- as.numeric(dis.dat$DiscSerious)
dis.dat$Party <- factor(dis.dat$Party, levels=c(1, 2, 3, 4), labels=c("Republican", "Democrat", "Independent", "Something else"))
# Define model
dis.m1.2 <- lm(DiscSerious~Party*Place, dis.dat)
summary(dis.m1.2
Model output
Call:
lm(formula = DiscSerious ~ Party * Place, data = dis.dat)
Residuals:
Min 1Q Median 3Q Max
-1.6901 -0.4298 -0.2999 0.5702 2.7001
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.42978 0.02997 81.080 < 2e-16*
PartyDemocrat -1.12989 0.03877 -29.142 < 2e-16*
PartyIndependent -0.64821 0.04247 -15.262 < 2e-16*
PartySomething else -0.77237 0.05792 -13.334 < 2e-16*
PlaceWorse Place 0.26036 0.06809 3.824 0.000135*
PartyDemocrat:PlaceWorse Place 0.40129 0.16017 2.505 0.012294*
PartyIndependent:PlaceWorse Place 0.15807 0.11708 1.350 0.177095
PartySomething else:PlaceWorse Place 0.34149 0.16356 2.088 0.036906*
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.7285 on 2522 degrees of freedom
Multiple R-squared: 0.3045, Adjusted R-squared: 0.3026
F-statistic: 157.8 on 7 and 2522 DF, p-value: < 2.2e-16
Graph the results.
# Get means, SD, and s.e. for each party
party.dis <- dis.dat %>%
group_by(Party, Place) %>%
summarise(m.resp=mean(DiscSerious),
sd.resp=sd(DiscSerious),
sample.size=n())
party.dis <- party.dis %>%
mutate(se.resp=sd.resp/sqrt(sample.size))
## Show data frame
party.dis
# Make plot
ggplot(party.dis, aes(x=Place, y=m.resp, fill=Party)) +
# facet_wrap(~Place) +
geom_bar(stat="identity",
position=position_dodge()) +
geom_errorbar(aes(ymin=m.resp-se.resp, ymax=m.resp+se.resp), width=.2,
position=position_dodge(.9)) +
labs(title="Severity of Racial Discrimination by Party", x="Political Party", y = "U.S. Thoughts on Discrimination (1=very serious; 4 = not serious)")+
theme_classic() +
scale_fill_manual(values=c('red3','blue3', 'lightseagreen' ,'lightblue1')) +
theme(plot.title = element_text(hjust = 0.5)) +
guides(fill=guide_legend(title="Political Party")) +
coord_cartesian(ylim = c(1,4))

Republicans, independents, and those who identify as something else all rated discrimination due to race/ethnicity as less of a problem than Democrats
Simple effects
Democrats, Independents, and 'Something else' rated racial/ethnic discrimination as more of a serious problem than Republicans.
People who think that having people of many different backgrounds makes the U.S. a worse place, tend to rate racial/ethnic discrimination as being less of a problem (higher scores).
Republicans, independents, and those who identify as something else all rate discrimination due to race/ethnicity as less of a problem than Democrats (based on a re-leveled model with 'Democrat' as the reference level).
Interactions
Thinking that more diversity makes the U.S. is a worse place reduces the difference between 1) Democrats and Republicans and 2) 'Something else' and Republicans on seriousness of racial/ethnic discrimination.
3. How do people in the U.S. feel about climate change?
1) How much are you willing to change and 2) how do you think the U.S. is doing in response to climate change?

Relevant survey items
GAP21Q24 ~ How concerned are you, if at all, that global climate change will harm you personally at some point in your lifetime? (very concerned [1] to not at all concerned [4])
GAP21Q25 ~ How much, if anything, would you be willing to change about how you live and work to help reduce the effects of global climate change? (1 a lot of changes - 4 no changes at all)
GAP21Q26 ~ Would you say each of the following is doing a good or bad job dealing with global climate change? (a = U.S.) 1 very good - 4 very bad
Model 1: How much are you willing to change to help reduce the effects of global climate change? (accounting for political party and people's own concern that climate change will harm them at some point)
Select relevant data
keep.cols <- c("QKEY", "F_PARTY_FINAL", "GAP21Q24_W82", "GAP21Q25_W82", "GAP21Q26_a_W82")
climate.dat <- dataset2[,keep.cols]
climate.dat <- na.omit(climate.dat)
colnames(climate.dat) <- c("ID", "Party", "ClimatePersonal", "Willingness", "U.S.JobClimate")
## Adjust the columns of interest
climate.dat$ID <- as.character(climate.dat$ID)
# Make some variables into factors
climate.dat$Party <- factor(climate.dat$Party,
levels=c(1, 2, 3, 4),
labels=c("Republican", "Democrat", "Independent", "Something else"))
# Make some variables numeric
climate.dat$Willingness <- as.numeric(climate.dat$Willingness)
climate.dat$U.S.JobClimate <- as.numeric(climate.dat$U.S.JobClimate)
climate.dat$ClimatePersonal <- as.numeric(climate.dat$ClimatePersonal)
# Specify Model 1 - How many changes are you willing to make? (predicted by Party * concern)
# Republican and concerned is the reference
climate.m1.1 <- lm(Willingness ~ Party*ClimatePersonal, data=climate.dat)
summary(climate.m1.1)
Model Output
Call:
lm(formula = Willingness ~ Party * ClimatePersonal, data = climate.dat)
Residuals:
Min 1Q Median 3Q Max
-2.2704 -0.2811 -0.1116 0.3734 2.3138
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.69505 0.08553 8.127 6.87e-16*
PartyDemocrat 0.14035 0.10139 1.384 0.166
PartyIndependent -0.05608 0.10388 -0.540 0.589
PartySomething else 0.01917 0.12795 0.150 0.881
ClimatePersonal 0.64383 0.02638 24.402 < 2e-16*
PartyDemocrat:ClimatePersonal -0.21843 0.04041 -5.405 7.11e-08
PartyIndependent:ClimatePersonal -0.04306 0.03640 -1.183 0.237
PartySomething else:ClimatePersonal -0.07695 0.04820 -1.597 0.110
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.6436 on 2494 degrees of freedom
Multiple R-squared: 0.5375, Adjusted R-squared: 0.5362
F-statistic: 414.1 on 7 and 2494 DF, p-value: < 2.2e-16
Showing re-leveled model with Democrat as the reference so the differences are easier to see (note that R-squared is the same).
climate.dat$Party <- relevel(climate.dat$Party, ref="Democrat")
climate.m1.2 <- lm(Willingness ~ Party*ClimatePersonal, data=climate.dat)
summary(climate.m1.2)
Model output
Call:
lm(formula = Willingness ~ Party * ClimatePersonal, data = climate.dat)
Residuals:
Min 1Q Median 3Q Max
-2.2704 -0.2811 -0.1116 0.3734 2.3138
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.83540 0.05445 15.342 < 2e-16 ***
PartyRepublican -0.14035 0.10139 -1.384 0.16641
PartyIndependent -0.19643 0.08025 -2.448 0.01445 *
PartySomething else -0.12117 0.10965 -1.105 0.26921
ClimatePersonal 0.42541 0.03061 13.896 < 2e-16 *
PartyRepublican:ClimatePersonal 0.21843 0.04041 5.405 7.11e-08 *
PartyIndependent:ClimatePersonal 0.17537 0.03957 4.432 9.75e-06 *
PartySomething else:ClimatePersonal 0.14148 0.05063 2.794 0.00524 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.6436 on 2494 degrees of freedom
Multiple R-squared: 0.5375, Adjusted R-squared: 0.5362
F-statistic: 414.1 on 7 and 2494 DF, p-value: < 2.2e-16
Graph effects
ggplot(climate.dat, aes(x = ClimatePersonal, y = U.S.JobClimate, color=Party)) +
# geom_point() +
stat_smooth(method = "lm") +
ggtitle("U.S. Response to Climate Change") +
xlab("Concern that global climate change will harm you (1 = very concerned)") +
ylab("How is the U.S. doing? (1 = good job)") +
theme(plot.title = element_text(hjust = 0.5)) +
coord_cartesian(ylim = c(1,3.5)) +
scale_color_manual(values=party_palette) # use predefined color palette

Summary
Main and simple effects
The less concerned someone is that climate change will personally harm them, the less likely they are to be willing to make changes to combat climate change.
The less concerned someone is that climate change will personally harm them (higher numbers, x-axis), the less likely they are to be willing to make changes to combat climate change (higher numbers, y-axis).
(Re-leveled model) Independents are less willing to make changes than democrats (lower numbers).
Interactions
Interaction with Democrat*Concern about climate change. The difference between democrats and republicans increases as people's concern with climate change decreases (higher numbers). I.e., for people who aren't very concerned, democrats are more likely to be willing to change their behaviors to combat climate change than republicans.
(Re-leveled model) As people rate being less concerned with climate change, the difference between all other groups and democrats increases.
Model 2: Is the U.S. doing good or bad in response to climate change? (accounting for political party and people's own concern that climate change will harm them at some point)
Set-up the model
climate.m2.1 <- lm(U.S.JobClimate ~ Party*ClimatePersonal, data=climate.dat)
summary(climate.m2.1)
Model output (Republican as the reference level)
Call:
lm(formula = U.S.JobClimate ~ Party * ClimatePersonal, data = climate.dat)
Residuals:
Min 1Q Median 3Q Max
-2.00146 -0.57460 0.04462 0.43468 1.93799
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.63424 0.10538 24.997 < 2e-16 *
PartyDemocrat 0.51617 0.12493 4.132 3.72e-05 *
PartyIndependent 0.53805 0.12799 4.204 2.72e-05 *
PartySomething else 0.58066 0.15765 3.683 0.000235 *
ClimatePersonal -0.14306 0.03251 -4.400 1.13e-05 *
PartyDemocrat:ClimatePersonal -0.05197 0.04980 -1.044 0.296703
PartyIndependent:ClimatePersonal -0.09155 0.04485 -2.041 0.041328 *
PartySomething else:ClimatePersonal -0.07037 0.05938 -1.185 0.236095
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.7931 on 2494 degrees of freedom
Multiple R-squared: 0.1404, Adjusted R-squared: 0.138
F-statistic: 58.18 on 7 and 2494 DF, p-value: < 2.2e-16
Let's graph the results.
ggplot(climate.dat, aes(x = ClimatePersonal, y = U.S.JobClimate, color=Party)) +
# geom_point() +
stat_smooth(method = "lm") +
ggtitle("U.S. Response to Climate Change") +
xlab("Concern that global climate change will harm you (1 = very concerned)") +
ylab("How is the U.S. doing? (1 = good job)") +
theme(plot.title = element_text(hjust = 0.5)) +
coord_cartesian(ylim = c(1,3.5)) +
scale_color_manual(values=party_palette)

Republicans are more likely than democrats, independents, and those who identify as something else to rate the U.S. as doing a good job against climate change.
Main effects
Republicans are more likely than democrats, independents, and those who identify as something else to rate the U.S. as doing a good job against climate change (lower numbers).
Those who are less likely to think climate change will harm them (higher scores) are more likely to rate the U.S. as doing a good job against climate change.
Interactions
Compared to republicans, independents' thoughts on how the U.S. is doing depends on more their concern that climate change will harm them (steeper slope).
Final thoughts
So, to sum it all up, political affiliation is related to how people view topics of climate change, COVID, and diversity. Unsurprisingly, people's personal beliefs also contribute to thoughts on these topics, and in some cases, reduces differences due to political affiliation.
Comments