1 wrangling

1.1 General Wrangling

## wrangling initial
mint_11 <- read_sav("/Users/harshitraj/Desktop/R Work harshit/mint_round11.sav")
#code from round 11(1)
mint_11 <- mint_11 %>% 
  clean_names() %>% 
  mutate(p_party_new = case_when(p_party == 1 ~ 1,
                                 p_party == 2 ~ 2,
                                 !p_party %in% c(98, 99) ~ 3,
                                 T ~ 4),
         p_party_new = labelled(p_party_new, c("BJP" = 1,
                                               "INC" = 2,
                                               "Others" = 3,
                                               "Non-Identifier" = 4)),
         religion_in_new = case_when(religion_in == 4 ~ 1,
                                     religion_in == 2 ~ 2,
                                     religion_in == 3 ~ 3,
                                     !religion_in %in% c(1, 99) ~ 4,
                                     T ~ 5),
         religion_in_new = labelled(religion_in_new, c("Hindu" = 1,
                                                       "Muslim" = 2,
                                                       "Christian" = 3,
                                                       "Others" = 4,
                                                       "Undisclosed/Irreligious" = 5)),
         caste_in_new = case_when(caste_in == 1 ~ 1,
                                  caste_in == 2 ~ 2,
                                  caste_in == 3 ~ 3,
                                  caste_in == 4 ~ 4,
                                  T ~ 5),
         caste_in_new = labelled(caste_in_new, c("General" = 1,
                                                 "OBC" = 2,
                                                 "SC" = 3,
                                                 "ST" = 4,
                                                 "Undisclosed/Not-Applicable" = 5)),
         q_p_party_1_new = replace_na(q_p_party_1, 0),
         q_p_party_2_new = replace_na(q_p_party_2, 0),
         q_p_party_3_new = replace_na(q_p_party_3, 0),
         q_p_party_4_new = replace_na(q_p_party_4, 0),
         
         partisan_index = (q_p_party_1_new + q_p_party_2_new + 
                             q_p_party_3_new + q_p_party_4_new)/4,
         partisan_index_np = case_when(partisan_index!= 0 & partisan_index <= 2 ~ 4,
                                       partisan_index > 2 & partisan_index <= 3 ~ 3,
                                       partisan_index==0 ~ 1,
                                       
                                       T ~ 2),
         partisan_index_np = labelled(partisan_index_np, c("Strong Partisan" = 4,
                                                           "Moderate Partisan" = 3,
                                                           "Weak Partisan" = 2,
                                                           "No Partisan"= 1)),
         
         partisan_index = case_when(partisan_index!= 0 & partisan_index <= 2 ~ 1,
                                    partisan_index > 2 & partisan_index <= 3 ~ 2,
                                    
                                    T ~ 3),
         partisan_index = labelled(partisan_index, c("Strong Partisan" = 1,
                                                     "Moderate Partisan" = 2,
                                                     "Weak Partisan" = 3)),
         
         age_cb_new = case_when(birthyear <= 1980 ~ 1,
                                birthyear >= 1997 ~ 3,
                                T ~ 2),
         age_cb_new = labelled(age_cb_new, c("Pre-Millennials" = 1,
                                             "Millennials" = 2,
                                             "Post-Millennials" = 3)),
         sec_in_new = case_when(new_sec_in == 12 ~ 1,
                                new_sec_in == 11 ~ 2,
                                T ~ 3),
         sec_in_new = labelled(sec_in_new, c("High SEC" = 1,
                                             "Middle SEC" = 2,
                                             "Low SEC" = 3)),
         p_alliance = case_when(p_party %in% c(2,4,5,6,7,8,9,14) ~ 1,
                                p_party %in% c(1,15) ~ 2,
                                T ~ 3),
         p_alliance = labelled(p_alliance, c("I.N.D.I.A" = 1,
                                             "NDA" = 2,
                                             "Non-Allied" = 3)),
         p_alliance_old = case_when(p_party %in% c(2,4,5,6,7,8,9,14) ~ 1,
                                    p_party %in% c(1,15) ~ 2,
                                    p_party %in% c(98,99) ~ 4,
                                    T ~ 3),
         p_alliance_old = labelled(p_alliance_old, c("I.N.D.I.A" = 1,
                                                     "NDA" = 2,
                                                     "Non-Allied" = 3,
                                                     "Non-Identifier" = 4)))










## joining a new distnce calculated csv

mint11_df <- read.csv("~/Desktop/R Work harshit/mint11_df.csv", header=TRUE)
mint11_df_1<-mint_11 %>% left_join(mint11_df, by="caseid")




## NEW REGRESSION analysis wrangling 
glimpse(mint11_df_1$p_party_new)
##  dbl+lbl [1:12544] 3, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 3, 1, 3, 2, 1, 2, 3, 1,...
##  @ labels: Named num [1:4] 1 2 3 4
##   ..- attr(*, "names")= chr [1:4] "BJP" "INC" "Others" "Non-Identifier"
mint11_df_1 <- mint11_df_1 %>% clean_names()  %>% 
  mutate(p_party_new_1 = case_when(p_party == 1 ~ 1,
                                   p_party == 2 ~ 2,
                                   T ~ 3),
         p_party_new_1 = labelled(p_party_new_1, c("BJP" = 1,
                                                   "INC" = 2,
                                                   "Others" = 3
         )),
         religion_in_new = case_when(religion_in == 4 ~ 1,
                                     religion_in == 2 ~ 2,
                                     
                                     T ~ 3),
         religion_in_new = labelled(religion_in_new, c("Hindu" = 1,
                                                       "Muslim" = 2,
                                                       "others" = 3
         )),
         caste_in_new = case_when(caste_in == 1 ~ 1,
                                  caste_in == 2 ~ 2,
                                  caste_in == 3 ~ 3,
                                  caste_in == 4 ~ 4,
                                  T ~ 5),
         caste_in_new = labelled(caste_in_new, c("General" = 1,
                                                 "OBC" = 2,
                                                 "SC" = 3,
                                                 "ST" = 4,
                                                 "Undisclosed/Not-Applicable" = 5)),
         
         
         partisan_index_1 = (q_p_party_1+ q_p_party_2 + 
                               q_p_party_3 + q_p_party_4)/4,
         
         age_cb_new = labelled(age_cb_new, c("Pre-Millennials" = 1,
                                             "Millennials" = 2,
                                             "Post-Millennials" = 3)),
         sec_in_new = case_when(new_sec_in == 12 ~ 1,
                                new_sec_in == 11 ~ 2,
                                T ~ 3),
         sec_in_new = labelled(sec_in_new, c("High SEC" = 1,
                                             "Middle SEC" = 2,
                                             "Low SEC" = 3)),
         p_alliance = case_when(p_party %in% c(2,4,5,6,7,8,9,14) ~ 1,
                                p_party %in% c(1,15) ~ 2,
                                T ~ 3),
         p_alliance = labelled(p_alliance, c("I.N.D.I.A" = 1,
                                             "NDA" = 2,
                                             "Non-Allied" = 3)),
         p_alliance_old = case_when(p_party %in% c(2,4,5,6,7,8,9,14) ~ 1,
                                    p_party %in% c(1,15) ~ 2,
                                    p_party %in% c(98,99) ~ 4,
                                    T ~ 3),
         p_alliance_old = labelled(p_alliance_old, c("I.N.D.I.A" = 1,
                                                     "NDA" = 2,
                                                     "Non-Allied" = 3,
                                                     "Non-Identifier" = 4)),
         geo_region_in_cb_new = case_when(geo_region_in_cb%in%c(1,4)~ 1,
                                          
                                          T~2),
         geo_region_in_cb_new=labelled(geo_region_in_cb_new, c("NW" = 1,
                                                               "SE" = 2)),
         geo_citytier_in=case_when(geo_citytier_in==1~1,
                                   TRUE~2),
         geo_citytier_in=labelled(geo_citytier_in, c("Tier-1" = 1,
                                                     "Rest_Tiers"=2)),
         bordering=case_when(geo_state_in_y%in%c("Rajasthan","Gujrat","Punjab","Jammu & Kashmir","Laddakh")~1,
                             TRUE~2),
         hub_dist_1=hub_dist/1000,
         hub_dist_2=log(hub_dist_1),
         birthyear1=2024-birthyear)

2 Variables coding

Gender- Male and Female

Education

Not applicable: Illiterate- 1
Literate but no formal schooling/School up to 4 years- 2
Schooling between 5–9 years- 3
High School pass (SSC/HSC)- 4
Diploma or college certificate but not a graduate- 5
Graduate or Post Graduate General (B.A., M. A., B Com, BSC etc.)- 6 Graduate or Post Graduate Professional (MBA, MD, PhD etc.)-7

age

age= 2024-Birth Year

Caste

General = 1, OBC = 2, SC = 3, ST = 4, Undisclosed/Not-Applicable = 5

Party

BJP= 1 INC = 2 Others= 3

religion

Hindu = 1 Muslim = 2 others = 3

Distance

log(Distance/1000)

Partisan Index

Strong Partisan = 4, Moderate Partisan = 3,
Weak Partisan = 2
No Partisan= 1

3 wrangling regression

# q9 israel hamas
## Israel Hamas blame wrangling


mint11_df_1<-mint11_df_1 %>% mutate(q9=ifelse(q9 ==2, 0, q9))
mint11_df_1<-mint11_df_1 %>% mutate(p_party_new_1 = as.factor(p_party_new_1)) %>%
  
  mutate(geo_region_in_cb_new=as.factor(geo_region_in_cb_new)) %>%
  
  mutate(religion_in_new=as.factor(religion_in_new)) %>%
  mutate(geo_region_in_cb=as.factor(geo_region_in_cb)) %>% 
  mutate(geo_citytier_in=as.factor(geo_citytier_in))



mint11_df_1 <- mint11_df_1 %>%
  mutate(p_party_new_1 = fct_relevel(p_party_new_1, "2", after = 2),
         p_party_new_1 = fct_relevel(p_party_new_1, "3", after = 0),
         
         
         religion_in_new= fct_relevel(religion_in_new, "3", after = 0),
         religion_in_new=fct_relevel(religion_in_new, "2", after = 2))

4 Support For Nuclear

#q10 regression
## q10 wrangling
mint11_df_1<-mint11_df_1 %>% mutate(q10=ifelse(q10 ==2, 0, q10))

## new_q10_1 DV <- age + partisanship + party.

base_new_model_q10_1 <-mint11_df_1 %>%  glm(q10 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_2, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q10_1)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.341150  1        1.158080
## birthyear1        1.008124  1        1.004054
## p_party_new_1     1.599940  2        1.124672
## religion_in_new   1.216770  2        1.050273
## hub_dist_2        1.028003  1        1.013905
names(base_new_model_q10_1$coefficients) <-  c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance")

summary(base_new_model_q10_1)
## 
## Call:
## glm(formula = q10 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_2, family = binomial, data = ., 
##     weights = weight)
## 
## Coefficients:
##                 Estimate Std. Error z value Pr(>|z|)    
## intercept      -1.475693   0.091866 -16.063  < 2e-16 ***
## Partisan_Index  0.339867   0.021286  15.966  < 2e-16 ***
## age            -0.010509   0.001851  -5.679 1.36e-08 ***
## BJP             0.140532   0.052366   2.684  0.00728 ** 
## INC            -0.155617   0.075516  -2.061  0.03933 *  
## Hindu           0.361696   0.057624   6.277 3.46e-10 ***
## Muslim         -0.346405   0.083962  -4.126 3.70e-05 ***
## distance       -0.105507   0.026892  -3.923 8.73e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 14700  on 11161  degrees of freedom
## Residual deviance: 13968  on 11154  degrees of freedom
##   (1382 observations deleted due to missingness)
## AIC: 13888
## 
## Number of Fisher Scoring iterations: 4
summ(model =base_new_model_q10_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 11162 (1382 missing obs. deleted)
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(7) 732.20
Pseudo-R² (Cragg-Uhler) 0.09
Pseudo-R² (McFadden) 0.05
AIC 13887.99
BIC 13946.55
exp(Est.) 2.5% 97.5% z val. p
intercept 0.23 0.19 0.27 -16.06 0.00
Partisan_Index 1.40 1.35 1.46 15.97 0.00
age 0.99 0.99 0.99 -5.68 0.00
BJP 1.15 1.04 1.28 2.68 0.01
INC 0.86 0.74 0.99 -2.06 0.04
Hindu 1.44 1.28 1.61 6.28 0.00
Muslim 0.71 0.60 0.83 -4.13 0.00
distance 0.90 0.85 0.95 -3.92 0.00
Standard errors: MLE
##new model 10_2
base_new_model_q10_2 <-mint11_df_1 %>%  glm(q10 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_2+education_india, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q10_2)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.342000  1        1.158447
## birthyear1        1.034105  1        1.016909
## p_party_new_1     1.602290  2        1.125085
## religion_in_new   1.222759  2        1.051563
## hub_dist_2        1.028067  1        1.013936
## education_india   1.035664  1        1.017676
names(base_new_model_q10_2$coefficients) <-  c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance","Education")

summary(base_new_model_q10_2)
## 
## Call:
## glm(formula = q10 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_2 + education_india, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                 Estimate Std. Error z value Pr(>|z|)    
## intercept      -1.313525   0.144174  -9.111  < 2e-16 ***
## Partisan_Index  0.338990   0.021295  15.919  < 2e-16 ***
## age            -0.010076   0.001873  -5.381 7.42e-08 ***
## BJP             0.142998   0.052401   2.729  0.00635 ** 
## INC            -0.152360   0.075551  -2.017  0.04373 *  
## Hindu           0.364590   0.057667   6.322 2.58e-10 ***
## Muslim         -0.350552   0.084015  -4.173 3.01e-05 ***
## distance       -0.105790   0.026894  -3.934 8.37e-05 ***
## Education      -0.029914   0.020538  -1.456  0.14525    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 14700  on 11161  degrees of freedom
## Residual deviance: 13965  on 11153  degrees of freedom
##   (1382 observations deleted due to missingness)
## AIC: 13888
## 
## Number of Fisher Scoring iterations: 4
summ(model =base_new_model_q10_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 11162 (1382 missing obs. deleted)
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 734.32
Pseudo-R² (Cragg-Uhler) 0.09
Pseudo-R² (McFadden) 0.05
AIC 13888.38
BIC 13954.27
exp(Est.) 2.5% 97.5% z val. p
intercept 0.27 0.20 0.36 -9.11 0.00
Partisan_Index 1.40 1.35 1.46 15.92 0.00
age 0.99 0.99 0.99 -5.38 0.00
BJP 1.15 1.04 1.28 2.73 0.01
INC 0.86 0.74 1.00 -2.02 0.04
Hindu 1.44 1.29 1.61 6.32 0.00
Muslim 0.70 0.60 0.83 -4.17 0.00
distance 0.90 0.85 0.95 -3.93 0.00
Education 0.97 0.93 1.01 -1.46 0.15
Standard errors: MLE
## new model 10_3
base_new_model_q10_3 <-mint11_df_1 %>%  glm(q10 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_2+education_india+caste_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q10_3)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.343099  1        1.158921
## birthyear1        1.048806  1        1.024112
## p_party_new_1     1.616956  2        1.127651
## religion_in_new   1.242948  2        1.055877
## hub_dist_2        1.037236  1        1.018448
## education_india   1.039539  1        1.019578
## caste_in_new      1.082535  1        1.040450
names(base_new_model_q10_3$coefficients) <-  c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance","Education","Caste")

summary(base_new_model_q10_3)
## 
## Call:
## glm(formula = q10 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_2 + education_india + caste_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                 Estimate Std. Error z value Pr(>|z|)    
## intercept      -1.253656   0.156082  -8.032 9.58e-16 ***
## Partisan_Index  0.338236   0.021306  15.875  < 2e-16 ***
## age            -0.010298   0.001886  -5.460 4.75e-08 ***
## BJP             0.138027   0.052634   2.622 0.008731 ** 
## INC            -0.153932   0.075561  -2.037 0.041630 *  
## Hindu           0.357456   0.058107   6.152 7.67e-10 ***
## Muslim         -0.358665   0.084412  -4.249 2.15e-05 ***
## distance       -0.103246   0.027019  -3.821 0.000133 ***
## Education      -0.031156   0.020578  -1.514 0.130011    
## Caste          -0.018855   0.018896  -0.998 0.318357    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 14700  on 11161  degrees of freedom
## Residual deviance: 13964  on 11152  degrees of freedom
##   (1382 observations deleted due to missingness)
## AIC: 13889
## 
## Number of Fisher Scoring iterations: 4
summ(model =base_new_model_q10_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 11162 (1382 missing obs. deleted)
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 735.32
Pseudo-R² (Cragg-Uhler) 0.09
Pseudo-R² (McFadden) 0.05
AIC 13889.49
BIC 13962.70
exp(Est.) 2.5% 97.5% z val. p
intercept 0.29 0.21 0.39 -8.03 0.00
Partisan_Index 1.40 1.35 1.46 15.87 0.00
age 0.99 0.99 0.99 -5.46 0.00
BJP 1.15 1.04 1.27 2.62 0.01
INC 0.86 0.74 0.99 -2.04 0.04
Hindu 1.43 1.28 1.60 6.15 0.00
Muslim 0.70 0.59 0.82 -4.25 0.00
distance 0.90 0.86 0.95 -3.82 0.00
Education 0.97 0.93 1.01 -1.51 0.13
Caste 0.98 0.95 1.02 -1.00 0.32
Standard errors: MLE
## new model 10_4


base_new_model_q10_4 <-mint11_df_1 %>%  glm(q10 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_2+education_india+caste_in_new+gender, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q10_4)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.347284  1        1.160725
## birthyear1        1.049081  1        1.024247
## p_party_new_1     1.619922  2        1.128167
## religion_in_new   1.243693  2        1.056035
## hub_dist_2        1.037261  1        1.018460
## education_india   1.043523  1        1.021530
## caste_in_new      1.083498  1        1.040912
## gender            1.014136  1        1.007043
names(base_new_model_q10_4$coefficients) <-  c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance","Education","Caste","gender")

summary(base_new_model_q10_4)
## 
## Call:
## glm(formula = q10 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_2 + education_india + caste_in_new + 
##     gender, family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                 Estimate Std. Error z value Pr(>|z|)    
## intercept      -1.052233   0.167260  -6.291 3.15e-10 ***
## Partisan_Index  0.334023   0.021347  15.647  < 2e-16 ***
## age            -0.010339   0.001885  -5.486 4.12e-08 ***
## BJP             0.132093   0.052688   2.507 0.012174 *  
## INC            -0.150500   0.075636  -1.990 0.046614 *  
## Hindu           0.352557   0.058149   6.063 1.34e-09 ***
## Muslim         -0.364342   0.084481  -4.313 1.61e-05 ***
## distance       -0.101626   0.027029  -3.760 0.000170 ***
## Education      -0.026986   0.020624  -1.308 0.190710    
## Caste          -0.020746   0.018921  -1.096 0.272877    
## gender         -0.136311   0.040853  -3.337 0.000848 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 14700  on 11161  degrees of freedom
## Residual deviance: 13953  on 11151  degrees of freedom
##   (1382 observations deleted due to missingness)
## AIC: 13880
## 
## Number of Fisher Scoring iterations: 4
summ(model =base_new_model_q10_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 11162 (1382 missing obs. deleted)
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(10) 746.45
Pseudo-R² (Cragg-Uhler) 0.09
Pseudo-R² (McFadden) 0.05
AIC 13879.68
BIC 13960.21
exp(Est.) 2.5% 97.5% z val. p
intercept 0.35 0.25 0.48 -6.29 0.00
Partisan_Index 1.40 1.34 1.46 15.65 0.00
age 0.99 0.99 0.99 -5.49 0.00
BJP 1.14 1.03 1.27 2.51 0.01
INC 0.86 0.74 1.00 -1.99 0.05
Hindu 1.42 1.27 1.59 6.06 0.00
Muslim 0.69 0.59 0.82 -4.31 0.00
distance 0.90 0.86 0.95 -3.76 0.00
Education 0.97 0.93 1.01 -1.31 0.19
Caste 0.98 0.94 1.02 -1.10 0.27
gender 0.87 0.81 0.95 -3.34 0.00
Standard errors: MLE

5 Support For Nuclear Combined

base_combined_new10_1<- stargazer(base_new_model_q10_1,base_new_model_q10_2,base_new_model_q10_3,base_new_model_q10_4, title = "Results: Support For Use Of Nuclear", align = TRUE, type = "text",
                             dep.var.caption = "Dependent Variable: Support For Use Of Nuclear",column.labels = c("Model 1", "Model 2","Model 3","Model 4"),
                             dep.var.labels.include = FALSE,
                             font.size = "normalsize")
## 
## Results: Support For Use Of Nuclear
## ===================================================================
##                    Dependent Variable: Support For Use Of Nuclear  
##                   -------------------------------------------------
##                     Model 1      Model 2      Model 3     Model 4  
##                       (1)          (2)          (3)         (4)    
## -------------------------------------------------------------------
## intercept          -1.476***    -1.314***    -1.254***   -1.052*** 
##                     (0.092)      (0.144)      (0.156)     (0.167)  
##                                                                    
## Partisan_Index      0.340***     0.339***    0.338***    0.334***  
##                     (0.021)      (0.021)      (0.021)     (0.021)  
##                                                                    
## age                -0.011***    -0.010***    -0.010***   -0.010*** 
##                     (0.002)      (0.002)      (0.002)     (0.002)  
##                                                                    
## BJP                 0.141***     0.143***    0.138***     0.132**  
##                     (0.052)      (0.052)      (0.053)     (0.053)  
##                                                                    
## INC                 -0.156**     -0.152**    -0.154**    -0.150**  
##                     (0.076)      (0.076)      (0.076)     (0.076)  
##                                                                    
## Hindu               0.362***     0.365***    0.357***    0.353***  
##                     (0.058)      (0.058)      (0.058)     (0.058)  
##                                                                    
## Muslim             -0.346***    -0.351***    -0.359***   -0.364*** 
##                     (0.084)      (0.084)      (0.084)     (0.084)  
##                                                                    
## distance           -0.106***    -0.106***    -0.103***   -0.102*** 
##                     (0.027)      (0.027)      (0.027)     (0.027)  
##                                                                    
## Education                         -0.030      -0.031      -0.027   
##                                  (0.021)      (0.021)     (0.021)  
##                                                                    
## Caste                                         -0.019      -0.021   
##                                               (0.019)     (0.019)  
##                                                                    
## gender                                                   -0.136*** 
##                                                           (0.041)  
##                                                                    
## -------------------------------------------------------------------
## Observations         11,162       11,162      11,162      11,162   
## Log Likelihood     -6,935.993   -6,935.192  -6,934.746  -6,928.842 
## Akaike Inf. Crit.  13,887.990   13,888.380  13,889.490  13,879.680 
## ===================================================================
## Note:                                   *p<0.1; **p<0.05; ***p<0.01

6 Support For Nuclear if 50% Chances

# question 11a

mint11_df_9<-mint11_df_1 %>%filter(!is.na(q11a)) %>%mutate(q11a_1=ifelse(q11a ==2, 0, q11a))



## new_q11a_1 

base_new_model_q11a_1 <-mint11_df_9 %>%  glm(q11a_1 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_2, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q11a_1)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.374288  1        1.172300
## birthyear1        1.001477  1        1.000738
## p_party_new_1     1.629914  2        1.129903
## religion_in_new   1.208302  2        1.048441
## hub_dist_2        1.023008  1        1.011438
names(base_new_model_q11a_1$coefficients) <-   c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance")

summary(base_new_model_q11a_1)
## 
## Call:
## glm(formula = q11a_1 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_2, family = binomial, data = ., 
##     weights = weight)
## 
## Coefficients:
##                 Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.565754   0.159381  -3.550 0.000386 ***
## Partisan_Index  0.205801   0.035174   5.851 4.89e-09 ***
## age             0.018397   0.003250   5.661 1.51e-08 ***
## BJP             0.063397   0.086191   0.736 0.462005    
## INC             0.093252   0.131101   0.711 0.476896    
## Hindu          -0.075727   0.098807  -0.766 0.443431    
## Muslim         -0.446862   0.147565  -3.028 0.002460 ** 
## distance       -0.009121   0.045550  -0.200 0.841284    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5438.5  on 4162  degrees of freedom
## Residual deviance: 5338.3  on 4155  degrees of freedom
##   (418 observations deleted due to missingness)
## AIC: 5220.6
## 
## Number of Fisher Scoring iterations: 4
summ(model = base_new_model_q11a_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4163 (418 missing obs. deleted)
Dependent variable q11a_1
Type Generalized linear model
Family binomial
Link logit
𝛘²(7) 100.18
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5220.57
BIC 5271.24
exp(Est.) 2.5% 97.5% z val. p
intercept 0.57 0.42 0.78 -3.55 0.00
Partisan_Index 1.23 1.15 1.32 5.85 0.00
age 1.02 1.01 1.03 5.66 0.00
BJP 1.07 0.90 1.26 0.74 0.46
INC 1.10 0.85 1.42 0.71 0.48
Hindu 0.93 0.76 1.13 -0.77 0.44
Muslim 0.64 0.48 0.85 -3.03 0.00
distance 0.99 0.91 1.08 -0.20 0.84
Standard errors: MLE
## new_q11a_2
base_new_model_q11a_2 <-mint11_df_9 %>%  glm(q11a_1 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_2+education_india, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q11a_2)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.375932  1        1.173001
## birthyear1        1.029277  1        1.014533
## p_party_new_1     1.636593  2        1.131059
## religion_in_new   1.211286  2        1.049087
## hub_dist_2        1.022923  1        1.011396
## education_india   1.036924  1        1.018295
names(base_new_model_q11a_2$coefficients) <-  c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance","Education")

summary(base_new_model_q11a_2)
## 
## Call:
## glm(formula = q11a_1 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_2 + education_india, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                 Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.720805   0.234998  -3.067  0.00216 ** 
## Partisan_Index  0.206917   0.035201   5.878 4.15e-09 ***
## age             0.017909   0.003290   5.444 5.21e-08 ***
## BJP             0.058697   0.086358   0.680  0.49670    
## INC             0.088266   0.131226   0.673  0.50119    
## Hindu          -0.077988   0.098853  -0.789  0.43016    
## Muslim         -0.443829   0.147633  -3.006  0.00264 ** 
## distance       -0.009173   0.045532  -0.201  0.84033    
## Education       0.029122   0.032424   0.898  0.36910    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5438.5  on 4162  degrees of freedom
## Residual deviance: 5337.5  on 4154  degrees of freedom
##   (418 observations deleted due to missingness)
## AIC: 5221.5
## 
## Number of Fisher Scoring iterations: 4
summ(model =base_new_model_q11a_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4163 (418 missing obs. deleted)
Dependent variable q11a_1
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 100.98
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5221.50
BIC 5278.51
exp(Est.) 2.5% 97.5% z val. p
intercept 0.49 0.31 0.77 -3.07 0.00
Partisan_Index 1.23 1.15 1.32 5.88 0.00
age 1.02 1.01 1.02 5.44 0.00
BJP 1.06 0.90 1.26 0.68 0.50
INC 1.09 0.84 1.41 0.67 0.50
Hindu 0.92 0.76 1.12 -0.79 0.43
Muslim 0.64 0.48 0.86 -3.01 0.00
distance 0.99 0.91 1.08 -0.20 0.84
Education 1.03 0.97 1.10 0.90 0.37
Standard errors: MLE
# new_q11a_3
base_new_model_q11a_3 <-mint11_df_9 %>%  glm(q11a_1 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_1+education_india+caste_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q11a_3)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.377576  1        1.173702
## birthyear1        1.041200  1        1.020392
## p_party_new_1     1.658080  2        1.134753
## religion_in_new   1.229537  2        1.053017
## hub_dist_1        1.043088  1        1.021317
## education_india   1.042537  1        1.021047
## caste_in_new      1.067362  1        1.033132
names(base_new_model_q11a_3$coefficients) <-  c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance","Education","Caste")

summary(base_new_model_q11a_3)
## 
## Call:
## glm(formula = q11a_1 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_1 + education_india + caste_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.61088    0.26055  -2.345  0.01905 *  
## Partisan_Index  0.20701    0.03523   5.876 4.20e-09 ***
## age             0.01780    0.00331   5.378 7.53e-08 ***
## BJP             0.04570    0.08684   0.526  0.59870    
## INC             0.08889    0.13125   0.677  0.49823    
## Hindu          -0.08548    0.09961  -0.858  0.39077    
## Muslim         -0.44937    0.14824  -3.031  0.00243 ** 
## distance       -0.07046    0.06309  -1.117  0.26406    
## Education       0.02757    0.03253   0.847  0.39675    
## Caste          -0.01058    0.03104  -0.341  0.73315    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5438.5  on 4162  degrees of freedom
## Residual deviance: 5336.1  on 4153  degrees of freedom
##   (418 observations deleted due to missingness)
## AIC: 5221.1
## 
## Number of Fisher Scoring iterations: 4
summ(model =base_new_model_q11a_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4163 (418 missing obs. deleted)
Dependent variable q11a_1
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 102.39
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5221.05
BIC 5284.39
exp(Est.) 2.5% 97.5% z val. p
intercept 0.54 0.33 0.90 -2.34 0.02
Partisan_Index 1.23 1.15 1.32 5.88 0.00
age 1.02 1.01 1.02 5.38 0.00
BJP 1.05 0.88 1.24 0.53 0.60
INC 1.09 0.85 1.41 0.68 0.50
Hindu 0.92 0.76 1.12 -0.86 0.39
Muslim 0.64 0.48 0.85 -3.03 0.00
distance 0.93 0.82 1.05 -1.12 0.26
Education 1.03 0.96 1.10 0.85 0.40
Caste 0.99 0.93 1.05 -0.34 0.73
Standard errors: MLE
## new model q11a_4
base_new_model_q11a_4 <-mint11_df_9 %>%  glm(q11a_1 ~ partisan_index_np+birthyear1+p_party_new_1+religion_in_new+hub_dist_2+education_india+caste_in_new+gender, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
vif(base_new_model_q11a_4)
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index_np 1.378173  1        1.173956
## birthyear1        1.040930  1        1.020260
## p_party_new_1     1.645548  2        1.132603
## religion_in_new   1.229198  2        1.052944
## hub_dist_2        1.032506  1        1.016123
## education_india   1.045576  1        1.022534
## caste_in_new      1.068629  1        1.033745
## gender            1.013159  1        1.006558
names(base_new_model_q11a_4$coefficients) <-  c("intercept","Partisan_Index","age","BJP","INC","Hindu","Muslim","distance","Education","Caste","Gender")

summary(base_new_model_q11a_4)
## 
## Call:
## glm(formula = q11a_1 ~ partisan_index_np + birthyear1 + p_party_new_1 + 
##     religion_in_new + hub_dist_2 + education_india + caste_in_new + 
##     gender, family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                 Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.269394   0.270007  -0.998  0.31841    
## Partisan_Index  0.197421   0.035341   5.586 2.32e-08 ***
## age             0.018198   0.003328   5.468 4.54e-08 ***
## BJP             0.051817   0.086712   0.598  0.55013    
## INC             0.111077   0.131645   0.844  0.39880    
## Hindu          -0.081417   0.099831  -0.816  0.41476    
## Muslim         -0.446319   0.148725  -3.001  0.00269 ** 
## distance       -0.004751   0.045838  -0.104  0.91745    
## Education       0.037491   0.032611   1.150  0.25030    
## Caste          -0.016593   0.031100  -0.534  0.59366    
## Gender         -0.304207   0.066240  -4.592 4.38e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5438.5  on 4162  degrees of freedom
## Residual deviance: 5316.2  on 4152  degrees of freedom
##   (418 observations deleted due to missingness)
## AIC: 5203.1
## 
## Number of Fisher Scoring iterations: 4
summ(model =base_new_model_q11a_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4163 (418 missing obs. deleted)
Dependent variable q11a_1
Type Generalized linear model
Family binomial
Link logit
𝛘²(10) 122.27
Pseudo-R² (Cragg-Uhler) 0.04
Pseudo-R² (McFadden) 0.02
AIC 5203.06
BIC 5272.74
exp(Est.) 2.5% 97.5% z val. p
intercept 0.76 0.45 1.30 -1.00 0.32
Partisan_Index 1.22 1.14 1.31 5.59 0.00
age 1.02 1.01 1.03 5.47 0.00
BJP 1.05 0.89 1.25 0.60 0.55
INC 1.12 0.86 1.45 0.84 0.40
Hindu 0.92 0.76 1.12 -0.82 0.41
Muslim 0.64 0.48 0.86 -3.00 0.00
distance 1.00 0.91 1.09 -0.10 0.92
Education 1.04 0.97 1.11 1.15 0.25
Caste 0.98 0.93 1.05 -0.53 0.59
Gender 0.74 0.65 0.84 -4.59 0.00
Standard errors: MLE

7 Combined If 50 %

base_combined_new11_1<- stargazer(base_new_model_q11a_1,base_new_model_q11a_2,base_new_model_q11a_3,base_new_model_q11a_4, title = "Results: Support For Use Of Nuclear If 50%", align = TRUE, type = "text",
                                  dep.var.caption = "Dependent Variable: Support For Use Of Nuclear If 50%",column.labels = c("Model 1", "Model 2","Model 3","Model 4"),
                                  dep.var.labels.include = FALSE,
                                  font.size = "normalsize")
## 
## Results: Support For Use Of Nuclear If 50%
## ==========================================================================
##                    Dependent Variable: Support For Use Of Nuclear If 50%  
##                   --------------------------------------------------------
##                      Model 1        Model 2       Model 3       Model 4   
##                        (1)            (2)           (3)           (4)     
## --------------------------------------------------------------------------
## intercept           -0.566***      -0.721***     -0.611**       -0.269    
##                      (0.159)        (0.235)       (0.261)       (0.270)   
##                                                                           
## Partisan_Index       0.206***      0.207***      0.207***      0.197***   
##                      (0.035)        (0.035)       (0.035)       (0.035)   
##                                                                           
## age                  0.018***      0.018***      0.018***      0.018***   
##                      (0.003)        (0.003)       (0.003)       (0.003)   
##                                                                           
## BJP                   0.063          0.059         0.046         0.052    
##                      (0.086)        (0.086)       (0.087)       (0.087)   
##                                                                           
## INC                   0.093          0.088         0.089         0.111    
##                      (0.131)        (0.131)       (0.131)       (0.132)   
##                                                                           
## Hindu                 -0.076        -0.078        -0.085        -0.081    
##                      (0.099)        (0.099)       (0.100)       (0.100)   
##                                                                           
## Muslim              -0.447***      -0.444***     -0.449***     -0.446***  
##                      (0.148)        (0.148)       (0.148)       (0.149)   
##                                                                           
## distance              -0.009        -0.009        -0.070        -0.005    
##                      (0.046)        (0.046)       (0.063)       (0.046)   
##                                                                           
## Education                            0.029         0.028         0.037    
##                                     (0.032)       (0.033)       (0.033)   
##                                                                           
## Caste                                             -0.011        -0.017    
##                                                   (0.031)       (0.031)   
##                                                                           
## Gender                                                         -0.304***  
##                                                                 (0.066)   
##                                                                           
## --------------------------------------------------------------------------
## Observations          4,163          4,163         4,163         4,163    
## Log Likelihood      -2,602.285    -2,601.751    -2,600.527    -2,590.532  
## Akaike Inf. Crit.   5,220.570      5,221.502     5,221.054     5,203.064  
## ==========================================================================
## Note:                                          *p<0.1; **p<0.05; ***p<0.01