Prep

Libraries & Data

library(tidyverse)
library(sandwich)
library(gtsummary)
library(flextable)
library(tables)
library(psych)
library(ggplot2)
library(openxlsx)
library(lmerTest)
library(lme4)
library(knitr)
library(hrbrthemes)
library(interactions)
library(sjPlot)
library(cowplot)

d <- read.csv("/Users/af13/Documents/Research/24_ElectionStudy/data + analyses/2024ElectionStudy_combined_cleancases_full.csv", na.strings = c("","NA"), header = T, fileEncoding="latin1")

mcSummary() function

Variable Construction

Single-measures

# AI Risk


# numeracy
d <- d %>%
  group_by(pid) %>%
  fill(numeracy, .direction = "downup") %>%
  ungroup()

addmargins(table(d$numeracy,d$wave, exclude = F))


# trustGovt

d[d$wave == 1 | d$wave == 2,] <- d[d$wave == 1 | d$wave == 2,] %>%
  group_by(pid) %>%
  fill(trustGovt1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$trustGovt1,d$wave, exclude = F))

d[d$wave == 1 | d$wave == 2,] <- d[d$wave == 1 | d$wave == 2,] %>%
  group_by(pid) %>%
  fill(trustGovt2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$trustGovt2,d$wave, exclude = F))

d$trustGovt <- rowMeans(d[,c("trustGovt1","trustGovt2")], na.rm = T)

d$trustGovt.c <- d$trustGovt - mean(d$trustGovt, na.rm = T)

# trustSci

psych::alpha(d[ ,c("trustSci_1","trustSci_2","trustSci_3","trustSci_4")])


d <- d %>%
  group_by(pid) %>%
  fill(trustSci_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$trustSci_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(trustSci_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$trustSci_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(trustSci_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$trustSci_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(trustSci_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$trustSci_4,d$wave, exclude = F))

d$trustSci <- rowMeans(d[, c("trustSci_1", "trustSci_2", "trustSci_3", "trustSci_4")], na.rm = T)

table(d$trustSci, d$wave)


# affProj_Trump

d[d$wave == 2 | d$wave == 3,] <- d[d$wave == 2 | d$wave == 3,] %>%
  group_by(pid) %>%
  fill(affProj_Trump_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$affProj_Trump_1,d$wave, exclude = F))

d[d$wave == 2 | d$wave == 3,] <- d[d$wave == 2 | d$wave == 3,] %>%
  group_by(pid) %>%
  fill(affProj_Trump_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$affProj_Trump_2,d$wave, exclude = F))

d[d$wave == 2 | d$wave == 3,] <- d[d$wave == 2 | d$wave == 3,] %>%
  group_by(pid) %>%
  fill(affProj_Trump_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$affProj_Trump_3,d$wave, exclude = F))

d[d$wave == 2 | d$wave == 3,] <- d[d$wave == 2 | d$wave == 3,] %>%
  group_by(pid) %>%
  fill(affProj_Trump_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$affProj_Trump_4,d$wave, exclude = F))




# punitive policies


d <- d %>%
  group_by(pid) %>%
  fill(deathpenalty, .direction = "downup") %>%
  ungroup()

addmargins(table(d$deathpenalty,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(abortionban, .direction = "downup") %>%
  ungroup()

addmargins(table(d$abortionban,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(ICEraids, .direction = "downup") %>%
  ungroup()

addmargins(table(d$ICEraids,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(gunctrl, .direction = "downup") %>%
  ungroup()

addmargins(table(d$gunctrl,d$wave, exclude = F))
addmargins(table(d$gunctrl,d$wave))

d <- d %>%
  group_by(pid) %>%
  fill(vaxxpass, .direction = "downup") %>%
  ungroup()

addmargins(table(d$vaxxpass,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(hatespeech, .direction = "downup") %>%
  ungroup()

addmargins(table(d$hatespeech,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(jailCEOs, .direction = "downup") %>%
  ungroup()

addmargins(table(d$jailCEOs,d$wave, exclude = F))


# ideological position based on punitive policies

## deathpenalty, abortionban, ICEraids, gunctrl => negative = more liberal, positive = more conservative
## vaxxpass, hatespeech, jailCEOs => positive = more liberal, negative = more conservative

d$vaxxpass.r <- d$vaxxpass * -1
d$hatespeech.r <- d$hatespeech * -1
d$jailCEOs.r <- d$jailCEOs * -1

describe(d[,c('deathpenalty', 'abortionban', 'ICEraids', 'gunctrl','vaxxpass.r', 'hatespeech.r', 'jailCEOs.r')])

d$issue_ideology <- rowMeans(d[,c('deathpenalty', 'abortionban', 'ICEraids', 'gunctrl','vaxxpass.r', 'hatespeech.r', 'jailCEOs.r')], na.rm = T)

psych::alpha(d[,c('deathpenalty', 'abortionban', 'ICEraids', 'gunctrl','vaxxpass.r', 'hatespeech.r', 'jailCEOs.r')]) # a bit low!

# hist(d$issue_ideology)
psych::describe(d$issue_ideology) # that is a normal distribution

d <- d %>%
  group_by(pid) %>%
  fill(issue_ideology, .direction = "downup") %>%
  ungroup()

addmargins(table(d$issue_ideology,d$wave, exclude = F))

# climate change belief

d$climbel_1 <- d$climatechange_belief_1
d$climbel_2 <- d$climatechange_belief_2
d$climbel_3 <- d$climatechange_belief_3
d$climbel_4 <- d$climatechange_belief_4

d <- d %>%
  group_by(pid) %>%
  fill(climatechange_belief_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$climatechange_belief_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(climatechange_belief_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$climatechange_belief_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(climatechange_belief_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$climatechange_belief_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(climatechange_belief_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$climatechange_belief_4,d$wave, exclude = F))

# GCB

d <- d %>%
  group_by(pid) %>%
  fill(GCB_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$GCB_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(GCB_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$GCB_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(GCB_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$GCB_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(GCB_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$GCB_4,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(GCB_5, .direction = "downup") %>%
  ungroup()

addmargins(table(d$GCB_5,d$wave, exclude = F))

psych::alpha(d[,c("GCB_1", "GCB_2", "GCB_3", "GCB_4", "GCB_5")])

d <- d %>%
  group_by(pid) %>%
  fill(GCB, .direction = "downup") %>%
  ungroup()

addmargins(table(d$GCB,d$wave, exclude = F))

# AI risk

d <- d %>%
  group_by(pid) %>%
  fill(AIrisk_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$AIrisk_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(AIrisk_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$AIrisk_2,d$wave, exclude = F))

d$AIrisk <- rowMeans(d[,c("AIrisk_1","AIrisk_2")], na.rm = T)

d$AIrisk.c <- d$AIrisk - mean(d$AIrisk, na.rm = T)

# Group FT

d <- d %>%
  group_by(pid) %>%
  fill(FT_groups_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$FT_groups_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(FT_groups_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$FT_groups_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(FT_groups_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$FT_groups_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(FT_groups_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$FT_groups_4,d$wave, exclude = F))


# Religion

d <- d %>%
  group_by(pid) %>%
  fill(religion, .direction = "downup") %>%
  ungroup()

addmargins(table(d$religion,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(Evangelical, .direction = "downup") %>%
  ungroup()

addmargins(table(d$Evangelical,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(rel_importance, .direction = "downup") %>%
  ungroup()

addmargins(table(d$rel_importance,d$wave, exclude = F))


# ZIP code

d <- d %>%
  group_by(pid) %>%
  fill(ZIPcode, .direction = "downup") %>%
  ungroup()

addmargins(table(d$ZIPcode,d$wave, exclude = F))

# State

d <- d %>%
  group_by(pid) %>%
  fill(state, .direction = "downup") %>%
  ungroup()

addmargins(table(d$state,d$wave, exclude = F))

d$state <- as.factor(d$state)
d$state[d$state == "invalid"] <- NA
d$state[d$state == "Invalid"] <- NA

d$state <- droplevels(d$state)

table(d$state, exclude = F)

# per_gop

d <- d %>%
  group_by(pid) %>%
  fill(per_gop, .direction = "downup") %>%
  ungroup()

addmargins(table(d$per_gop,d$wave, exclude = F))

d$per_gop <- as.numeric(d$per_gop)


# per_dem

d <- d %>%
  group_by(pid) %>%
  fill(per_dem, .direction = "downup") %>%
  ungroup()

addmargins(table(d$per_dem,d$wave, exclude = F))

d$per_dem <- as.numeric(d$per_dem)

# vote_MC

d <- d %>%
  group_by(pid) %>%
  fill(vote_MC_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$vote_MC_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(vote_MC_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$vote_MC_2,d$wave, exclude = F))


# Israel

table(d$israel)

d <- d %>%
  group_by(pid) %>%
  fill(israel, .direction = "downup") %>%
  ungroup()

addmargins(table(d$israel,d$wave, exclude = F))

table(d$israel_usRole)


d <- d %>%
  group_by(pid) %>%
  fill(israel_usRole, .direction = "downup") %>%
  ungroup()

addmargins(table(d$israel_usRole,d$wave, exclude = F))
d$israel_usRole <- as.numeric(as.character(d$israel_usRole))


# border

table(d$border_Harris)


d <- d %>%
  group_by(pid) %>%
  fill(border_Harris, .direction = "downup") %>%
  ungroup()

addmargins(table(d$border_Harris,d$wave, exclude = F))


table(d$border_Trump)

d <- d %>%
  group_by(pid) %>%
  fill(border_Trump, .direction = "downup") %>%
  ungroup()

addmargins(table(d$border_Trump,d$wave, exclude = F))


# polling

d <- d %>%
  group_by(pid) %>%
  fill(pollFreq, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollFreq,d$wave, exclude = F))

d$pollFreq <- dplyr::recode(d$pollFreq,
                            `1` = 7,
                            `2` = 6,
                            `3` = 5,
                            `4` = 4,
                            `5` = 3,
                            `6` = 2,
                            `7` = 1)

d[d$wave == 1 | d$wave ==2,] <- d[d$wave == 1 | d$wave ==2,] %>%
  group_by(pid) %>%
  fill(pollAcc, .direction = "downup") %>%
  ungroup()

d[d$wave == 3 | d$wave == 4,] <- d[d$wave == 3 | d$wave == 4,] %>%
  group_by(pid) %>%
  fill(pollAcc, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollAcc,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollPred, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollPred,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollsource, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollsource,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollsource_7_TEXT, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollsource_7_TEXT,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollrel1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollrel1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollbias1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollbias1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollrel2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollrel2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollbias2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollbias2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollrel3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollrel3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollbias3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollbias3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollrel4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollrel4,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(pollbias4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$pollbias4,d$wave, exclude = F))

# NFC

d <- d %>%
  group_by(pid) %>%
  fill(NFC6_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$NFC6_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(NFC6_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$NFC6_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(NFC6_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$NFC6_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(NFC6_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$NFC6_4,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(NFC6_5, .direction = "downup") %>%
  ungroup()

addmargins(table(d$NFC6_5,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(NFC6_6, .direction = "downup") %>%
  ungroup()

addmargins(table(d$NFC6_6,d$wave, exclude = F))

d$NFC6_3.r <- d$NFC6_3 * -1
d$NFC6_4.r <- d$NFC6_4 * -1

d$NFC <- rowMeans(d[,c("NFC6_1", "NFC6_2", "NFC6_3.r", "NFC6_4.r", "NFC6_5", "NFC6_6")], na.rm = T)

psych::alpha(d[,c("NFC6_1", "NFC6_2", "NFC6_3.r", "NFC6_4.r", "NFC6_5", "NFC6_6")])

# Executive order measures

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_4,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_4,d$wave, exclude = F))


# gov't process measures

d <- d %>%
  group_by(pid) %>%
  fill(govt_process, .direction = "downup") %>%
  ungroup()

addmargins(table(d$govt_process,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(representation_Dem, .direction = "downup") %>%
  ungroup()

addmargins(table(d$representation_Dem,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(representation_Rep, .direction = "downup") %>%
  ungroup()

addmargins(table(d$representation_Rep,d$wave, exclude = F))


# ideology

d <- d %>%
  group_by(pid) %>%
  fill(ideology, .direction = "downup") %>%
  ungroup()

addmargins(table(d$ideology,d$wave, exclude = F))

# EO valence & impact

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_valence_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_valence_4,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_1, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_1,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_2, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_2,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_3, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_3,d$wave, exclude = F))

d <- d %>%
  group_by(pid) %>%
  fill(EO_impact_4, .direction = "downup") %>%
  ungroup()

addmargins(table(d$EO_impact_4,d$wave, exclude = F))

d$EO_valence <- rowMeans(d[,c("EO_valence_1","EO_valence_2","EO_valence_3","EO_valence_4")],na.rm = T)

d$EO_impact <- rowMeans(d[,c("EO_impact_1","EO_impact_2","EO_impact_3","EO_impact_4")],na.rm = T)

repeated measures

# emotions
d$Neg_Emo <- rowMeans(d[,c("Emotions_1", "Emotions_2", "Emotions_5")], na.rm = T)

psych::alpha(d[,c("Emotions_1", "Emotions_2", "Emotions_5")])


cor.test(d$Emotions_1[d$wave == 1], d$Emotions_2[d$wave == 1])
cor.test(d$Emotions_1[d$wave == 2], d$Emotions_2[d$wave == 2])
psych::alpha(d[d$wave == 3,c("Emotions_1", "Emotions_2", "Emotions_5")])
psych::alpha(d[d$wave == 4,c("Emotions_1", "Emotions_2", "Emotions_5")])

d$Neg_Emo.c <- d$Neg_Emo - mean(d$Neg_Emo, na.rm = T)

d$Pos_Emo <- rowMeans(d[,c("Emotions_3", "Emotions_4")], na.rm = T)
cor.test(d$Emotions_3, d$Emotions_4)
cor.test(d$Emotions_3[d$wave == 1], d$Emotions_4[d$wave == 1])
cor.test(d$Emotions_3[d$wave == 2], d$Emotions_4[d$wave == 2])
cor.test(d$Emotions_3[d$wave == 3], d$Emotions_4[d$wave == 3])
cor.test(d$Emotions_3[d$wave == 4], d$Emotions_4[d$wave == 4])

d$Pos_Emo.c <- d$Pos_Emo - mean(d$Pos_Emo, na.rm = T)

# vote confidence
d$voteconfidence <- rowMeans(d[,c('voteconf_natl','voteconf_self')], na.rm = T)

cor.test(d$voteconf_natl, d$voteconf_self)
cor.test(d$voteconf_natl[d$wave == 1], d$voteconf_self[d$wave == 1])
cor.test(d$voteconf_natl[d$wave == 2], d$voteconf_self[d$wave == 2])
cor.test(d$voteconf_natl[d$wave == 3], d$voteconf_self[d$wave == 3])
cor.test(d$voteconf_natl[d$wave == 4], d$voteconf_self[d$wave == 4])

# party ID
## Creating continuous measure of party from branching ANES question

d$partyCont <- NA
d$partyCont[d$demStrength == 1] <- -3
d$partyCont[d$demStrength == 2] <- -2
d$partyCont[d$partyClose == 1] <- -1
d$partyCont[d$partyClose == 3] <- 0
d$partyCont[d$partyClose == 2] <- 1
d$partyCont[d$repStrength == 2] <- 2
d$partyCont[d$repStrength == 1] <- 3

## Creating factor measure of party from continuous measure
d$party_factor <- NA
d$party_factor[d$partyCont == -3 | d$partyCont == -2 | d$partyCont == -1] <- "Democrat"
d$party_factor[d$partyCont == 3 | d$partyCont == 2 | d$partyCont == 1] <- "Republican"
d$party_factor[d$partyCont == 0] <- "Independent"

table(d$party_factor)


# affective polarization

## Parties
d$FT_Outgroup <- ifelse(d$party_factor == "Democrat", d$FT_parties_2,
                        ifelse(d$party_factor == "Republican", d$FT_parties_1, NA))

d$FT_diff <- NA
d$FT_diff <- d$FT_parties_1 - d$FT_parties_2

d$affPol <- ifelse(d$party_factor == "Democrat", d$FT_parties_1 - d$FT_parties_2,
                   ifelse(d$party_factor == "Republican", d$FT_parties_2 - d$FT_parties_1,
                          ifelse(d$party_factor == "Independent", NA, NA)))


## Politicians
d$FT_Outcandidate <- ifelse(d$party_factor == "Democrat", d$FT_pols_2,
                        ifelse(d$party_factor == "Republican", d$FT_pols_1, NA))

d$FT_CandDiff <- NA
d$FT_CandDiff <- d$FT_pols_1 - d$FT_pols_2
describeBy(d$FT_CandDiff, d$party_factor)

d$affPol_cand <- ifelse(d$party_factor == "Democrat", d$FT_pols_1 - d$FT_pols_2,
                   ifelse(d$party_factor == "Republican", d$FT_pols_2 - d$FT_pols_1,
                          ifelse(d$party_factor == "Independent", NA, NA)))


# connectedness

d$connectedness_6 <- as.numeric(d$connectedness_6)

d$connectedness <- rowMeans(d[,c("connectedness_1","connectedness_2","connectedness_3","connectedness_4","connectedness_5","connectedness_6","connectedness_7","connectedness_8")], na.rm = T)

psych::alpha(d[ , c("connectedness_1","connectedness_2","connectedness_3","connectedness_4","connectedness_5","connectedness_6","connectedness_7","connectedness_8")])


# demNorms

d$antidemNorms <- rowMeans(d[,c("demNorms_Reps_1", "demNorms_Reps_2", "demNorms_Reps_3", "demNorms_Reps_4", "demNorms_Dems_1", "demNorms_Dems_2", "demNorms_Dems_3", "demNorms_Dems_4")], na.rm = T)

psych::alpha(d[,c("demNorms_Reps_1", "demNorms_Reps_2", "demNorms_Reps_3", "demNorms_Reps_4")])
psych::alpha(d[d$wave == 1,c("demNorms_Reps_1", "demNorms_Reps_2", "demNorms_Reps_3", "demNorms_Reps_4")])
psych::alpha(d[d$wave == 2,c("demNorms_Reps_1", "demNorms_Reps_2", "demNorms_Reps_3", "demNorms_Reps_4")])
psych::alpha(d[d$wave == 3,c("demNorms_Reps_1", "demNorms_Reps_2", "demNorms_Reps_3", "demNorms_Reps_4")])
psych::alpha(d[d$wave == 4,c("demNorms_Reps_1", "demNorms_Reps_2", "demNorms_Reps_3", "demNorms_Reps_4")])

psych::alpha(d[,c("demNorms_Dems_1", "demNorms_Dems_2", "demNorms_Dems_3", "demNorms_Dems_4")])
psych::alpha(d[d$wave == 1,c("demNorms_Dems_1", "demNorms_Dems_2", "demNorms_Dems_3", "demNorms_Dems_4")])
psych::alpha(d[d$wave == 2,c("demNorms_Dems_1", "demNorms_Dems_2", "demNorms_Dems_3", "demNorms_Dems_4")])
psych::alpha(d[d$wave == 3,c("demNorms_Dems_1", "demNorms_Dems_2", "demNorms_Dems_3", "demNorms_Dems_4")])
psych::alpha(d[d$wave == 4,c("demNorms_Dems_1", "demNorms_Dems_2", "demNorms_Dems_3", "demNorms_Dems_4")])

d$demNorms <- (d$antidemNorms*-1)

psych::describe(d$demNorms)
psych::describe(d$antidemNorms)


# anti-Asian animus

d$AAA <- rowMeans(d[c("AAA_1", "AAA_2", "AAA_3")], na.rm = T)

psych::alpha(d[,c("demNorms_Dems_1", "demNorms_Dems_2", "demNorms_Dems_3", "demNorms_Dems_4")])


# gov't trust

cor.test(d$trustGovt1, d$trustGovt2) # yeah
cor.test(d$trustGovt1[d$wave == 1], d$trustGovt2[d$wave == 1]) 
cor.test(d$trustGovt1[d$wave == 2], d$trustGovt2[d$wave == 2]) 
cor.test(d$trustGovt1[d$wave == 3], d$trustGovt2[d$wave == 3]) 
cor.test(d$trustGovt1[d$wave == 4], d$trustGovt2[d$wave == 4]) 

d$trustGovt <- rowMeans(d[c("trustGovt1", "trustGovt2")], na.rm = T)


# science trust

d$trustSci <- rowMeans(d[c("trustSci_1", "trustSci_2","trustSci_3","trustSci_4")], na.rm = T)

psych::alpha(d[c("trustSci_1", "trustSci_2","trustSci_3","trustSci_4")])


# Vote Choice

table(d$voteChoice_final, d$wave)

d$voteID <- NA
d$voteID[d$voteChoice_final == 1] <- "Trump"
d$voteID[d$voteChoice_final == 2] <- "Harris"
d$voteID[d$VoteChoice == 1] <- "Trump"
d$voteID[d$VoteChoice == 2] <- "Harris"
d$voteID[d$VoteLean == 1] <- "Trump"
d$voteID[d$VoteLean == 2] <- "Harris"
d$voteID[d$VoteLean == 3] <- "Other"
d$voteID[d$voteChoice_final == 4] <- "Did Not Vote"
d$voteID[d$voteChoice_final == 3] <- "Other" # Hmmm

table(d$voteID, exclude = F)


# counter-proj

## ID
d$proj_ID <- NA
d$proj_ID[d$voteID == "Harris"] <- "Left"
d$proj_ID[d$voteID == "Trump"] <- "Right"
d$proj_ID[d$voteID == "Other" & d$party_factor == "Democrat"] <- "Left"
d$proj_ID[d$voteID == "Other" & d$party_factor == "Republican"] <- "Right"

## affective polarization
d$affPol_proj_Harris <- d$FT_proj_Harris_2 - d$FT_proj_Harris_1
d$affPol_proj_Trump <- d$FT_proj_Trump_1 - d$FT_proj_Trump_2
d$affPol_proj_Dem <- d$FT_proj_Dem_2 - d$FT_proj_Dem_1
d$affPol_proj_Rep <- d$FT_proj_Rep_1 - d$FT_proj_Rep_2

## dem norms
d$demNorms_proj_harris <- rowMeans(d[,c("demNorms_proj_harris_1", "demNorms_proj_harris_2", "demNorms_proj_harris_3", "demNorms_proj_harris_4")], na.rm = T)
d$demNorms_proj_Trump <- rowMeans(d[,c("demNorms_proj_Trump_1", "demNorms_proj_Trump_2", "demNorms_proj_Trump_3", "demNorms_proj_Trump_4")], na.rm = T)
d$demNorms_proj_Dem <- rowMeans(d[,c("demNorms_proj_Dem_1", "demNorms_proj_Dem_2", "demNorms_proj_Dem_3", "demNorms_proj_Dem_4")], na.rm = T)
d$demNorms_proj_Rep <- rowMeans(d[,c("demNorms_proj_Rep_1", "demNorms_proj_Rep_2", "demNorms_proj_Rep_3", "demNorms_proj_Rep_4")], na.rm = T)

# Affective Polarization
#d$affPol_proj <- ifelse(d$voteID == "Harris", d$affPol_proj_Harris,
#                  ifelse(d$voteID == "Trump", d$affPol_proj_Trump,
#                   ifelse(d$voteID == "Other" & d$party_factor == "Democrat", #d$affPol_proj_Dem, 
#                    ifelse(d$voteID == "Other" & d$party_factor == "Republican", #d$affPol_proj_Rep, NA))))

d$affPol_proj <- rowMeans(d[,c("affPol_proj_Harris","affPol_proj_Trump","affPol_proj_Dem","affPol_proj_Rep")], na.rm = T)

describeBy(d$affPol_proj, list(d$proj_ID, d$wave))

## Negative Polarization
d$negPol_proj <- ifelse(d$voteID == "Harris", d$FT_proj_Harris_1,
                  ifelse(d$voteID == "Trump", d$FT_proj_Trump_2,
                   ifelse(d$voteID == "Other" & d$party_factor == "Democrat", d$FT_proj_Dem_1, 
                    ifelse(d$voteID == "Other" & d$party_factor == "Republican", d$FT_proj_Rep_2, NA))))

## Democratic Norms
d$demNorms_proj <- ifelse(d$voteID == "Harris", d$demNorms_proj_harris,
                  ifelse(d$voteID == "Trump", d$demNorms_proj_Trump,
                   ifelse(d$voteID == "Other" & d$party_factor == "Democrat", d$demNorms_proj_Dem, 
                    ifelse(d$voteID == "Other" & d$party_factor == "Republican", d$demNorms_proj_Rep, NA))))

# climate attitudes
d$climBel_proj <- ifelse(d$voteID == "Harris", d$climBel_proj_Harris,
                  ifelse(d$voteID == "Trump", d$climbel_proj_Trump,
                   ifelse(d$voteID == "Other" & d$party_factor == "Democrat", d$climBel_proj_Dem, 
                    ifelse(d$voteID == "Other" & d$party_factor == "Republican", d$climBel_proj_Rep, NA))))


# ID centrality variables

## ID formation 1
d$IDform_1 <- rowMeans(d[, c("IDform_Dem_1", "IDform_Rep_1", "IDform_ind_1", "IDform_lib_1", "IDform_leftist_1", "IDform_prog_1", "IDform_con_1", "IDform_right_1", "IDform_mod_1", "IDform_socialist_1", "IDform_natlist_1", "IDform_libertarian_1", "IDform_feminist_1", "IDform_prolife_1", "IDform_prochoice_1", "IDform_MAGA_1", "IDform_enviro_1", "IDform_antiTrump_1", "IDform_pop_1", "IDform_other_1")], na.rm = T) 



## ID formation 2
d$IDform_2 <- rowMeans(d[, c("IDform_Dem_2", "IDform_Rep_2", "IDform_ind_2", "IDform_lib_2", "IDform_leftist_2", "IDform_prog_2", "IDform_con_2", "IDform_right_2", "IDform_mod_2", "IDform_socialist_2", "IDform_natlist_2", "IDform_libertarian_2", "IDform_feminist_2", "IDform_prolife_2", "IDform_prochoice_2", "IDform_MAGA_2", "IDform_enviro_2", "IDform_antiTrump_2", "IDform_pop_2", "IDform_other_2")], na.rm = T) 


## ID formation 3
d$IDform_3 <- rowMeans(d[, c("IDform_Dem_3", "IDform_Rep_3", "IDform_ind_3", "IDform_lib_3", "IDform_leftist_3", "IDform_prog_3", "IDform_con_3", "IDform_right_3", "IDform_mod_3", "IDform_socialist_3", "IDform_natlist_3", "IDform_libertarian_3", "IDform_feminist_3", "IDform_prolife_3", "IDform_prochoice_3", "IDform_MAGA_3", "IDform_enviro_3", "IDform_antiTrump_3", "IDform_pop_3", "IDform_other_3")], na.rm = T) 


## ID formation 4
d$IDform_4 <- rowMeans(d[, c("IDform_Dem_4", "IDform_Rep_4", "IDform_ind_4", "IDform_lib_4", "IDform_leftist_4", "IDform_prog_4", "IDform_con_4", "IDform_right_4", "IDform_mod_4", "IDform_socialist_4", "IDform_natlist_4", "IDform_libertarian_4", "IDform_feminist_4", "IDform_prolife_4", "IDform_prochoice_4", "IDform_MAGA_4", "IDform_enviro_4", "IDform_antiTrump_4", "IDform_pop_4", "IDform_other_4")], na.rm = T) 

## ID formation 5
d$IDform_5 <- rowMeans(d[, c("IDform_Dem_5", "IDform_Rep_5", "IDform_ind_5", "IDform_lib_5", "IDform_leftist_5", "IDform_prog_5", "IDform_con_5", "IDform_right_5", "IDform_mod_5", "IDform_socialist_5", "IDform_natlist_5", "IDform_libertarian_5", "IDform_feminist_5", "IDform_prolife_5", "IDform_prochoice_5", "IDform_MAGA_5", "IDform_enviro_5", "IDform_antiTrump_5", "IDform_pop_5", "IDform_other_5")], na.rm = T)


## ID formation 6
d$IDform_6 <- rowMeans(d[, c("IDform_Dem_6", "IDform_Rep_6", "IDform_ind_6", "IDform_lib_6", "IDform_leftist_6", "IDform_prog_6", "IDform_con_6", "IDform_right_6", "IDform_mod_6", "IDform_socialist_6", "IDform_natlist_6", "IDform_libertarian_6", "IDform_feminist_6", "IDform_prolife_6", "IDform_prochoice_6", "IDform_MAGA_6", "IDform_enviro_6", "IDform_antiTrump_6", "IDform_pop_6", "IDform_other_6")], na.rm = T) 


## composite identity centrality
d$IDform <- rowMeans(d[,c("IDform_1", "IDform_2", "IDform_3", "IDform_4", "IDform_5", "IDform_6")], na.rm = T)

psych::alpha(d[,c("IDform_1", "IDform_2", "IDform_3", "IDform_4", "IDform_5", "IDform_6")])


# Identity Variables

d$numID_selected <- NA
d$numID_selected <- rowSums(d[,c("polID_Liberal_select", "polID_Leftist_select", "polID_Progressive_select", "polID_Conservative_select", "polID_RightWing_select", "polID_Moderate_select", "polID_Socialist_select", "polID_Nationalist_select", "polID_Libertarian_select", "polID_Feminist_select", "polID_Prolife_select", "polID_Prochoice_select", "polID_MAGA_select", "polID_AntiTrump_select", "polID_Environmentalist_select", "polID_Populist_select", "polID_Other_select")],na.rm = T)

table(d$numID_selected, d$wave)

## Calculate & join ID sds for each participant
ID_sds <- d %>%
  dplyr::group_by(pid) %>%
  dplyr::summarize(sdID_selected = sd(numID_selected, na.rm = TRUE))

d <- d %>%
  left_join(ID_sds, by = "pid")

Results

Figures:

Figures are typically sized at 90mm (single column) or 180mm (double column), with a maximum height of 170mm, and font sizes should be 5-7pt at this size

Prep: Analytic codes & centering

### partisan identity vars

# Contrast Codes

## dems vs. reps
d$pDem_Rep <- NA
d$pDem_Rep[d$party_factor == "Democrat"] <- -1/2
d$pDem_Rep[d$party_factor == "Independent"] <- 0
d$pDem_Rep[d$party_factor == "Republican"] <- 1/2

## partisans vs. inds
d$pParty_Ind <- NA
d$pParty_Ind[d$party_factor == "Democrat"] <- -1/3
d$pParty_Ind[d$party_factor == "Independent"] <- 2/3
d$pParty_Ind[d$party_factor == "Republican"] <- -1/3


# Dummy Codes

## Democrats

### dems vs. R
d$pDem_R <- NA
d$pDem_R[d$party_factor == "Democrat"] <- 0
d$pDem_R[d$party_factor == "Independent"] <- 0
d$pDem_R[d$party_factor == "Republican"] <- 1

### dems vs. I
d$pDem_I <- NA
d$pDem_I[d$party_factor == "Democrat"] <- 0
d$pDem_I[d$party_factor == "Independent"] <- 1
d$pDem_I[d$party_factor == "Republican"] <- 0

## Republicans

### reps vs. D
d$pRep_D <- NA
d$pRep_D[d$party_factor == "Democrat"] <- 1
d$pRep_D[d$party_factor == "Independent"] <- 0
d$pRep_D[d$party_factor == "Republican"] <- 0

### reps vs. I
d$pRep_I <- NA
d$pRep_I[d$party_factor == "Democrat"] <- 0
d$pRep_I[d$party_factor == "Independent"] <- 1
d$pRep_I[d$party_factor == "Republican"] <- 0

## Independents

### inds vs. D
d$pInd_D <- NA
d$pInd_D[d$party_factor == "Democrat"] <- 1
d$pInd_D[d$party_factor == "Independent"] <- 0
d$pInd_D[d$party_factor == "Republican"] <- 0

### inds vs. R
d$pInd_R <- NA
d$pInd_R[d$party_factor == "Democrat"] <- 0
d$pInd_R[d$party_factor == "Independent"] <- 0
d$pInd_R[d$party_factor == "Republican"] <- 1

# party switch
d$party_switch.d <- ifelse(d$party_switch == "TRUE", 1, 0)

### wave

d$wave <- as.factor(d$wave)

# contrast codes
d$wave.lin <- NA
d$wave.lin[d$wave == 1] <- -1/2
d$wave.lin[d$wave == 2] <- -1/4
d$wave.lin[d$wave == 3] <- 1/4
d$wave.lin[d$wave == 4] <- 1/2

d$wave.quad <- NA
d$wave.quad[d$wave == 1] <- -1/2
d$wave.quad[d$wave == 2] <- 1/2
d$wave.quad[d$wave == 3] <- 1/2
d$wave.quad[d$wave == 4] <- -1/2

d$wave.cub <- NA
d$wave.cub[d$wave == 1] <- 1/4
d$wave.cub[d$wave == 2] <- -1/2
d$wave.cub[d$wave == 3] <- 1/2
d$wave.cub[d$wave == 4] <- -1/4

# dummy codes

## wave 1
d$wave1_2 <- NA
d$wave1_2[d$wave == 1] <- 0
d$wave1_2[d$wave == 2] <- 1
d$wave1_2[d$wave == 3] <- 0
d$wave1_2[d$wave == 4] <- 0

d$wave1_3 <- NA
d$wave1_3[d$wave == 1] <- 0
d$wave1_3[d$wave == 2] <- 0
d$wave1_3[d$wave == 3] <- 1
d$wave1_3[d$wave == 4] <- 0

d$wave1_4 <- NA
d$wave1_4[d$wave == 1] <- 0
d$wave1_4[d$wave == 2] <- 0
d$wave1_4[d$wave == 3] <- 0
d$wave1_4[d$wave == 4] <- 1

## wave 2
d$wave2_1 <- NA
d$wave2_1[d$wave == 1] <- 1
d$wave2_1[d$wave == 2] <- 0
d$wave2_1[d$wave == 3] <- 0
d$wave2_1[d$wave == 4] <- 0

d$wave2_3 <- NA
d$wave2_3[d$wave == 1] <- 0
d$wave2_3[d$wave == 2] <- 0
d$wave2_3[d$wave == 3] <- 1
d$wave2_3[d$wave == 4] <- 0

d$wave2_4 <- NA
d$wave2_4[d$wave == 1] <- 0
d$wave2_4[d$wave == 2] <- 0
d$wave2_4[d$wave == 3] <- 0
d$wave2_4[d$wave == 4] <- 1

## wave 3
d$wave3_1 <- NA
d$wave3_1[d$wave == 1] <- 1
d$wave3_1[d$wave == 2] <- 0
d$wave3_1[d$wave == 3] <- 0
d$wave3_1[d$wave == 4] <- 0

d$wave3_2 <- NA
d$wave3_2[d$wave == 1] <- 0
d$wave3_2[d$wave == 2] <- 1
d$wave3_2[d$wave == 3] <- 0
d$wave3_2[d$wave == 4] <- 0

d$wave3_4 <- NA
d$wave3_4[d$wave == 1] <- 0
d$wave3_4[d$wave == 2] <- 0
d$wave3_4[d$wave == 3] <- 0
d$wave3_4[d$wave == 4] <- 1

## wave 4
d$wave4_1 <- NA
d$wave4_1[d$wave == 1] <- 1
d$wave4_1[d$wave == 2] <- 0
d$wave4_1[d$wave == 3] <- 0
d$wave4_1[d$wave == 4] <- 0

d$wave4_2 <- NA
d$wave4_2[d$wave == 1] <- 0
d$wave4_2[d$wave == 2] <- 1
d$wave4_2[d$wave == 3] <- 0
d$wave4_2[d$wave == 4] <- 0

d$wave4_3 <- NA
d$wave4_3[d$wave == 1] <- 0
d$wave4_3[d$wave == 2] <- 0
d$wave4_3[d$wave == 3] <- 1
d$wave4_3[d$wave == 4] <- 0

# Polling Variable
d$pollFreq.c <- d$pollFreq - mean(d$pollFreq, na.rm = T)

# Race
d$vs_race <- as.factor(as.character(d$vs_race))
d$vs_race <- relevel(d$vs_race, ref = "White")

# Gender
d$vs_gender <- as.factor(as.character(d$vs_gender))

d$male_female <- NA
d$male_female[d$vs_gender == "Male"] <- -1/2
d$male_female[d$vs_gender == "Female"] <- 1/2
d$male_female[d$vs_gender == "Other"] <- 0

d$nonbinary_mf <- NA
d$nonbinary_mf[d$vs_gender == "Male"] <- 1/3
d$nonbinary_mf[d$vs_gender == "Female"] <- 1/3
d$nonbinary_mf[d$vs_gender == "Other"] <- -2/3

# generic conspiracist beliefs
d$GCB.c <- d$GCB - mean(d$GCB, na.rm = T)

# affPol (scaled)
d$affPol.100 <- d$affPol/100

# poll reliability & poll ideology bias

## averaging across all media sources
d$pollrel <- rowMeans(d[,c("pollrel1", "pollrel2", "pollrel3", "pollrel4")], na.rm = T)

d$pollbias <- rowMeans(d[,c("pollbias1", "pollbias2", "pollbias3", "pollbias4")], na.rm = T)

## scaled variables
d$pollrel.z <- scale(d$pollrel)
d$pollbias.z <- 2 * (d$pollbias - min(d$pollbias, na.rm = TRUE)) / (max(d$pollbias, na.rm = TRUE) - min(d$pollbias, na.rm = TRUE)) - 1

## magnitude and tilt separate
d$pollbias_abs <- abs(d$pollbias)
d$pollbias_tilt <- ifelse(d$pollbias > 0, "conservative",
                          ifelse(d$pollbias < 0, "liberal", NA))
table(d$pollbias_tilt)
## 
## conservative      liberal 
##         2014         3764
# Vote share measures

d$per_sum <- rowSums(d[,c("per_dem","per_gop")], na.rm = T)

d$per_sum[d$per_sum == 0] <- NA

d$per_inparty <- ifelse(d$party_factor == "Democrat", d$per_dem,
                        ifelse(d$party_factor == "Republican", d$per_gop,
                               ifelse(d$party_factor == "Independent", NA, NA)))

# plot labels
wave_label <- c(`1` = "Wave 1", `2` = "Wave 2", `3` = "Wave 3", `4` = "Wave 4")

wave_posemo_label.b <- c(`1` = "Wave 1", `2` = "Wave 2", `3` = "Wave 3", `4` = "Wave 4", "-1 SD" = "Low Pos. Emo.", "Mean Positive Emotions" = "Mean Pos. Emo.", "+1 SD" = "High Pos. Emo.")
wave_negemo_label.b <- c(`1` = "Wave 1", `2` = "Wave 2", `3` = "Wave 3", `4` = "Wave 4", "-1 SD" = "Low Neg. Emo.", "Mean Negative Emotions" = "Mean Neg. Emo.", "+1 SD" = "High Neg. Emo.")

wave_posemo_label.t <- c(`1` = "Wave 1", `2` = "Wave 2", `3` = "Wave 3", `4` = "Wave 4", "1st tercile" = "Low Pos. Emo.", "2nd tercile" = "Mid Pos. Emo.", "3rd tercile" = "High Pos. Emo.")
wave_negemo_label.t <- c(`1` = "Wave 1", `2` = "Wave 2", `3` = "Wave 3", `4` = "Wave 4", "1st tercile" = "Low Neg. Emo.", "2nd tercile" = "Mid Neg. Emo.", "3rd tercile" = "High Neg. Emo.")

# terciles & bins

## emotions - pos & neg
d$Pos_Emo_terciles <- ntile(d$Pos_Emo, 3)
d$Pos_Emo_terciles <- as.factor(d$Pos_Emo_terciles)
d$Pos_Emo_terciles <- recode_factor(d$Pos_Emo_terciles,
                                      "1" = "1st tercile",
                                      "2" = "2nd tercile",
                                      "3" = "3rd tercile")

d$Pos_Emo_bins <- NA
d$Pos_Emo_bins[d$Pos_Emo <= (mean(d$Pos_Emo, na.rm = T) - sd(d$Pos_Emo, na.rm = T))] <- "-1 SD"
d$Pos_Emo_bins[d$Pos_Emo > (mean(d$Pos_Emo, na.rm = T) - sd(d$Pos_Emo, na.rm = T)) & d$Pos_Emo < (mean(d$Pos_Emo, na.rm = T) + sd(d$Pos_Emo, na.rm = T))] <- "Mean Positive Emotions"
d$Pos_Emo_bins[d$Pos_Emo >= (mean(d$Pos_Emo, na.rm = T) + sd(d$Pos_Emo, na.rm = T))] <- "+1 SD"

d$Pos_Emo_bins <- factor(d$Pos_Emo_bins, 
                         levels = c("-1 SD",
                                    "Mean Positive Emotions",
                                    "+1 SD"))

d$Neg_Emo_terciles <- ntile(d$Neg_Emo, 3)
d$Neg_Emo_terciles <- as.factor(d$Neg_Emo_terciles)
d$Neg_Emo_terciles <- recode_factor(d$Neg_Emo_terciles,
                                      "1" = "1st tercile",
                                      "2" = "2nd tercile",
                                      "3" = "3rd tercile")

d$Neg_Emo_bins <- NA
d$Neg_Emo_bins[d$Neg_Emo <= (mean(d$Neg_Emo, na.rm = T) - sd(d$Neg_Emo, na.rm = T))] <- "-1 SD"
d$Neg_Emo_bins[d$Neg_Emo > (mean(d$Neg_Emo, na.rm = T) - sd(d$Neg_Emo, na.rm = T)) & d$Neg_Emo < (mean(d$Neg_Emo, na.rm = T) + sd(d$Neg_Emo, na.rm = T))] <- "Mean Negative Emotions"
d$Neg_Emo_bins[d$Neg_Emo >= (mean(d$Neg_Emo, na.rm = T) + sd(d$Neg_Emo, na.rm = T))] <- "+1 SD"

d$Neg_Emo_bins <- factor(d$Neg_Emo_bins, 
                         levels = c("-1 SD",
                                    "Mean Negative Emotions",
                                    "+1 SD"))

d$per_gop.100 <- d$per_gop/100
d$per_dem.100 <- d$per_dem/100

1. Perceived Legitimacy by Social Norms and Emotions

a. Media Norms

# Density of Partisan Media Bias
ggplot(d, aes(x=pollbias.z)) +
  geom_density(fill="#69b3a2", color="#e9ecef", alpha=0.9) +
  geom_vline(xintercept = 0, linetype="dashed", 
              color = "black", size=.5) +
  theme_bw() +
  labs(x = "Partisan Media Bias (Normalized)")

# Density by party
ggplot(d[!is.na(d$party_factor),], aes(x=pollbias.z, fill = party_factor)) +
  geom_density(color="black", alpha=0.5, position = 'identity') +
  theme_bw() +
  geom_vline(xintercept = 0, linetype="dashed", 
                color = "black", size=.5) +
  scale_fill_manual("Participant Party ID",
                    values = c("#1696d2","grey","#db2b27")) +
  labs(x = "Partisan Media Bias (Normalized)")

# Just bias
ggplot(d[!is.na(d$party_factor),],
       aes(x = pollbias.z, 
           y = voteconfidence, 
           fill = party_factor,
           color = party_factor)) +
  geom_smooth(method = "lm",
              fullrange = T) +
  facet_grid(~wave, labeller = as_labeller(wave_label)) +
  labs(x = "Partisan Media Bias (Normalized)",
       y = "Perceived Election Legitimacy")+
  scale_fill_manual("Participant 
Partisan Identity", 
                    values = c("#1696d2","grey","#db2b27")) +
  scale_color_manual("Participant 
Partisan Identity", 
                     values = c("#1696d2","grey","#db2b27")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

# bias x positive emotions - tercs
ggplot(d[!is.na(d$party_factor),],
       aes(x = pollbias.z, 
           y = voteconfidence, 
           fill = party_factor,
           color = party_factor)) +
  geom_jitter(height = .3, width = .3, alpha = .2, size = .2) +
  geom_smooth(method = "lm",
              fullrange = T, se = F) +
  facet_grid(Pos_Emo_terciles~wave, labeller = as_labeller(wave_posemo_label.t)) +
  labs(x = "Partisan Media Bias (Normalized)",
       y = "Perceived Election Legitimacy")+
  scale_fill_manual("Participant 
Partisan Identity", 
                    values = c("#1696d2","black","#db2b27")) +
  scale_color_manual("Participant 
Partisan Identity", 
                     values = c("#1696d2","black","#db2b27")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

## Negative Emotions

# bias x negative emotions - tercs
ggplot(d[!is.na(d$party_factor),],
       aes(x = pollbias.z, 
           y = voteconfidence, 
           fill = party_factor,
           color = party_factor)) +
  geom_jitter(height = .3, width = .3, alpha = .2, size = .2) +
  geom_smooth(method = "lm",
              fullrange = T, se = F) +
  facet_grid(Neg_Emo_terciles~wave, labeller = as_labeller(wave_negemo_label.t)) +
  labs(x = "Partisan Media Bias (Normalized)",
       y = "Perceived Election Legitimacy") +
  scale_fill_manual("Participant 
Partisan Identity", 
                    values = c("#1696d2","black","#db2b27")) +
  scale_color_manual("Participant 
Partisan Identity", 
                     values = c("#1696d2","black","#db2b27")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

Models

Main model

m1 <- lmer(voteconfidence ~ (pDem_Rep + pParty_Ind) * pollbias.z * (wave.lin + wave.quad + wave.cub) * (Pos_Emo.c + Neg_Emo.c)
           + pollAcc + pollFreq.c
           + vs_race + vs_age + male_female + nonbinary_mf
           + (Pos_Emo.c + Neg_Emo.c|pid), 
           data = d)

tab_model(m1, show.stat = T, show.df = T, df.method = "satterthwaite")
  voteconfidence
Predictors Estimates CI Statistic p df
(Intercept) 3.01 2.76 – 3.26 23.60 <0.001 1347.92
pDem Rep -0.37 -0.47 – -0.27 -7.39 <0.001 3381.85
pParty Ind -0.19 -0.31 – -0.08 -3.24 0.001 4722.83
pollbias z -0.54 -0.71 – -0.38 -6.58 <0.001 2657.99
wave lin 0.27 0.19 – 0.35 6.71 <0.001 4086.07
wave quad 0.10 0.04 – 0.16 3.39 0.001 3920.85
wave cub -0.05 -0.13 – 0.02 -1.43 0.154 3884.77
Pos Emo c 0.21 0.17 – 0.24 11.16 <0.001 2202.86
Neg Emo c -0.07 -0.11 – -0.03 -3.63 <0.001 1752.79
pollAcc 0.06 0.04 – 0.08 6.19 <0.001 5231.73
pollFreq c -0.01 -0.03 – 0.00 -1.57 0.117 1615.15
vs race [Black] -0.30 -0.43 – -0.18 -4.95 <0.001 1744.81
vs race [Hispanic] -0.12 -0.25 – 0.01 -1.86 0.063 1620.80
vs race [Other] -0.10 -0.26 – 0.06 -1.25 0.211 1679.00
vs age 0.00 0.00 – 0.01 3.02 0.003 1667.00
male female -0.30 -0.38 – -0.22 -7.51 <0.001 1572.66
nonbinary mf 0.78 0.14 – 1.42 2.40 0.017 991.43
pDem Rep × pollbias z 0.20 -0.08 – 0.48 1.38 0.166 3325.19
pParty Ind × pollbias z -0.09 -0.45 – 0.26 -0.52 0.603 4934.75
pDem Rep × wave lin 0.90 0.75 – 1.05 12.01 <0.001 4266.81
pDem Rep × wave quad 0.16 0.05 – 0.27 2.80 0.005 4086.26
pDem Rep × wave cub -0.28 -0.41 – -0.14 -4.02 <0.001 3892.97
pParty Ind × wave lin 0.08 -0.12 – 0.27 0.74 0.460 4020.50
pParty Ind × wave quad 0.02 -0.13 – 0.17 0.30 0.764 3909.47
pParty Ind × wave cub 0.07 -0.12 – 0.25 0.68 0.497 3912.71
pollbias z × wave lin 0.28 0.04 – 0.52 2.31 0.021 4074.09
pollbias z × wave quad 0.14 -0.04 – 0.32 1.53 0.127 3916.11
pollbias z × wave cub 0.03 -0.19 – 0.25 0.29 0.769 3897.92
pDem Rep × Pos Emo c 0.05 -0.01 – 0.10 1.51 0.131 1674.66
pDem Rep × Neg Emo c -0.04 -0.10 – 0.03 -1.19 0.233 1654.50
pParty Ind × Pos Emo c 0.02 -0.07 – 0.11 0.40 0.693 3529.36
pParty Ind × Neg Emo c 0.07 -0.02 – 0.16 1.62 0.105 2746.16
pollbias z × Pos Emo c 0.10 -0.01 – 0.21 1.82 0.069 2228.38
pollbias z × Neg Emo c 0.00 -0.11 – 0.11 0.03 0.980 1878.87
wave lin × Pos Emo c 0.03 -0.05 – 0.10 0.72 0.470 4043.95
wave lin × Neg Emo c 0.00 -0.07 – 0.07 0.04 0.971 4164.67
wave quad × Pos Emo c 0.01 -0.05 – 0.06 0.19 0.849 4044.11
wave quad × Neg Emo c -0.05 -0.10 – 0.00 -1.78 0.076 3920.58
wave cub × Pos Emo c -0.02 -0.09 – 0.04 -0.62 0.535 4053.58
wave cub × Neg Emo c 0.03 -0.03 – 0.09 0.98 0.327 3884.47
(pDem Rep × pollbias z) ×
wave lin
0.17 -0.26 – 0.60 0.77 0.442 4262.24
(pDem Rep × pollbias z) ×
wave quad
0.24 -0.09 – 0.56 1.42 0.156 4090.10
(pDem Rep × pollbias z) ×
wave cub
0.03 -0.36 – 0.43 0.17 0.868 3958.40
(pParty Ind × pollbias z)
× wave lin
0.21 -0.40 – 0.83 0.68 0.497 4024.84
(pParty Ind × pollbias z)
× wave quad
-0.17 -0.63 – 0.29 -0.73 0.467 3919.51
(pParty Ind × pollbias z)
× wave cub
0.01 -0.56 – 0.58 0.03 0.975 3918.10
(pDem Rep × pollbias z) ×
Pos Emo c
-0.13 -0.30 – 0.03 -1.57 0.117 1650.13
(pDem Rep × pollbias z) ×
Neg Emo c
-0.02 -0.20 – 0.16 -0.22 0.824 1652.42
(pParty Ind × pollbias z)
× Pos Emo c
0.03 -0.25 – 0.31 0.23 0.819 3271.31
(pParty Ind × pollbias z)
× Neg Emo c
-0.01 -0.28 – 0.27 -0.04 0.971 2888.85
(pDem Rep × wave lin) ×
Pos Emo c
-0.02 -0.14 – 0.09 -0.37 0.709 4305.32
(pDem Rep × wave lin) ×
Neg Emo c
0.14 0.01 – 0.26 2.12 0.034 4292.73
(pDem Rep × wave quad) ×
Pos Emo c
0.06 -0.02 – 0.15 1.43 0.153 4134.31
(pDem Rep × wave quad) ×
Neg Emo c
-0.09 -0.18 – 0.01 -1.79 0.073 4142.47
(pDem Rep × wave cub) ×
Pos Emo c
0.09 -0.01 – 0.19 1.75 0.080 4019.73
(pDem Rep × wave cub) ×
Neg Emo c
0.04 -0.07 – 0.15 0.72 0.469 3999.96
(pParty Ind × wave lin) ×
Pos Emo c
0.31 0.12 – 0.50 3.15 0.002 3957.59
(pParty Ind × wave lin) ×
Neg Emo c
-0.04 -0.21 – 0.14 -0.43 0.670 4122.92
(pParty Ind × wave quad)
× Pos Emo c
-0.00 -0.15 – 0.15 -0.01 0.989 4048.99
(pParty Ind × wave quad)
× Neg Emo c
-0.06 -0.19 – 0.07 -0.90 0.369 3876.99
(pParty Ind × wave cub) ×
Pos Emo c
-0.03 -0.21 – 0.15 -0.33 0.745 4103.72
(pParty Ind × wave cub) ×
Neg Emo c
0.00 -0.16 – 0.16 0.00 0.997 3883.74
(pollbias z × wave lin) ×
Pos Emo c
-0.02 -0.24 – 0.20 -0.19 0.848 3921.25
(pollbias z × wave lin) ×
Neg Emo c
0.10 -0.11 – 0.30 0.92 0.358 4101.56
(pollbias z × wave quad)
× Pos Emo c
0.06 -0.10 – 0.23 0.75 0.454 3965.45
(pollbias z × wave quad)
× Neg Emo c
-0.05 -0.20 – 0.11 -0.61 0.545 3899.42
(pollbias z × wave cub) ×
Pos Emo c
-0.13 -0.33 – 0.08 -1.23 0.220 4123.47
(pollbias z × wave cub) ×
Neg Emo c
-0.00 -0.19 – 0.19 -0.04 0.970 3893.74
(pDem Rep × pollbias z ×
wave lin) × Pos Emo c
-0.19 -0.51 – 0.14 -1.11 0.266 4256.46
(pDem Rep × pollbias z ×
wave lin) × Neg Emo c
-0.12 -0.48 – 0.24 -0.68 0.499 4249.18
(pDem Rep × pollbias z ×
wave quad) × Pos Emo c
0.06 -0.18 – 0.30 0.48 0.632 4121.60
(pDem Rep × pollbias z ×
wave quad) × Neg Emo c
0.20 -0.07 – 0.46 1.47 0.143 4127.88
(pDem Rep × pollbias z ×
wave cub) × Pos Emo c
0.12 -0.16 – 0.41 0.84 0.402 4029.54
(pDem Rep × pollbias z ×
wave cub) × Neg Emo c
0.30 -0.02 – 0.61 1.84 0.066 3992.63
(pParty Ind × pollbias z
× wave lin) × Pos Emo c
-0.31 -0.91 – 0.29 -1.01 0.314 3820.50
(pParty Ind × pollbias z
× wave lin) × Neg Emo c
0.07 -0.47 – 0.61 0.25 0.805 4025.92
(pParty Ind × pollbias z
× wave quad) × Pos Emo c
0.36 -0.10 – 0.81 1.54 0.124 3940.65
(pParty Ind × pollbias z
× wave quad) × Neg Emo c
-0.30 -0.71 – 0.10 -1.47 0.141 3872.32
(pParty Ind × pollbias z
× wave cub) × Pos Emo c
-0.03 -0.59 – 0.53 -0.11 0.916 4149.23
(pParty Ind × pollbias z
× wave cub) × Neg Emo c
-0.14 -0.64 – 0.37 -0.52 0.603 3894.89
Random Effects
σ2 0.41
τ00 pid 0.49
τ11 pid.Pos_Emo.c 0.04
τ11 pid.Neg_Emo.c 0.04
ρ01 -0.45
0.14
ICC 0.60
N pid 1674
Observations 5753
Marginal R2 / Conditional R2 0.206 / 0.683

Significant Effects

Main Effects

  • Dem_Rep: b = -0.37, t(3381.85) = -7.39, p < .001

  • pollbias: b = -0.54, t(2657.99) = -6.58, p < .001

  • wave lin: b = 0.27, t(4086.07) = 6.71, p < .001

  • Pos Emo: b = 0.21, t(2202.86) = 11.16, p < .001

  • Neg Emo: b = -0.07, t(1752.79) = -3.63, p < .001

2-way Interactions

  • Dem_Rep × wave lin: b = 0.90, t(4266.81) = 12.01, p < 0.001

  • pollbias × wave lin: b = 0.28, t(4074.09) = 2.31, p = 0.021

3-way Interactions

  • Dem_Rep × wave lin x Neg Emo: b = 0.14, t(4292.73) = 2.12, p = 0.034

b. Geographic Norms

# Density plot of Trump vote share
ggplot(d, aes(x=per_gop)) +
  geom_density(fill="#69b3a2", color="#e9ecef", alpha=0.9) + 
  theme_bw() +
  labs(x = "Trump Vote Share by County")

# Density by party
ggplot(d[!is.na(d$party_factor),], aes(x=per_gop, fill = party_factor)) +
  geom_density(color="black", alpha=0.5, position = 'identity') +
  theme_bw() +
  scale_fill_manual("Participant Party ID",
                    values = c("#1696d2","grey","#db2b27")) +
  labs(x = "Trump Vote Share by County")

# Just vote share
ggplot(d[!is.na(d$party_factor),],
       aes(x = per_gop, 
           y = voteconfidence, 
           fill = party_factor,
           color = party_factor)) +
  geom_smooth(method = "lm",
              fullrange = T) +
  facet_grid(~wave, labeller = as_labeller(wave_label)) +
  labs(x = "Trump Vote Share by County",
       y = "Perceived Election Legitimacy")+
  scale_fill_manual("Participant 
Partisan Identity", 
                    values = c("#1696d2","grey","#db2b27")) +
  scale_color_manual("Participant 
Partisan Identity", 
                     values = c("#1696d2","grey","#db2b27")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

# bias x positive emotions - tercs
ggplot(d[!is.na(d$party_factor),],
       aes(x = per_gop, 
           y = voteconfidence, 
           fill = party_factor,
           color = party_factor)) +
  geom_jitter(height = .3, width = .3, alpha = .2, size = .2) +
  geom_smooth(method = "lm",
              fullrange = T, se = F) +
  facet_grid(Pos_Emo_terciles~wave, labeller = as_labeller(wave_posemo_label.t)) +
  labs(x = "Trump Vote Share by County",
       y = "Perceived Election Legitimacy")+
  scale_fill_manual("Participant 
Partisan Identity", 
                    values = c("#1696d2","black","#db2b27")) +
  scale_color_manual("Participant 
Partisan Identity", 
                     values = c("#1696d2","black","#db2b27")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

# bias x negative emotions - tercs
ggplot(d[!is.na(d$party_factor),],
       aes(x = per_gop, 
           y = voteconfidence, 
           fill = party_factor,
           color = party_factor)) +
  geom_jitter(height = .3, width = .3, alpha = .2, size = .2) +
  geom_smooth(method = "lm",
              fullrange = T, se = F) +
  facet_grid(Neg_Emo_terciles~wave, labeller = as_labeller(wave_negemo_label.t)) +
  labs(x = "Trump Vote Share by County",
       y = "Perceived Election Legitimacy") +
  scale_fill_manual("Participant 
Partisan Identity", 
                    values = c("#1696d2","black","#db2b27")) +
  scale_color_manual("Participant 
Partisan Identity", 
                     values = c("#1696d2","black","#db2b27")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

#paletteer::paletteer_d("fishualize::Aluterus_scriptus")

# Party x Negative emotions x Trump vote share

ggplot(d[!is.na(d$party_factor),],
       aes(x = per_gop, 
           y = voteconfidence, 
           fill = Neg_Emo_terciles,
           color = Neg_Emo_terciles)) +
  geom_smooth(method = "lm",
              fullrange = T) +
  labs(x = "Trump Vote Share by County",
       y = "Perceived Election Legitimacy") +
    facet_wrap(~party_factor) +
    scale_fill_manual("Negative Emotions", 
                    values = c("#05DBF2FF","#035AA6FF","#011C40FF")) +
  scale_color_manual("Negative Emotions", 
                    values = c("#05DBF2FF","#035AA6FF","#011C40FF")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

#paletteer::paletteer_d("MoMAColors::Exter")

# Just positive emotions x Trump vote share

ggplot(d[!is.na(d$party_factor),],
       aes(x = per_gop, 
           y = voteconfidence, 
           fill = Pos_Emo_terciles,
           color = Pos_Emo_terciles)) +
  geom_smooth(method = "lm",
              fullrange = T) +
  labs(x = "Trump Vote Share by County",
       y = "Perceived Election Legitimacy") +
  scale_fill_manual("Positive Emotions", 
                    values = c("#FAC881FF","#E87444FF","#BF2729FF")) +
  scale_color_manual("Positive Emotions", 
                    values = c("#FAC881FF","#E87444FF","#BF2729FF")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

# Party x Positive emotions x Trump vote share

ggplot(d[!is.na(d$party_factor),],
       aes(x = per_gop, 
           y = voteconfidence, 
           fill = Pos_Emo_terciles,
           color = Pos_Emo_terciles)) +
  geom_smooth(method = "lm",
              fullrange = T) +
  facet_wrap(~party_factor) +
  labs(x = "Trump Vote Share by County",
       y = "Perceived Election Legitimacy") +
  scale_fill_manual("Positive Emotions", 
                    values = c("#FAC881FF","#E87444FF","#BF2729FF")) +
  scale_color_manual("Positive Emotions", 
                    values = c("#FAC881FF","#E87444FF","#BF2729FF")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) 

Models

Main Model

m2 <- lmer(voteconfidence ~ (pDem_Rep + pParty_Ind) * per_gop.100 * (wave.lin + wave.quad + wave.cub) * (Pos_Emo.c + Neg_Emo.c)
                  +  vs_age
                  +  vs_race
                  +  nonbinary_mf
                  +  male_female
                + (Pos_Emo.c + Neg_Emo.c|pid), 
               data = d)
tab_model(m2, show.stat = T, show.df = T, df.method = "satterthwaite")
  voteconfidence
Predictors Estimates CI Statistic p df
(Intercept) 3.29 3.02 – 3.56 24.01 <0.001 2788.35
pDem Rep -0.73 -1.06 – -0.40 -4.36 <0.001 4887.31
pParty Ind -0.34 -0.71 – 0.03 -1.82 0.068 6065.77
per gop 100 -0.34 -0.69 – 0.00 -1.95 0.052 3485.12
wave lin 0.19 -0.07 – 0.44 1.41 0.160 5356.44
wave quad -0.08 -0.27 – 0.12 -0.76 0.448 5210.29
wave cub -0.01 -0.25 – 0.23 -0.07 0.942 5105.85
Pos Emo c -0.01 -0.12 – 0.10 -0.17 0.868 2761.93
Neg Emo c -0.03 -0.14 – 0.08 -0.51 0.611 2082.69
vs age 0.00 0.00 – 0.01 3.27 0.001 2355.89
vs race [Black] -0.31 -0.42 – -0.20 -5.47 <0.001 2451.73
vs race [Hispanic] -0.07 -0.19 – 0.04 -1.20 0.230 2333.40
vs race [Other] -0.11 -0.25 – 0.03 -1.53 0.125 2338.90
nonbinary mf 0.33 -0.17 – 0.83 1.28 0.201 1576.36
male female -0.31 -0.38 – -0.24 -8.52 <0.001 2248.67
pDem Rep × per gop 100 0.50 -0.15 – 1.15 1.51 0.132 4728.28
pParty Ind × per gop 100 0.21 -0.53 – 0.95 0.56 0.575 5989.16
pDem Rep × wave lin 0.65 0.13 – 1.18 2.43 0.015 5526.69
pDem Rep × wave quad -0.13 -0.53 – 0.27 -0.64 0.521 5336.10
pDem Rep × wave cub 0.11 -0.38 – 0.60 0.45 0.651 5050.86
pParty Ind × wave lin 0.09 -0.54 – 0.72 0.29 0.771 5158.91
pParty Ind × wave quad 0.25 -0.23 – 0.74 1.02 0.308 5276.99
pParty Ind × wave cub 0.02 -0.56 – 0.61 0.08 0.936 5155.69
per gop 100 × wave lin 0.21 -0.30 – 0.73 0.81 0.416 5342.61
per gop 100 × wave quad 0.46 0.07 – 0.85 2.32 0.020 5191.42
per gop 100 × wave cub -0.15 -0.61 – 0.32 -0.62 0.538 5099.98
pDem Rep × Pos Emo c 0.33 0.14 – 0.53 3.32 0.001 2448.10
pDem Rep × Neg Emo c 0.05 -0.17 – 0.26 0.45 0.655 2398.70
pParty Ind × Pos Emo c -0.04 -0.31 – 0.23 -0.30 0.767 4333.42
pParty Ind × Neg Emo c 0.19 -0.07 – 0.46 1.42 0.155 2727.51
per gop 100 × Pos Emo c 0.41 0.19 – 0.64 3.64 <0.001 2714.81
per gop 100 × Neg Emo c -0.10 -0.32 – 0.12 -0.87 0.383 2105.38
wave lin × Pos Emo c -0.23 -0.45 – -0.01 -2.07 0.039 5222.22
wave lin × Neg Emo c -0.06 -0.28 – 0.16 -0.55 0.581 5361.55
wave quad × Pos Emo c 0.01 -0.15 – 0.18 0.13 0.894 5288.57
wave quad × Neg Emo c 0.10 -0.07 – 0.26 1.15 0.251 5117.40
wave cub × Pos Emo c -0.03 -0.23 – 0.17 -0.31 0.760 5325.31
wave cub × Neg Emo c 0.04 -0.15 – 0.24 0.44 0.657 4879.18
(pDem Rep × per gop 100)
× wave lin
0.67 -0.36 – 1.71 1.28 0.202 5540.32
(pDem Rep × per gop 100)
× wave quad
0.70 -0.08 – 1.48 1.76 0.078 5322.75
(pDem Rep × per gop 100)
× wave cub
-0.80 -1.75 – 0.15 -1.65 0.099 5037.40
(pParty Ind × per gop
100) × wave lin
-0.00 -1.26 – 1.26 -0.00 0.997 5145.05
(pParty Ind × per gop
100) × wave quad
-0.31 -1.28 – 0.65 -0.64 0.521 5250.88
(pParty Ind × per gop
100) × wave cub
-0.01 -1.16 – 1.14 -0.02 0.985 5148.05
(pDem Rep × per gop 100)
× Pos Emo c
-0.63 -1.02 – -0.24 -3.17 0.002 2430.43
(pDem Rep × per gop 100)
× Neg Emo c
-0.20 -0.63 – 0.22 -0.93 0.351 2351.15
(pParty Ind × per gop
100) × Pos Emo c
0.13 -0.41 – 0.66 0.46 0.645 4206.57
(pParty Ind × per gop
100) × Neg Emo c
-0.27 -0.80 – 0.26 -0.99 0.324 2785.07
(pDem Rep × wave lin) ×
Pos Emo c
0.34 -0.04 – 0.72 1.76 0.079 5560.13
(pDem Rep × wave lin) ×
Neg Emo c
0.24 -0.20 – 0.67 1.07 0.285 5440.35
(pDem Rep × wave quad) ×
Pos Emo c
0.03 -0.25 – 0.31 0.18 0.856 5400.60
(pDem Rep × wave quad) ×
Neg Emo c
-0.43 -0.74 – -0.11 -2.66 0.008 5237.32
(pDem Rep × wave cub) ×
Pos Emo c
-0.16 -0.49 – 0.17 -0.94 0.345 5205.82
(pDem Rep × wave cub) ×
Neg Emo c
0.02 -0.35 – 0.40 0.12 0.907 5030.03
(pParty Ind × wave lin) ×
Pos Emo c
0.06 -0.52 – 0.64 0.20 0.840 5133.73
(pParty Ind × wave lin) ×
Neg Emo c
0.19 -0.35 – 0.73 0.68 0.496 5324.69
(pParty Ind × wave quad)
× Pos Emo c
-0.26 -0.69 – 0.17 -1.17 0.242 5237.83
(pParty Ind × wave quad)
× Neg Emo c
0.22 -0.19 – 0.63 1.06 0.289 5090.25
(pParty Ind × wave cub) ×
Pos Emo c
0.25 -0.27 – 0.78 0.95 0.343 5430.00
(pParty Ind × wave cub) ×
Neg Emo c
0.11 -0.39 – 0.61 0.43 0.665 4868.24
(per gop 100 × wave lin)
× Pos Emo c
0.52 0.08 – 0.96 2.34 0.020 5211.30
(per gop 100 × wave lin)
× Neg Emo c
0.07 -0.37 – 0.51 0.29 0.772 5374.47
(per gop 100 × wave quad)
× Pos Emo c
0.05 -0.27 – 0.38 0.31 0.758 5269.03
(per gop 100 × wave quad)
× Neg Emo c
-0.24 -0.57 – 0.09 -1.43 0.152 5114.83
(per gop 100 × wave cub)
× Pos Emo c
-0.01 -0.39 – 0.38 -0.04 0.971 5304.76
(per gop 100 × wave cub)
× Neg Emo c
-0.00 -0.39 – 0.39 -0.01 0.995 4880.21
(pDem Rep × per gop 100 ×
wave lin) × Pos Emo c
-0.78 -1.54 – -0.03 -2.04 0.041 5520.23
(pDem Rep × per gop 100 ×
wave lin) × Neg Emo c
-0.05 -0.91 – 0.81 -0.11 0.912 5468.28
(pDem Rep × per gop 100 ×
wave quad) × Pos Emo c
0.06 -0.49 – 0.62 0.22 0.827 5370.51
(pDem Rep × per gop 100 ×
wave quad) × Neg Emo c
0.72 0.09 – 1.35 2.25 0.025 5261.50
(pDem Rep × per gop 100 ×
wave cub) × Pos Emo c
0.40 -0.25 – 1.05 1.20 0.232 5180.06
(pDem Rep × per gop 100 ×
wave cub) × Neg Emo c
0.03 -0.71 – 0.78 0.08 0.935 5030.77
(pParty Ind × per gop 100
× wave lin) × Pos Emo c
0.43 -0.72 – 1.58 0.73 0.462 5130.77
(pParty Ind × per gop 100
× wave lin) × Neg Emo c
-0.60 -1.70 – 0.50 -1.06 0.288 5339.04
(pParty Ind × per gop 100
× wave quad) × Pos Emo c
0.59 -0.26 – 1.44 1.36 0.174 5218.02
(pParty Ind × per gop 100
× wave quad) × Neg Emo c
-0.44 -1.26 – 0.38 -1.04 0.298 5060.91
(pParty Ind × per gop 100
× wave cub) × Pos Emo c
-0.50 -1.54 – 0.53 -0.96 0.338 5411.42
(pParty Ind × per gop 100
× wave cub) × Neg Emo c
-0.26 -1.25 – 0.72 -0.53 0.599 4856.27
Random Effects
σ2 0.42
τ00 pid 0.57
τ11 pid.Pos_Emo.c 0.05
τ11 pid.Neg_Emo.c 0.03
ρ01 -0.32
0.20
ICC 0.63
N pid 2456
Observations 7616
Marginal R2 / Conditional R2 0.190 / 0.697

Significant Effects

Main Effects

  • Dem_Rep: b = -0.73, t(4887.31) = -4.36, p < .001

2-way Interactions

  • Dem_Rep × wave lin: b = 0.65, t(5526.69) = 2.43, p = .015

  • per gop × wave quad: b = 0.46, t(5191.42) = 2.32, p = .020

  • Dem_Rep × Pos Emo: b = 0.33, t(2448.10) = 3.32, p = .001

  • per gop.100 × Pos Emo.c: b = 0.41, t(2714.81) = 3.46, p < .001

  • wave lin × Pos Emo c: b = -0.23, t(5222.22) = -2.07, p = .039

3-way Interactions

  • Dem_Rep × per gop 100 × Pos Emo c: b = -0.63, t(2430.43) = -3.17, p = .002

  • Dem_Rep × wave quad × Neg Emo c: b = -0.43, t(5237.32) = -2.66, p = .008

  • per gop 100 × wave lin × Pos Emo c: b = 0.52, t(5211.30) = 2.34, p = .020

4-way Interactions

  • Dem_Rep × per gop 100 × wave lin × Pos Emo c: b = -0.78, t(5520.23) = -2.04, p = .041

  • Dem_Rep × per gop 100 × wave quad × Neg Emo c: b = 0.72, t(5261.50) = 2.25, p = .025

i. Emotions as mediator?

m2.med1 <- lmer(voteconfidence ~ (pDem_Rep + pParty_Ind)  * (wave.lin + wave.quad + wave.cub) + per_gop.100
                  +  vs_age
                  +  vs_race
                  +  nonbinary_mf
                  +  male_female
                + (1|pid), 
               data = d)
summary(m2.med1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: voteconfidence ~ (pDem_Rep + pParty_Ind) * (wave.lin + wave.quad +  
##     wave.cub) + per_gop.100 + vs_age + vs_race + nonbinary_mf +  
##     male_female + (1 | pid)
##    Data: d
## 
## REML criterion at convergence: 20733.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.7722 -0.5091  0.0599  0.5329  3.8359 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  pid      (Intercept) 0.6552   0.8095  
##  Residual             0.5429   0.7368  
## Number of obs: 7616, groups:  pid, 2456
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)           3.184e+00  1.244e-01  2.489e+03  25.599  < 2e-16 ***
## pDem_Rep             -1.715e-01  3.908e-02  3.715e+03  -4.388 1.17e-05 ***
## pParty_Ind           -3.911e-01  4.831e-02  6.240e+03  -8.094 6.87e-16 ***
## wave.lin              1.796e-01  2.930e-02  5.618e+03   6.129 9.42e-10 ***
## wave.quad             2.365e-01  2.208e-02  5.402e+03  10.714  < 2e-16 ***
## wave.cub             -1.043e-01  2.714e-02  5.311e+03  -3.841 0.000124 ***
## per_gop.100          -5.534e-01  1.493e-01  2.405e+03  -3.707 0.000214 ***
## vs_age                6.943e-03  1.336e-03  2.413e+03   5.198 2.18e-07 ***
## vs_raceBlack         -2.330e-01  5.939e-02  2.484e+03  -3.923 8.98e-05 ***
## vs_raceHispanic      -3.995e-02  6.169e-02  2.442e+03  -0.648 0.517368    
## vs_raceOther         -1.165e-01  7.343e-02  2.385e+03  -1.586 0.112844    
## nonbinary_mf          5.295e-01  2.324e-01  2.546e+03   2.279 0.022761 *  
## male_female          -3.749e-01  3.862e-02  2.392e+03  -9.708  < 2e-16 ***
## pDem_Rep:wave.lin     1.204e+00  5.171e-02  5.581e+03  23.283  < 2e-16 ***
## pDem_Rep:wave.quad    5.337e-01  3.850e-02  5.380e+03  13.862  < 2e-16 ***
## pDem_Rep:wave.cub    -6.393e-01  4.651e-02  5.294e+03 -13.746  < 2e-16 ***
## pParty_Ind:wave.lin   3.295e-02  7.639e-02  5.687e+03   0.431 0.666230    
## pParty_Ind:wave.quad  1.441e-02  5.803e-02  5.486e+03   0.248 0.803927    
## pParty_Ind:wave.cub   8.453e-02  7.167e-02  5.384e+03   1.179 0.238281    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
m2.med2 <- lmer(voteconfidence ~ (pDem_Rep + pParty_Ind) *  (wave.lin + wave.quad + wave.cub) + Pos_Emo.c + Neg_Emo.c
                  +  vs_age
                  +  vs_race
                  +  nonbinary_mf
                  +  male_female
                + (1|pid), 
               data = d)
summary(m2.med2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: voteconfidence ~ (pDem_Rep + pParty_Ind) * (wave.lin + wave.quad +  
##     wave.cub) + Pos_Emo.c + Neg_Emo.c + vs_age + vs_race + nonbinary_mf +  
##     male_female + (1 | pid)
##    Data: d
## 
## REML criterion at convergence: 21517.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.9487 -0.5074  0.0437  0.5430  4.1273 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  pid      (Intercept) 0.6382   0.7988  
##  Residual             0.5055   0.7110  
## Number of obs: 8079, groups:  pid, 2606
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)           3.145e+00  9.653e-02  2.671e+03  32.584  < 2e-16 ***
## pDem_Rep             -4.907e-01  3.933e-02  4.795e+03 -12.478  < 2e-16 ***
## pParty_Ind           -3.173e-01  4.561e-02  6.767e+03  -6.957 3.81e-12 ***
## wave.lin              2.332e-01  2.763e-02  5.967e+03   8.442  < 2e-16 ***
## wave.quad             2.227e-01  2.065e-02  5.715e+03  10.782  < 2e-16 ***
## wave.cub             -1.120e-01  2.534e-02  5.624e+03  -4.421 1.00e-05 ***
## Pos_Emo.c             1.965e-01  1.018e-02  7.966e+03  19.305  < 2e-16 ***
## Neg_Emo.c            -8.143e-02  1.045e-02  8.006e+03  -7.794 7.31e-15 ***
## vs_age                4.379e-03  1.279e-03  2.578e+03   3.423 0.000628 ***
## vs_raceBlack         -3.562e-01  5.703e-02  2.678e+03  -6.246 4.89e-10 ***
## vs_raceHispanic      -1.070e-01  5.915e-02  2.615e+03  -1.808 0.070679 .  
## vs_raceOther         -9.140e-02  7.089e-02  2.527e+03  -1.289 0.197424    
## nonbinary_mf          2.763e-01  2.210e-01  2.668e+03   1.250 0.211293    
## male_female          -3.598e-01  3.682e-02  2.541e+03  -9.772  < 2e-16 ***
## pDem_Rep:wave.lin     8.654e-01  5.106e-02  6.124e+03  16.949  < 2e-16 ***
## pDem_Rep:wave.quad    3.079e-01  3.760e-02  5.892e+03   8.191 3.15e-16 ***
## pDem_Rep:wave.cub    -4.228e-01  4.482e-02  5.744e+03  -9.435  < 2e-16 ***
## pParty_Ind:wave.lin   4.353e-02  7.172e-02  6.026e+03   0.607 0.543899    
## pParty_Ind:wave.quad  1.641e-03  5.418e-02  5.798e+03   0.030 0.975843    
## pParty_Ind:wave.cub   8.134e-02  6.669e-02  5.691e+03   1.220 0.222631    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
m2.med3 <- lmer(voteconfidence ~ (pDem_Rep + pParty_Ind)  * (wave.lin + wave.quad + wave.cub) + per_gop.100 + Pos_Emo.c + Neg_Emo.c
                  +  vs_age
                  +  vs_race
                  +  nonbinary_mf
                  +  male_female
                + (1|pid), 
               data = d)
summary(m2.med3)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: voteconfidence ~ (pDem_Rep + pParty_Ind) * (wave.lin + wave.quad +  
##     wave.cub) + per_gop.100 + Pos_Emo.c + Neg_Emo.c + vs_age +  
##     vs_race + nonbinary_mf + male_female + (1 | pid)
##    Data: d
## 
## REML criterion at convergence: 20241.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.9994 -0.5124  0.0451  0.5427  4.1405 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  pid      (Intercept) 0.6348   0.7967  
##  Residual             0.5023   0.7087  
## Number of obs: 7616, groups:  pid, 2456
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)           3.448e+00  1.223e-01  2.511e+03  28.183  < 2e-16 ***
## pDem_Rep             -4.599e-01  4.062e-02  4.540e+03 -11.322  < 2e-16 ***
## pParty_Ind           -3.135e-01  4.711e-02  6.390e+03  -6.656 3.06e-11 ***
## wave.lin              2.430e-01  2.835e-02  5.612e+03   8.571  < 2e-16 ***
## wave.quad             2.225e-01  2.127e-02  5.390e+03  10.459  < 2e-16 ***
## wave.cub             -1.197e-01  2.615e-02  5.301e+03  -4.575 4.87e-06 ***
## per_gop.100          -6.178e-01  1.462e-01  2.399e+03  -4.225 2.48e-05 ***
## Pos_Emo.c             1.963e-01  1.041e-02  7.496e+03  18.851  < 2e-16 ***
## Neg_Emo.c            -8.058e-02  1.076e-02  7.541e+03  -7.492 7.54e-14 ***
## vs_age                4.407e-03  1.313e-03  2.429e+03   3.358 0.000798 ***
## vs_raceBlack         -3.723e-01  5.847e-02  2.529e+03  -6.366 2.29e-10 ***
## vs_raceHispanic      -1.215e-01  6.053e-02  2.448e+03  -2.008 0.044806 *  
## vs_raceOther         -1.179e-01  7.192e-02  2.378e+03  -1.639 0.101367    
## nonbinary_mf          3.181e-01  2.277e-01  2.541e+03   1.397 0.162419    
## male_female          -3.536e-01  3.786e-02  2.391e+03  -9.339  < 2e-16 ***
## pDem_Rep:wave.lin     8.683e-01  5.231e-02  5.765e+03  16.599  < 2e-16 ***
## pDem_Rep:wave.quad    2.953e-01  3.853e-02  5.550e+03   7.663 2.14e-14 ***
## pDem_Rep:wave.cub    -4.216e-01  4.592e-02  5.411e+03  -9.182  < 2e-16 ***
## pParty_Ind:wave.lin   7.038e-02  7.355e-02  5.661e+03   0.957 0.338666    
## pParty_Ind:wave.quad  1.479e-03  5.586e-02  5.465e+03   0.026 0.978874    
## pParty_Ind:wave.cub   6.001e-02  6.897e-02  5.365e+03   0.870 0.384286    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

No evidence of mediation (with emotions entered as mediator for effect of geographic partisan norms).

c. Media vs. Geography Comparison

PEL.m.normplot <- lmer(voteconfidence ~ party_factor * pollbias.z * wave * per_gop 
                   + pollAcc 
                   + pollFreq.c 
                   + vs_age 
                   + nonbinary_mf
                   + male_female
                   + vs_race
                   + (1|pid), 
               data = d)

ggplot(d[!is.na(d$party_factor),],
       aes(x = per_gop, 
                  y = voteconfidence, 
                  fill = party_factor,
                  color = party_factor)) +
  geom_smooth(method = "lm",
              fullrange = T) +
  facet_grid(~wave, labeller = as_labeller(wave_label)) +
  labs(x = "Percentage of County voting for Donald Trump",
       y = "Perceived Election Legitimacy") +
  scale_fill_manual("Participant
Partisan Identity", 
                    values = c("#1696d2","grey","#db2b27")) +
  scale_color_manual("Participant
Partisan Identity", 
                     values = c("#1696d2","grey","#db2b27")) +
  theme_bw() +
  coord_cartesian(ylim = c(1,5)) +
  scale_x_continuous(breaks = seq(from = 0, to = 90, length.out = 7))

PEL.m.normplot <- lmer(voteconfidence ~ party_factor * pollbias.z * wave * per_gop +  
    pollAcc + pollFreq.c + vs_age + nonbinary_mf + male_female +  
    vs_race + (1 | pid),
    data = d)

interactions::interact_plot(PEL.m.normplot, 
                            pred = per_gop, 
                            modx = pollbias.z,
                            mod2 = party_factor,
                            x.label = "% of County Voted for Trump",
                            y.label = "Perceived Election Legitimacy",
                            legend.main = "Polling Bias",
                            modx.labels = c("Left-Lean",
                                            "Neutral",
                                            "Right-Lean"),
                            mod2.labels = c("Democrats",
                                            "Independents",
                                            "Republicans"))

Summary

With both media bias and geographic social norms entered as moderators in a model predicting perceived election legitimacy (PEL) WITH emotions entered as a moderator too–Trump vote share retained significance, but media bias lost significance. Further, media bias was not involved in any higher level interactions.

Trump vote share was a significant negative predictor of PEL (b = -0.52, 95% CI = [-0.97, -0.08], t(2496.92) = -2.30, p = .021). Trump vote share was involved in several higher order interactions, including a 3-way interaction with partisan identity (Democratic vs. Republican; b = -0.78, 95% CI = [-0.97, -0.08], t(2410.96) = -3.15, p = .002), and two 4-way interactions. One 4-way interaction was with positive emotions, linear time, and partisan identity (Democratic vs. Republican; b = -1.22, 95% CI = [-2.23, -0.20], t(4196.73) = -2.35, p = .019) and one was with negative emotions, quadratic time, and partisan identity (Democratic vs. Republican; b = 0.98, 95% CI = [0.18, 1.77], t(4082.22) = 2.41, p = .016).

Models

Main Model

m3 <- lmer(voteconfidence ~ (pDem_Rep + pParty_Ind) * pollbias.z * per_gop.100 * (wave.lin + wave.quad + wave.cub) * (Pos_Emo.c + Neg_Emo.c)
                   + pollAcc 
                   + pollFreq.c 
                   + vs_age 
                   + nonbinary_mf
                   + male_female
                   + vs_race
                   + (Pos_Emo.c | pid), 
               data = d)
tab_model(m3, show.stat = T, show.df = T, df.method = "satterthwaite")
  voteconfidence
Predictors Estimates CI Statistic p df
(Intercept) 3.26 2.92 – 3.60 18.78 <0.001 1790.08
pDem Rep -0.63 -1.02 – -0.23 -3.08 0.002 3028.52
pParty Ind -0.07 -0.57 – 0.42 -0.29 0.772 4399.59
pollbias z -0.61 -1.31 – 0.08 -1.73 0.084 2811.28
per gop 100 -0.52 -0.97 – -0.08 -2.30 0.021 2496.92
wave lin 0.10 -0.23 – 0.44 0.61 0.541 3962.31
wave quad -0.10 -0.36 – 0.15 -0.79 0.431 3789.14
wave cub 0.18 -0.14 – 0.49 1.09 0.278 3886.80
Pos Emo c 0.08 -0.07 – 0.23 1.06 0.287 3212.86
Neg Emo c 0.06 -0.09 – 0.22 0.81 0.417 5232.15
pollAcc 0.06 0.04 – 0.08 5.89 <0.001 4895.08
pollFreq c -0.01 -0.03 – 0.01 -1.44 0.149 1525.56
vs age 0.00 0.00 – 0.01 2.75 0.006 1586.50
nonbinary mf 0.88 0.21 – 1.55 2.59 0.010 1018.14
male female -0.29 -0.38 – -0.21 -7.03 <0.001 1495.15
vs race [Black] -0.32 -0.44 – -0.19 -4.97 <0.001 1631.72
vs race [Hispanic] -0.10 -0.23 – 0.03 -1.51 0.130 1520.02
vs race [Other] -0.15 -0.31 – 0.01 -1.81 0.071 1574.67
pDem Rep × pollbias z -0.32 -1.49 – 0.86 -0.53 0.594 3068.86
pParty Ind × pollbias z -0.07 -1.65 – 1.50 -0.09 0.928 4769.05
pDem Rep × per gop 100 0.58 -0.21 – 1.37 1.45 0.148 2909.38
pParty Ind × per gop 100 -0.23 -1.23 – 0.76 -0.46 0.645 4373.04
pollbias z × per gop 100 0.09 -1.29 – 1.48 0.13 0.896 2824.99
pDem Rep × wave lin 0.38 -0.26 – 1.01 1.16 0.244 4072.35
pDem Rep × wave quad -0.24 -0.72 – 0.24 -0.99 0.321 3939.16
pDem Rep × wave cub 0.06 -0.52 – 0.64 0.20 0.845 3785.87
pParty Ind × wave lin 0.29 -0.56 – 1.14 0.67 0.504 3888.46
pParty Ind × wave quad 0.32 -0.33 – 0.96 0.96 0.339 3819.53
pParty Ind × wave cub 0.40 -0.43 – 1.22 0.95 0.345 3956.57
pollbias z × wave lin 0.24 -0.87 – 1.35 0.42 0.675 4037.85
pollbias z × wave quad 0.15 -0.67 – 0.97 0.37 0.713 3831.47
pollbias z × wave cub -0.28 -1.29 – 0.74 -0.54 0.591 3886.69
per gop 100 × wave lin 0.34 -0.33 – 1.02 0.99 0.320 3935.89
per gop 100 × wave quad 0.39 -0.12 – 0.90 1.50 0.133 3779.56
per gop 100 × wave cub -0.46 -1.09 – 0.17 -1.43 0.152 3862.71
pDem Rep × Pos Emo c 0.40 0.16 – 0.65 3.22 0.001 2429.39
pDem Rep × Neg Emo c 0.07 -0.18 – 0.31 0.54 0.591 5077.47
pParty Ind × Pos Emo c 0.20 -0.17 – 0.57 1.05 0.292 4349.92
pParty Ind × Neg Emo c 0.45 0.05 – 0.84 2.20 0.028 5174.77
pollbias z × Pos Emo c -0.20 -0.68 – 0.27 -0.84 0.403 3497.14
pollbias z × Neg Emo c -0.09 -0.59 – 0.41 -0.35 0.724 5240.46
per gop 100 × Pos Emo c 0.30 -0.00 – 0.59 1.93 0.054 3217.42
per gop 100 × Neg Emo c -0.26 -0.57 – 0.05 -1.63 0.102 5208.92
wave lin × Pos Emo c -0.21 -0.53 – 0.10 -1.33 0.185 4128.49
wave lin × Neg Emo c 0.16 -0.16 – 0.48 0.96 0.338 4117.93
wave quad × Pos Emo c 0.11 -0.12 – 0.34 0.94 0.348 4047.22
wave quad × Neg Emo c 0.05 -0.19 – 0.28 0.39 0.698 3894.29
wave cub × Pos Emo c -0.06 -0.33 – 0.22 -0.39 0.694 4068.19
wave cub × Neg Emo c -0.01 -0.30 – 0.27 -0.10 0.919 3810.44
(pDem Rep × pollbias z) ×
per gop 100
1.04 -1.29 – 3.38 0.88 0.380 2979.50
(pParty Ind × pollbias z)
× per gop 100
-0.36 -3.54 – 2.82 -0.22 0.826 4749.22
(pDem Rep × pollbias z) ×
wave lin
0.34 -1.57 – 2.25 0.34 0.730 4095.35
(pDem Rep × pollbias z) ×
wave quad
0.31 -1.13 – 1.75 0.42 0.674 3967.66
(pDem Rep × pollbias z) ×
wave cub
-1.02 -2.75 – 0.71 -1.16 0.247 3837.99
(pParty Ind × pollbias z)
× wave lin
-0.16 -3.05 – 2.73 -0.11 0.915 4004.90
(pParty Ind × pollbias z)
× wave quad
-1.51 -3.67 – 0.64 -1.37 0.170 3867.15
(pParty Ind × pollbias z)
× wave cub
0.12 -2.58 – 2.83 0.09 0.930 3961.53
(pDem Rep × per gop 100)
× wave lin
1.08 -0.16 – 2.31 1.71 0.087 4065.35
(pDem Rep × per gop 100)
× wave quad
0.80 -0.13 – 1.73 1.68 0.093 3919.15
(pDem Rep × per gop 100)
× wave cub
-0.71 -1.83 – 0.42 -1.23 0.218 3759.65
(pParty Ind × per gop
100) × wave lin
-0.38 -2.11 – 1.36 -0.42 0.672 3853.85
(pParty Ind × per gop
100) × wave quad
-0.63 -1.94 – 0.68 -0.95 0.345 3806.34
(pParty Ind × per gop
100) × wave cub
-0.61 -2.25 – 1.03 -0.73 0.468 3935.10
(pollbias z × per gop
100) × wave lin
0.05 -2.21 – 2.31 0.04 0.966 3999.39
(pollbias z × per gop
100) × wave quad
0.02 -1.63 – 1.67 0.03 0.979 3794.74
(pollbias z × per gop
100) × wave cub
0.66 -1.35 – 2.67 0.64 0.522 3862.75
(pDem Rep × pollbias z) ×
Pos Emo c
-0.21 -0.92 – 0.51 -0.57 0.568 2433.69
(pDem Rep × pollbias z) ×
Neg Emo c
-0.07 -0.79 – 0.65 -0.18 0.853 5085.06
(pParty Ind × pollbias z)
× Pos Emo c
0.03 -1.19 – 1.26 0.06 0.956 4303.91
(pParty Ind × pollbias z)
× Neg Emo c
0.35 -0.99 – 1.69 0.52 0.605 5226.75
(pDem Rep × per gop 100)
× Pos Emo c
-0.78 -1.27 – -0.29 -3.15 0.002 2410.96
(pDem Rep × per gop 100)
× Neg Emo c
-0.24 -0.73 – 0.25 -0.97 0.330 5114.77
(pParty Ind × per gop
100) × Pos Emo c
-0.34 -1.08 – 0.40 -0.89 0.373 4290.31
(pParty Ind × per gop
100) × Neg Emo c
-0.79 -1.61 – 0.02 -1.91 0.057 5139.02
(pollbias z × per gop
100) × Pos Emo c
0.62 -0.35 – 1.59 1.25 0.211 3572.53
(pollbias z × per gop
100) × Neg Emo c
0.14 -0.89 – 1.17 0.27 0.787 5235.34
(pDem Rep × wave lin) ×
Pos Emo c
0.55 0.04 – 1.06 2.11 0.035 4201.83
(pDem Rep × wave lin) ×
Neg Emo c
0.02 -0.52 – 0.57 0.09 0.929 4230.89
(pDem Rep × wave quad) ×
Pos Emo c
0.09 -0.29 – 0.47 0.47 0.637 4167.13
(pDem Rep × wave quad) ×
Neg Emo c
-0.52 -0.92 – -0.12 -2.53 0.011 4069.86
(pDem Rep × wave cub) ×
Pos Emo c
-0.09 -0.52 – 0.35 -0.38 0.702 3979.08
(pDem Rep × wave cub) ×
Neg Emo c
0.00 -0.47 – 0.47 0.00 0.998 3955.14
(pParty Ind × wave lin) ×
Pos Emo c
0.21 -0.62 – 1.05 0.50 0.618 4147.38
(pParty Ind × wave lin) ×
Neg Emo c
1.01 0.17 – 1.85 2.35 0.019 4077.51
(pParty Ind × wave quad)
× Pos Emo c
-0.06 -0.67 – 0.54 -0.20 0.840 4004.29
(pParty Ind × wave quad)
× Neg Emo c
0.10 -0.52 – 0.72 0.32 0.749 3852.43
(pParty Ind × wave cub) ×
Pos Emo c
0.05 -0.69 – 0.80 0.14 0.890 4194.54
(pParty Ind × wave cub) ×
Neg Emo c
-0.09 -0.85 – 0.66 -0.24 0.811 3830.39
(pollbias z × wave lin) ×
Pos Emo c
-0.40 -1.49 – 0.69 -0.72 0.474 4199.62
(pollbias z × wave lin) ×
Neg Emo c
0.07 -0.96 – 1.10 0.13 0.895 4138.47
(pollbias z × wave quad)
× Pos Emo c
0.48 -0.29 – 1.24 1.23 0.220 4080.99
(pollbias z × wave quad)
× Neg Emo c
0.66 -0.09 – 1.42 1.72 0.085 3908.38
(pollbias z × wave cub) ×
Pos Emo c
-0.47 -1.33 – 0.40 -1.06 0.291 4129.45
(pollbias z × wave cub) ×
Neg Emo c
0.46 -0.45 – 1.36 0.99 0.321 3806.22
(per gop 100 × wave lin)
× Pos Emo c
0.50 -0.14 – 1.15 1.53 0.125 4099.45
(per gop 100 × wave lin)
× Neg Emo c
-0.36 -1.02 – 0.30 -1.07 0.284 4114.44
(per gop 100 × wave quad)
× Pos Emo c
-0.17 -0.64 – 0.29 -0.73 0.466 4021.12
(per gop 100 × wave quad)
× Neg Emo c
-0.18 -0.66 – 0.30 -0.72 0.469 3873.86
(per gop 100 × wave cub)
× Pos Emo c
0.04 -0.50 – 0.58 0.14 0.885 4052.77
(per gop 100 × wave cub)
× Neg Emo c
0.05 -0.52 – 0.62 0.16 0.870 3799.82
(pDem Rep × pollbias z ×
per gop 100) × wave lin
-0.28 -4.07 – 3.51 -0.14 0.886 4090.61
(pDem Rep × pollbias z ×
per gop 100) × wave quad
-0.05 -2.88 – 2.77 -0.04 0.972 3944.92
(pDem Rep × pollbias z ×
per gop 100) × wave cub
2.06 -1.33 – 5.44 1.19 0.233 3823.22
(pParty Ind × pollbias z
× per gop 100) × wave lin
0.67 -5.27 – 6.60 0.22 0.825 3953.93
(pParty Ind × pollbias z
× per gop 100) × wave
quad
3.13 -1.22 – 7.48 1.41 0.158 3822.65
(pParty Ind × pollbias z
× per gop 100) × wave cub
-0.04 -5.41 – 5.34 -0.01 0.989 3937.04
(pDem Rep × pollbias z ×
per gop 100) × Pos Emo c
0.07 -1.36 – 1.49 0.09 0.928 2428.90
(pDem Rep × pollbias z ×
per gop 100) × Neg Emo c
0.03 -1.41 – 1.48 0.05 0.963 5103.01
(pParty Ind × pollbias z
× per gop 100) × Pos Emo
c
-0.03 -2.55 – 2.48 -0.03 0.978 4333.33
(pParty Ind × pollbias z
× per gop 100) × Neg Emo
c
-0.95 -3.71 – 1.82 -0.67 0.502 5199.35
(pDem Rep × pollbias z ×
wave lin) × Pos Emo c
0.18 -1.35 – 1.70 0.23 0.819 4187.26
(pDem Rep × pollbias z ×
wave lin) × Neg Emo c
-0.10 -1.73 – 1.53 -0.12 0.903 4213.22
(pDem Rep × pollbias z ×
wave quad) × Pos Emo c
0.18 -0.94 – 1.30 0.32 0.750 4197.21
(pDem Rep × pollbias z ×
wave quad) × Neg Emo c
0.69 -0.50 – 1.89 1.14 0.256 4147.84
(pDem Rep × pollbias z ×
wave cub) × Pos Emo c
0.06 -1.21 – 1.34 0.10 0.921 4009.74
(pDem Rep × pollbias z ×
wave cub) × Neg Emo c
-0.00 -1.39 – 1.38 -0.01 0.996 4041.22
(pParty Ind × pollbias z
× wave lin) × Pos Emo c
0.11 -2.91 – 3.13 0.07 0.944 4221.90
(pParty Ind × pollbias z
× wave lin) × Neg Emo c
0.42 -2.34 – 3.19 0.30 0.763 4101.13
(pParty Ind × pollbias z
× wave quad) × Pos Emo c
0.49 -1.58 – 2.56 0.46 0.644 4042.94
(pParty Ind × pollbias z
× wave quad) × Neg Emo c
0.70 -1.32 – 2.72 0.68 0.496 3866.24
(pParty Ind × pollbias z
× wave cub) × Pos Emo c
-1.29 -3.69 – 1.11 -1.06 0.291 4220.14
(pParty Ind × pollbias z
× wave cub) × Neg Emo c
1.71 -0.74 – 4.17 1.37 0.171 3806.09
(pDem Rep × per gop 100 ×
wave lin) × Pos Emo c
-1.22 -2.23 – -0.20 -2.35 0.019 4196.73
(pDem Rep × per gop 100 ×
wave lin) × Neg Emo c
0.23 -0.86 – 1.31 0.41 0.681 4228.13
(pDem Rep × per gop 100 ×
wave quad) × Pos Emo c
0.00 -0.75 – 0.75 0.00 0.999 4144.55
(pDem Rep × per gop 100 ×
wave quad) × Neg Emo c
0.98 0.18 – 1.77 2.41 0.016 4082.22
(pDem Rep × per gop 100 ×
wave cub) × Pos Emo c
0.36 -0.50 – 1.22 0.82 0.411 3951.93
(pDem Rep × per gop 100 ×
wave cub) × Neg Emo c
0.03 -0.90 – 0.95 0.05 0.957 3932.71
(pParty Ind × per gop 100
× wave lin) × Pos Emo c
0.12 -1.62 – 1.85 0.13 0.895 4115.37
(pParty Ind × per gop 100
× wave lin) × Neg Emo c
-2.29 -4.05 – -0.54 -2.56 0.010 4081.65
(pParty Ind × per gop 100
× wave quad) × Pos Emo c
0.12 -1.12 – 1.35 0.18 0.854 3988.58
(pParty Ind × per gop 100
× wave quad) × Neg Emo c
-0.36 -1.63 – 0.90 -0.56 0.576 3825.99
(pParty Ind × per gop 100
× wave cub) × Pos Emo c
-0.16 -1.64 – 1.33 -0.21 0.837 4166.66
(pParty Ind × per gop 100
× wave cub) × Neg Emo c
0.16 -1.38 – 1.69 0.20 0.840 3816.65
(pollbias z × per gop 100
× wave lin) × Pos Emo c
0.79 -1.48 – 3.06 0.68 0.494 4183.06
(pollbias z × per gop 100
× wave lin) × Neg Emo c
0.01 -2.15 – 2.17 0.01 0.993 4120.59
(pollbias z × per gop 100
× wave quad) × Pos Emo c
-0.81 -2.38 – 0.75 -1.02 0.309 4049.99
(pollbias z × per gop 100
× wave quad) × Neg Emo c
-1.50 -3.05 – 0.06 -1.89 0.059 3879.46
(pollbias z × per gop 100
× wave cub) × Pos Emo c
0.69 -1.06 – 2.43 0.77 0.441 4104.22
(pollbias z × per gop 100
× wave cub) × Neg Emo c
-1.02 -2.87 – 0.82 -1.09 0.277 3786.00
(pDem Rep × pollbias z ×
per gop 100 × wave lin) ×
Pos Emo c
-0.96 -4.01 – 2.10 -0.61 0.539 4188.43
(pDem Rep × pollbias z ×
per gop 100 × wave lin) ×
Neg Emo c
-0.14 -3.43 – 3.15 -0.08 0.933 4204.44
(pDem Rep × pollbias z ×
per gop 100 × wave quad)
× Pos Emo c
-0.33 -2.56 – 1.90 -0.29 0.771 4174.77
(pDem Rep × pollbias z ×
per gop 100 × wave quad)
× Neg Emo c
-1.11 -3.50 – 1.29 -0.90 0.366 4144.06
(pDem Rep × pollbias z ×
per gop 100 × wave cub) ×
Pos Emo c
0.13 -2.39 – 2.65 0.10 0.917 3988.97
(pDem Rep × pollbias z ×
per gop 100 × wave cub) ×
Neg Emo c
0.63 -2.11 – 3.38 0.45 0.652 4032.75
(pParty Ind × pollbias z
× per gop 100 × wave lin)
× Pos Emo c
-1.02 -7.33 – 5.28 -0.32 0.750 4196.68
(pParty Ind × pollbias z
× per gop 100 × wave lin)
× Neg Emo c
-0.85 -6.68 – 4.97 -0.29 0.774 4082.56
(pParty Ind × pollbias z
× per gop 100 × wave
quad) × Pos Emo c
-0.11 -4.39 – 4.16 -0.05 0.958 4023.23
(pParty Ind × pollbias z
× per gop 100 × wave
quad) × Neg Emo c
-1.90 -6.09 – 2.28 -0.89 0.373 3833.12
(pParty Ind × pollbias z
× per gop 100 × wave cub)
× Pos Emo c
2.30 -2.54 – 7.15 0.93 0.351 4181.93
(pParty Ind × pollbias z
× per gop 100 × wave cub)
× Neg Emo c
-4.16 -9.21 – 0.88 -1.62 0.106 3779.25
Random Effects
σ2 0.43
τ00 pid 0.51
τ11 pid.Pos_Emo.c 0.04
ρ01 pid -0.51
ICC 0.58
N pid 1578
Observations 5428
Marginal R2 / Conditional R2 0.225 / 0.671

Significant Effects

Main Effects

  • pDem Rep: b = -0.63, t(3028.52) = -3.08, p = .002

  • per gop: b = -0.52, t(2496.92) = -2.30, p = .021

2-way interactions

  • pDem Rep × Pos Emo c: b = 0.40, t(2429.39) = 3.22, p = .001

3-way interactions

  • pDem Rep × per gop 100 × Pos Emo c: b = -0.78, t(2410.96) = -3.15, p = .002

  • pDem Rep × wave lin × Pos Emo c: b = 0.55, t(4201.83) = 2.11, p = .035

  • pDem Rep × wave quad × Neg Emo c: b = -0.52, t(4069.86) = -2.53, p = .011

  • pDem Rep × wave quad × Neg Emo c: b = -0.52, t(4069.86) = -2.53, p = .011

4-way interactions

  • pDem Rep × per gop 100 × wave lin × Pos Emo c: b = -1.22, t(4196.73) = -2.35, p = .019

  • pDem Rep × per gop 100 × wave quad × Neg Emo c: b = 0.98, t(4082.22) = 2.41, p = .016