Data and initial set-up

Load the following libraries

library(tidyverse)
library(simcf)
library(MASS)
library(car)
library(stargazer)
library(ordinal)
library(magrittr)

Read clean and pre-coded datasets (CMPS, ANES and LNS)

cmps <- readRDS("cmps_clean.rds")
anes <- readRDS("anes_clean.rds")
cmps08 <- readRDS("cmps08_clean.rds")
lns <- readRDS("lns_clean.rds")

Main models and figures

Models

Mode1 1: Logistic regression to estimate Support for trump

model_support_trump <- 
  glm(support_trump ~ 
        central_id_nat_origin*mexican +   
        generation  + cuban + light_skin +               
        linked_fate + liberal_scale + pol_interest +  
        age + female + low_inc + med_inc + 
        miss_inc+  college,  
      family = "binomial", data = cmps)

Mode1 2: Ordered logit regression to estimate trump favorability

trump_favor_form <-
trump_favor_f ~ 
        central_id_nat_origin*mexican +   
        generation  + cuban + light_skin +               
        linked_fate + liberal_scale + pol_interest +  
        age + female + low_inc + med_inc + 
        miss_inc+  college

model_favor_trump <- clm(trump_favor_form, data = cmps)

Table formatting

tab.labs <- c("National Origin ID","Mexican", "Generation",
              "Cuban", "Light Skin Color",
              "Linked Fate ", "Liberal Scale", "Political Interest",
              "Age", "Female", "Low-Income", "Medium-Income",  
              "Missing-Income", "College", "National ID X Mexican")

Table 3 The Effect of National Origin Heritage and Identity Centrality

stargazer(model_support_trump, model_favor_trump, 
          dep.var.labels = c("Vote for Trump  -", "Trump Favorability"),
          covariate.labels =  tab.labs, 
          model.numbers = F,
          no.space = T,
          star.cutoffs = c(0.05, 0.01, 0.001), header = F, type ="html")
Dependent variable:
Vote for Trump - Trump Favorability
logistic cumulative
link
National Origin ID -0.019 -0.140*
(0.080) (0.063)
Mexican 0.627 0.544
(0.370) (0.291)
Generation 0.328*** 0.099
(0.070) (0.053)
Cuban 1.039*** 0.859***
(0.202) (0.163)
Light Skin Color -0.128 -0.018
(0.155) (0.121)
Linked Fate -0.355*** -0.287***
(0.049) (0.037)
Liberal Scale -0.907*** -0.755***
(0.056) (0.042)
Political Interest 0.350*** 0.216***
(0.062) (0.047)
Age -0.006 -0.004
(0.004) (0.003)
Female -0.356** -0.277**
(0.110) (0.086)
Low-Income -0.193 -0.048
(0.153) (0.120)
Medium-Income 0.040 -0.076
(0.161) (0.128)
Missing-Income -0.408 -0.385*
(0.234) (0.178)
College -0.053 -0.267**
(0.120) (0.094)
National ID X Mexican -0.318** -0.236**
(0.113) (0.088)
Constant 1.560***
(0.439)
Observations 2,994 2,909
Log Likelihood -1,197.759 -2,770.376
Akaike Inf. Crit. 2,427.517
Note: p<0.05; p<0.01; p<0.001

Predicted probabilities for figures

Hypothetical scenarios for each level of country of origin identification and country of Origin (Mexican/Non Mexican)

xhyp <- 
  cmps %$% 
  expand.grid(
    central_id_nat_origin = c(1,4), 
    mexican = c(0,1),
    linked_fate = mean(linked_fate, na.rm = T),
    age = mean(age, na.rm = T),
    college = mean(college, na.rm = T), 
    low_inc = mean(low_inc, na.rm = T),
    med_inc = mean(med_inc, na.rm = T), 
    miss_inc = mean(miss_inc, na.rm = T),  
    generation = mean(generation, na.rm = T), 
    female = mean(female, na.rm = T), 
    liberal_scale = mean(liberal_scale, na.rm = T),
    light_skin = mean(light_skin, na.rm = T), 
    cuban= mean(cuban, na.rm = T),
    pol_interest = mean(pol_interest, na.rm = T))

Predicted Probabilities

pred_support <- cbind(predict(model_support_trump, xhyp, 
                              se.fit = T, type = "response"), xhyp)
pred_favor <- cbind(predict(model_favor_trump, xhyp, 
                            se.fit = T), xhyp)

Fig. 1: Predicted Probability of Voting for Trump given Identity Strength and National Origin Heritage

ggplot(pred_support, aes(x = factor(central_id_nat_origin), 
                       y = fit,
                       ymin = fit - (se.fit*1.96),
                       ymax = fit + (se.fit*1.96),
                       color = factor(mexican),
                       shape = factor(mexican))) +  
  geom_pointrange(size =1, position = position_dodge(width =.5)) + 
  scale_color_brewer(palette= "Dark2", labels=c("Non-Mexican", "Mexican")) +
  scale_shape_discrete(labels=c("Non-Mexican", "Mexican")) +
  scale_x_discrete(labels = c("Weak Heritage ID", "Strong Heritage ID")) +
  labs(y = "(Pr) Trump Vote", x = "", 
       color = "Heritage", shape = "Heritage") +
  theme_bw() 

Fig. 2 Predicted Probability of Strongly Unfavorable attitudes toward Trump given Identity Strength and National Origin Heritage

ggplot(pred_favor, aes(x = factor(central_id_nat_origin), 
                       y = fit.0,
                       ymin = fit.0 - (se.fit.0*1.96),
                       ymax = fit.0 + (se.fit.0*1.96),
                       color = factor(mexican),
                       shape = factor(mexican))) +  
  geom_pointrange(size =1, position = position_dodge(width =.5)) + 
  scale_color_brewer(palette= "Dark2", labels=c("Non-Mexican", "Mexican")) +
  scale_shape_discrete(labels=c("Non-Mexican", "Mexican")) +
  scale_x_discrete(labels = c("Weak Heritage ID", "Strong Heritage ID")) +
  labs(y = "(Pr) 'Very Unfavorable' View of Trump", x = "", 
       color = "Heritage", shape = "Heritage") +
  theme_bw()

Additional models prior to 2016

Models

Models for Romney 2012 (ANES), McCain 2008 (CMPS-2008), Bush 2006 (LNS)

model_romney_fav <- 
  lm(romney_therm ~ 
       central_id*mexican + cuban + born_us + 
       party_id + college + age + income, 
     data = anes)

model_mccain_support <- 
  glm(support_mccain ~       
        lf*mexican + cuban + born_us + 
        party_id + college + 
        age + income, 
      family = binomial(link = 'logit'), 
      data = cmps08)

model_bush_fav <- 
  clm(favor_bush_f ~ 
        nat_origin_identity*mexican + cuban + born_us + 
        party_id + college + age + income, 
      data =  lns)
Predicted probabilities for figures

Hypothetical scenarios for each candidate

xhyp_romney <- 
  anes %$% 
  expand.grid(
    central_id = c(1,5),
    mexican = c(0,1), 
    cuban = mean(cuban, na.rm = T),
    age = mean(age, na.rm = T), 
    income = mean(income, na.rm = T), 
    born_us = mean(born_us, na.rm = T),
    party_id = mean(party_id, na.rm = T), 
    college = mean(college, na.rm = T))


xhyp_mccain <- 
  cmps08 %$% 
  expand.grid(
    lf = c(0,3),
    mexican = c(0,1), 
    cuban = mean(cuban, na.rm = T),
    age = mean(age, na.rm = T), 
    college = mean(college, na.rm = T), 
    income = mean(income, na.rm = T), 
    born_us = mean(born_us, na.rm = T),
    party_id = mean(party_id, na.rm = T), 
    college = mean(college, na.rm = T))

xhyp_bush <- 
  lns %$% 
  expand.grid(
    nat_origin_identity = c(1,4),
    mexican = c(0,1), 
    cuban = mean(cuban, na.rm = T),
    age = mean(age, na.rm = T), 
    college = mean(college, na.rm = T), 
    income = mean(income, na.rm = T), 
    born_us = mean(born_us, na.rm = T),
    party_id = mean(party_id, na.rm = T), 
    college = mean(college, na.rm = T))

Predicted Probabilities

pred_romney <- 
  cbind(
    predict(model_romney_fav, 
            xhyp_romney, se.fit = T, type = "response"), 
    xhyp_romney)

pred_mccain <- 
  cbind(
    predict(model_mccain_support, 
            xhyp_mccain, se.fit = T, 
            type = "response"), 
    xhyp_mccain)

pred_bush <- cbind(
  predict(model_bush_fav,
          xhyp_bush, se.fit = T), 
  xhyp_bush)

Fig. 3 Predicted Feeling Thermometer Mitt Romney in 2012

 ggplot(pred_romney, aes(x = factor(central_id), y = fit, 
                         ymin = fit - (se.fit*1.96),
                         ymax = fit + (se.fit*1.96),
                         color = factor(mexican),
                         shape = factor(mexican))) +  
  geom_pointrange(size =1, position = position_dodge(width =.5)) + 
  scale_color_brewer(palette= "Dark2", labels=c("Non-Mexican", "Mexican")) +
  scale_shape_discrete(labels=c("Non-Mexican", "Mexican")) +
  scale_x_discrete(labels = c("Weak Latino ID", "Strong Latino ID")) +
  labs(y = "Predicted Feeling Therm Romney", x = "", 
       color = "Heritage", shape = "Heritage") +
  theme_bw() 

Fig. 4 Predicted Support John McCain 2008

ggplot(pred_mccain, aes(x = factor(lf), y = fit,
                       ymin = fit - (se.fit*1.96),
                       ymax = fit + (se.fit*1.96),
                       color = factor(mexican),
                       shape = factor(mexican))) +  
  geom_pointrange(size =1, position = position_dodge(width =.5)) + 
  scale_color_brewer(palette= "Dark2", labels=c("Non-Mexican", "Mexican")) +
  scale_shape_discrete(labels=c("Non-Mexican", "Mexican")) +
  scale_x_discrete(labels = c("Weak Latino ID", "Strong Latino ID")) +
  labs(y = "(Pr) Vote for McCain", x = "", 
       color = "Heritage", shape = "Heritage") +
  theme_bw()

Fig. 5 Predicted Support for President Bush in 2006

ggplot(pred_bush, aes(x = factor(nat_origin_identity), y = fit.1,
                       ymin = fit.1 - (se.fit.1*1.96),
                       ymax = fit.1 + (se.fit.1*1.96),
                       color = factor(mexican),
                       shape = factor(mexican))) +  
  geom_pointrange(size =1, position = position_dodge(width =.5)) + 
  scale_color_brewer(palette= "Dark2", labels=c("Non-Mexican", "Mexican")) +
  scale_shape_discrete(labels=c("Non-Mexican", "Mexican")) +
  scale_x_discrete(labels = c("Weak Heritage ID", "Strong Heritage ID")) +
  labs(y = "(Pr) 'Very Unfavorable' View of Bush", x = "", 
       color = "Heritage", shape = "Heritage") +
  theme_bw()