# library and wrangling
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.4.4     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(haven)
library(labelled)
library(janitor)
## 
## Attaching package: 'janitor'
## 
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test
library(openxlsx)
library(kableExtra)
## 
## Attaching package: 'kableExtra'
## 
## The following object is masked from 'package:dplyr':
## 
##     group_rows
library(forcats)

library(Hmisc)
## 
## Attaching package: 'Hmisc'
## 
## The following objects are masked from 'package:dplyr':
## 
##     src, summarize
## 
## The following objects are masked from 'package:base':
## 
##     format.pval, units
library(jtools)
## 
## Attaching package: 'jtools'
## 
## The following object is masked from 'package:Hmisc':
## 
##     %nin%
library(sjstats)
## Registered S3 methods overwritten by 'broom':
##   method            from  
##   tidy.glht         jtools
##   tidy.summary.glht jtools
library(arm)
## Loading required package: MASS
## 
## Attaching package: 'MASS'
## 
## The following object is masked from 'package:dplyr':
## 
##     select
## 
## Loading required package: Matrix
## 
## Attaching package: 'Matrix'
## 
## The following objects are masked from 'package:tidyr':
## 
##     expand, pack, unpack
## 
## Loading required package: lme4
## 
## arm (Version 1.14-4, built: 2024-4-1)
## 
## Working directory is /Users/harshitraj/Desktop/R Work harshit
## 
## 
## Attaching package: 'arm'
## 
## The following object is masked from 'package:jtools':
## 
##     standardize
library(car)
## Loading required package: carData
## 
## Attaching package: 'car'
## 
## The following object is masked from 'package:arm':
## 
##     logit
## 
## The following object is masked from 'package:dplyr':
## 
##     recode
## 
## The following object is masked from 'package:purrr':
## 
##     some
library(survey)
## Loading required package: grid
## Loading required package: survival
## 
## Attaching package: 'survey'
## 
## The following object is masked from 'package:sjstats':
## 
##     cv
## 
## The following object is masked from 'package:Hmisc':
## 
##     deff
## 
## The following object is masked from 'package:graphics':
## 
##     dotchart
library(forcats)

## 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 = 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")


mint11_distinct<-mint11_df %>% distinct(caseid)

## NEW REGRESSION analysis wrangling 
glimpse(mint11_df_1$p_party_new)
##  dbl+lbl [1:13816] 3, 1, 4, 4, 1, 1, 1, 4, 1, 1, 1, 2, 3, 1, 1, 3, 3, 2, 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() %>%filter(!is.na(hub_dist)) %>%  
   
  
 
  mutate(p_party_new = case_when(p_party == 1 ~ 1,
                                 p_party == 2 ~ 2,
                                 T ~ 3),
         p_party_new = labelled(p_party_new, 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)),
         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 = 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)),
         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))
         

# 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 = as.factor(p_party_new)) %>%

  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))

glimpse(mint11_df_1$religion_in_new)
##  Factor w/ 3 levels "1","2","3": 2 1 3 3 1 1 1 3 1 1 ...
mint11_df_1 <- mint11_df_1 %>%
  mutate(p_party_new = relevel(p_party_new, ref = 3),#change in reference level
         religion_in_new= relevel(religion_in_new, ref= 3))


## q9_1 DV <- age + partisanship + city tier + region (2) + religion + party.

model_q9_1 <-mint11_df_1 %>%  glm(q9 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb_new+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q9_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","SE","Hindu","Muslim")

summary(model_q9_1)
## 
## Call:
## glm(formula = q9 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb_new + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.48064    0.10309  -4.662 3.13e-06 ***
## Partisan_Index -0.11518    0.02543  -4.529 5.92e-06 ***
## age             0.22916    0.02693   8.511  < 2e-16 ***
## Rest_Tiers     -0.05155    0.04001  -1.289   0.1975    
## BJP            -0.59208    0.04855 -12.195  < 2e-16 ***
## INC             0.01836    0.06707   0.274   0.7842    
## SE             -0.00148    0.03983  -0.037   0.9704    
## Hindu          -0.10103    0.05116  -1.975   0.0483 *  
## Muslim          1.44835    0.07602  19.053  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16605  on 12433  degrees of freedom
## Residual deviance: 15441  on 12425  degrees of freedom
## AIC: 15280
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q9_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q9
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 1164.14
Pseudo-R² (Cragg-Uhler) 0.13
Pseudo-R² (McFadden) 0.07
AIC 15280.34
BIC 15347.20
exp(Est.) 2.5% 97.5% z val. p
intercept 0.62 0.51 0.76 -4.66 0.00
Partisan_Index 0.89 0.85 0.94 -4.53 0.00
age 1.26 1.19 1.33 8.51 0.00
Rest_Tiers 0.95 0.88 1.03 -1.29 0.20
BJP 0.55 0.50 0.61 -12.20 0.00
INC 1.02 0.89 1.16 0.27 0.78
SE 1.00 0.92 1.08 -0.04 0.97
Hindu 0.90 0.82 1.00 -1.97 0.05
Muslim 4.26 3.67 4.94 19.05 0.00
Standard errors: MLE
vif(model_q9_1)
## Warning in vif.default(model_q9_1): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        7.356719  1        2.712327
## age_cb_new           11.225335  1        3.350423
## geo_citytier_in       2.653795  1        1.629047
## p_party_new           3.551306  2        1.372768
## geo_region_in_cb_new  1.919723  1        1.385541
## religion_in_new       5.800143  2        1.551886
## q9_2 DV <- age + partisanship + city tier + region (4) + religion + party
model_q9_2 <-mint11_df_1 %>%  glm(q9 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q9_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q9_2)
## 
## Call:
## glm(formula = q9 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                         Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.510087   0.105958  -4.814 1.48e-06 ***
## Partisan_Index         -0.117944   0.025468  -4.631 3.64e-06 ***
## age                     0.229635   0.026983   8.511  < 2e-16 ***
## Rest_Tiers             -0.053113   0.040067  -1.326    0.185    
## BJP                    -0.581292   0.048719 -11.932  < 2e-16 ***
## INC                     0.009682   0.067189   0.144    0.885    
## South India             0.082099   0.050215   1.635    0.102    
## East & Northeast India -0.094430   0.058463  -1.615    0.106    
## West India              0.044267   0.054518   0.812    0.417    
## Hindu                  -0.084089   0.051498  -1.633    0.102    
## Muslim                  1.457529   0.076129  19.145  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16605  on 12433  degrees of freedom
## Residual deviance: 15432  on 12423  degrees of freedom
## AIC: 15277
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q9_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q9
Type Generalized linear model
Family binomial
Link logit
𝛘²(10) 1173.06
Pseudo-R² (Cragg-Uhler) 0.13
Pseudo-R² (McFadden) 0.07
AIC 15276.68
BIC 15358.39
exp(Est.) 2.5% 97.5% z val. p
intercept 0.60 0.49 0.74 -4.81 0.00
Partisan_Index 0.89 0.85 0.93 -4.63 0.00
age 1.26 1.19 1.33 8.51 0.00
Rest_Tiers 0.95 0.88 1.03 -1.33 0.18
BJP 0.56 0.51 0.62 -11.93 0.00
INC 1.01 0.89 1.15 0.14 0.89
South India 1.09 0.98 1.20 1.63 0.10
East & Northeast India 0.91 0.81 1.02 -1.62 0.11
West India 1.05 0.94 1.16 0.81 0.42
Hindu 0.92 0.83 1.02 -1.63 0.10
Muslim 4.30 3.70 4.99 19.15 0.00
Standard errors: MLE
vif(model_q9_2)
## Warning in vif.default(model_q9_2): No intercept: vifs may not be sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    7.371162  1        2.714988
## age_cb_new       11.263001  1        3.356040
## geo_citytier_in   2.658315  1        1.630434
## p_party_new       3.600242  2        1.377472
## geo_region_in_cb  3.135560  3        1.209816
## religion_in_new   5.876445  2        1.556964
## q9_3 DV <- age + partisanship + city tier + distance + religion + party.

model_q9_3 <-mint11_df_1 %>%  glm(q9 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+hub_dist+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q9_3$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Distance","Hindu","Muslim")

summary(model_q9_3)
## 
## Call:
## glm(formula = q9 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + hub_dist + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## intercept      -4.555e-01  1.076e-01  -4.233 2.30e-05 ***
## Partisan_Index -1.153e-01  2.543e-02  -4.535 5.76e-06 ***
## age             2.289e-01  2.693e-02   8.501  < 2e-16 ***
## Rest_Tiers     -4.853e-02  4.020e-02  -1.207   0.2274    
## BJP            -5.976e-01  4.855e-02 -12.309  < 2e-16 ***
## INC             1.880e-02  6.707e-02   0.280   0.7792    
## Distance       -2.407e-05  3.572e-05  -0.674   0.5004    
## Hindu          -1.025e-01  5.119e-02  -2.003   0.0452 *  
## Muslim          1.447e+00  7.601e-02  19.035  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16605  on 12433  degrees of freedom
## Residual deviance: 15440  on 12425  degrees of freedom
## AIC: 15280
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q9_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q9
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 1164.59
Pseudo-R² (Cragg-Uhler) 0.13
Pseudo-R² (McFadden) 0.07
AIC 15280.43
BIC 15347.28
exp(Est.) 2.5% 97.5% z val. p
intercept 0.63 0.51 0.78 -4.23 0.00
Partisan_Index 0.89 0.85 0.94 -4.54 0.00
age 1.26 1.19 1.33 8.50 0.00
Rest_Tiers 0.95 0.88 1.03 -1.21 0.23
BJP 0.55 0.50 0.61 -12.31 0.00
INC 1.02 0.89 1.16 0.28 0.78
Distance 1.00 1.00 1.00 -0.67 0.50
Hindu 0.90 0.82 1.00 -2.00 0.05
Muslim 4.25 3.66 4.93 19.04 0.00
Standard errors: MLE
vif(model_q9_3)
## Warning in vif.default(model_q9_3): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   7.354956  1        2.712002
## age_cb_new      11.226722  1        3.350630
## geo_citytier_in  2.680762  1        1.637303
## p_party_new      3.554333  2        1.373060
## hub_dist         4.254037  1        2.062532
## religion_in_new  5.804994  2        1.552210
## q9_4 DV <- age + partisanship + city tier + bordering + religion + party
model_q9_4 <-mint11_df_1 %>%  glm(q9 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+bordering+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q9_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","bordering","Hindu","Muslim")


summary(model_q9_4)
## 
## Call:
## glm(formula = q9 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + bordering + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.27919    0.17712  -1.576   0.1150    
## Partisan_Index -0.11534    0.02543  -4.536 5.73e-06 ***
## age             0.22910    0.02693   8.507  < 2e-16 ***
## Rest_Tiers     -0.06511    0.04113  -1.583   0.1134    
## BJP            -0.59635    0.04788 -12.454  < 2e-16 ***
## INC             0.01671    0.06708   0.249   0.8032    
## bordering      -0.09959    0.07180  -1.387   0.1654    
## Hindu          -0.10140    0.05114  -1.983   0.0474 *  
## Muslim          1.44795    0.07598  19.056  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16605  on 12433  degrees of freedom
## Residual deviance: 15439  on 12425  degrees of freedom
## AIC: 15279
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q9_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q9
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 1166.05
Pseudo-R² (Cragg-Uhler) 0.13
Pseudo-R² (McFadden) 0.07
AIC 15278.90
BIC 15345.75
exp(Est.) 2.5% 97.5% z val. p
intercept 0.76 0.53 1.07 -1.58 0.11
Partisan_Index 0.89 0.85 0.94 -4.54 0.00
age 1.26 1.19 1.33 8.51 0.00
Rest_Tiers 0.94 0.86 1.02 -1.58 0.11
BJP 0.55 0.50 0.61 -12.45 0.00
INC 1.02 0.89 1.16 0.25 0.80
bordering 0.91 0.79 1.04 -1.39 0.17
Hindu 0.90 0.82 1.00 -1.98 0.05
Muslim 4.25 3.67 4.94 19.06 0.00
Standard errors: MLE
vif(model_q9_4)
## Warning in vif.default(model_q9_4): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   7.354025  1        2.711831
## age_cb_new      11.227881  1        3.350803
## geo_citytier_in  2.804248  1        1.674589
## p_party_new      3.437414  2        1.361626
## bordering       51.923818  1        7.205818
## religion_in_new  5.792726  2        1.551389
# q10 Important
## q10 wrangling
mint11_df_1<-mint11_df_1 %>% mutate(q10=ifelse(q10 ==2, 0, q10))

## q10_1 DV <- age + partisanship + city tier + region (2) + religion + party.

model_q10_1 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb_new+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","SE","Hindu","Muslim")

summary(model_q10_1)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb_new + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.17354    0.10386  -1.671  0.09474 .  
## Partisan_Index -0.47869    0.02589 -18.488  < 2e-16 ***
## age             0.17814    0.02693   6.615 3.73e-11 ***
## Rest_Tiers     -0.11174    0.03997  -2.795  0.00518 ** 
## BJP             0.19445    0.04835   4.022 5.78e-05 ***
## INC            -0.07058    0.07019  -1.006  0.31460    
## SE             -0.23225    0.04004  -5.800 6.63e-09 ***
## Hindu           0.34646    0.05463   6.342 2.26e-10 ***
## Muslim         -0.39098    0.08003  -4.885 1.03e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15355  on 12425  degrees of freedom
## AIC: 15260
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 928.33
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15259.63
BIC 15326.48
exp(Est.) 2.5% 97.5% z val. p
intercept 0.84 0.69 1.03 -1.67 0.09
Partisan_Index 0.62 0.59 0.65 -18.49 0.00
age 1.19 1.13 1.26 6.61 0.00
Rest_Tiers 0.89 0.83 0.97 -2.80 0.01
BJP 1.21 1.10 1.34 4.02 0.00
INC 0.93 0.81 1.07 -1.01 0.31
SE 0.79 0.73 0.86 -5.80 0.00
Hindu 1.41 1.27 1.57 6.34 0.00
Muslim 0.68 0.58 0.79 -4.89 0.00
Standard errors: MLE
vif(model_q10_1)
## Warning in vif.default(model_q10_1): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        6.708071  1        2.589994
## age_cb_new           11.074052  1        3.327770
## geo_citytier_in       2.612881  1        1.616441
## p_party_new           4.079882  2        1.421222
## geo_region_in_cb_new  1.818259  1        1.348428
## religion_in_new       7.179438  2        1.636902
## q10_2 DV <- age + partisanship + city tier + region (4) + religion + party
model_q10_2 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q10_2)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.18049    0.10684  -1.689 0.091132 .  
## Partisan_Index         -0.47779    0.02599 -18.385  < 2e-16 ***
## age                     0.18281    0.02702   6.767 1.32e-11 ***
## Rest_Tiers             -0.10444    0.04008  -2.606 0.009163 ** 
## BJP                     0.16571    0.04861   3.409 0.000652 ***
## INC                    -0.04374    0.07055  -0.620 0.535297    
## South India            -0.38592    0.05192  -7.433 1.06e-13 ***
## East & Northeast India  0.05704    0.05653   1.009 0.312944    
## West India              0.09258    0.05343   1.733 0.083137 .  
## Hindu                   0.31421    0.05504   5.709 1.14e-08 ***
## Muslim                 -0.41731    0.08042  -5.189 2.11e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15300  on 12423  degrees of freedom
## AIC: 15222
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(10) 982.76
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15222.03
BIC 15303.74
exp(Est.) 2.5% 97.5% z val. p
intercept 0.83 0.68 1.03 -1.69 0.09
Partisan_Index 0.62 0.59 0.65 -18.38 0.00
age 1.20 1.14 1.27 6.77 0.00
Rest_Tiers 0.90 0.83 0.97 -2.61 0.01
BJP 1.18 1.07 1.30 3.41 0.00
INC 0.96 0.83 1.10 -0.62 0.54
South India 0.68 0.61 0.75 -7.43 0.00
East & Northeast India 1.06 0.95 1.18 1.01 0.31
West India 1.10 0.99 1.22 1.73 0.08
Hindu 1.37 1.23 1.53 5.71 0.00
Muslim 0.66 0.56 0.77 -5.19 0.00
Standard errors: MLE
vif(model_q10_2)
## Warning in vif.default(model_q10_2): No intercept: vifs may not be sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    6.728810  1        2.593995
## age_cb_new       11.090504  1        3.330241
## geo_citytier_in   2.610539  1        1.615716
## p_party_new       4.143417  2        1.426723
## geo_region_in_cb  2.917674  3        1.195380
## religion_in_new   7.271457  2        1.642122
## q10_3 DV <- age + partisanship + city tier + distance + religion + party.


model_q10_3 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+hub_dist+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_3$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Distance","Hindu","Muslim")

summary(model_q10_3)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + hub_dist + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## intercept      -7.679e-02  1.085e-01  -0.708   0.4790    
## Partisan_Index -4.774e-01  2.588e-02 -18.442  < 2e-16 ***
## age             1.774e-01  2.693e-02   6.587 4.50e-11 ***
## Rest_Tiers     -9.883e-02  4.012e-02  -2.463   0.0138 *  
## BJP             1.936e-01  4.834e-02   4.006 6.19e-05 ***
## INC            -6.838e-02  7.020e-02  -0.974   0.3300    
## Distance       -2.140e-04  3.601e-05  -5.944 2.79e-09 ***
## Hindu           3.412e-01  5.466e-02   6.243 4.29e-10 ***
## Muslim         -3.914e-01  8.004e-02  -4.889 1.01e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15353  on 12425  degrees of freedom
## AIC: 15256
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 930.01
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15256.28
BIC 15323.13
exp(Est.) 2.5% 97.5% z val. p
intercept 0.93 0.75 1.15 -0.71 0.48
Partisan_Index 0.62 0.59 0.65 -18.44 0.00
age 1.19 1.13 1.26 6.59 0.00
Rest_Tiers 0.91 0.84 0.98 -2.46 0.01
BJP 1.21 1.10 1.33 4.01 0.00
INC 0.93 0.81 1.07 -0.97 0.33
Distance 1.00 1.00 1.00 -5.94 0.00
Hindu 1.41 1.26 1.57 6.24 0.00
Muslim 0.68 0.58 0.79 -4.89 0.00
Standard errors: MLE
vif(model_q10_3)
## Warning in vif.default(model_q10_3): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.703338  1        2.589080
## age_cb_new      11.072770  1        3.327577
## geo_citytier_in  2.631271  1        1.622119
## p_party_new      4.080832  2        1.421305
## hub_dist         4.072195  1        2.017968
## religion_in_new  7.186250  2        1.637290
## q10_4 DV <- age + partisanship + city tier + bordering + religion + party
model_q10_4 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+bordering+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","bordering","Hindu","Muslim")


summary(model_q10_4)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + bordering + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.18551    0.17720  -1.047   0.2951    
## Partisan_Index -0.47535    0.02583 -18.400  < 2e-16 ***
## age             0.17997    0.02691   6.689 2.25e-11 ***
## Rest_Tiers     -0.13131    0.04110  -3.195   0.0014 ** 
## BJP             0.24243    0.04759   5.094 3.51e-07 ***
## INC            -0.07109    0.07004  -1.015   0.3101    
## bordering      -0.06102    0.07152  -0.853   0.3936    
## Hindu           0.35274    0.05456   6.465 1.01e-10 ***
## Muslim         -0.37922    0.07990  -4.746 2.07e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15388  on 12425  degrees of freedom
## AIC: 15296
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 895.35
Pseudo-R² (Cragg-Uhler) 0.09
Pseudo-R² (McFadden) 0.05
AIC 15295.81
BIC 15362.66
exp(Est.) 2.5% 97.5% z val. p
intercept 0.83 0.59 1.18 -1.05 0.30
Partisan_Index 0.62 0.59 0.65 -18.40 0.00
age 1.20 1.14 1.26 6.69 0.00
Rest_Tiers 0.88 0.81 0.95 -3.20 0.00
BJP 1.27 1.16 1.40 5.09 0.00
INC 0.93 0.81 1.07 -1.02 0.31
bordering 0.94 0.82 1.08 -0.85 0.39
Hindu 1.42 1.28 1.58 6.46 0.00
Muslim 0.68 0.59 0.80 -4.75 0.00
Standard errors: MLE
vif(model_q10_4)
## Warning in vif.default(model_q10_4): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.692747  1        2.587034
## age_cb_new      11.087933  1        3.329855
## geo_citytier_in  2.773342  1        1.665335
## p_party_new      3.951039  2        1.409866
## bordering       51.381389  1        7.168081
## religion_in_new  7.182202  2        1.637059
# q10 Partisan and party interaction 

## q10_5 to q10_8 wrangling
mint11_df_1<- mint11_df_1 %>% mutate(p_party_new_1=case_when(p_party_new==1~1,
                                               TRUE~0),
                       
                       
                       partisan_index_new = (q_p_party_1_new + q_p_party_2_new + 
                                               q_p_party_3_new + q_p_party_4_new)/4,
                       
                       partisan_index_party=partisan_index_new*p_party_new_1)


## q10_5 DV <- age + city tier + region (4) + religion + partisanship*party.

model_q10_5 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+partisan_index_party+p_party_new+geo_region_in_cb_new+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_5$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","partisan*party","BJP","INC","SE","Hindu","Muslim")


summary(model_q10_5)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     partisan_index_party + p_party_new + geo_region_in_cb_new + 
##     religion_in_new, family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.31068    0.11263  -2.758  0.00581 ** 
## Partisan_Index -0.42232    0.03134 -13.478  < 2e-16 ***
## age             0.18072    0.02696   6.702 2.06e-11 ***
## Rest_Tiers     -0.11066    0.04000  -2.767  0.00566 ** 
## partisan*party -0.13402    0.04215  -3.179  0.00148 ** 
## BJP             0.50364    0.10854   4.640 3.48e-06 ***
## INC            -0.03512    0.07090  -0.495  0.62032    
## SE             -0.22884    0.04007  -5.711 1.13e-08 ***
## Hindu           0.35116    0.05461   6.430 1.27e-10 ***
## Muslim         -0.38041    0.07996  -4.757 1.96e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15344  on 12424  degrees of freedom
## AIC: 15252
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_5, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 938.49
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15251.71
BIC 15325.99
exp(Est.) 2.5% 97.5% z val. p
intercept 0.73 0.59 0.91 -2.76 0.01
Partisan_Index 0.66 0.62 0.70 -13.48 0.00
age 1.20 1.14 1.26 6.70 0.00
Rest_Tiers 0.90 0.83 0.97 -2.77 0.01
partisan*party 0.87 0.81 0.95 -3.18 0.00
BJP 1.65 1.34 2.05 4.64 0.00
INC 0.97 0.84 1.11 -0.50 0.62
SE 0.80 0.74 0.86 -5.71 0.00
Hindu 1.42 1.28 1.58 6.43 0.00
Muslim 0.68 0.58 0.80 -4.76 0.00
Standard errors: MLE
vif(model_q10_5)
## Warning in vif.default(model_q10_5): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.866159  1        3.141044
## age_cb_new           11.091759  1        3.330429
## geo_citytier_in       2.612131  1        1.616209
## partisan_index_party 11.249422  1        3.354016
## p_party_new          21.729333  2        2.159045
## geo_region_in_cb_new  1.821451  1        1.349611
## religion_in_new       7.154792  2        1.635495
## q10_6 DV <- age + city tier + region (2) + religion + partisanship*party
model_q10_6 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_6$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisan index*party","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q10_6)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + geo_region_in_cb + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                         Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.321491   0.115599  -2.781  0.00542 ** 
## Partisan_Index         -0.420408   0.031451 -13.367  < 2e-16 ***
## age                     0.185551   0.027050   6.860 6.90e-12 ***
## Rest_Tiers             -0.103151   0.040104  -2.572  0.01011 *  
## BJP                     0.480348   0.108925   4.410 1.03e-05 ***
## INC                    -0.007299   0.071280  -0.102  0.91845    
## Partisan index*party   -0.136302   0.042263  -3.225  0.00126 ** 
## South India            -0.381758   0.051942  -7.350 1.99e-13 ***
## East & Northeast India  0.062092   0.056610   1.097  0.27271    
## West India              0.094521   0.053492   1.767  0.07723 .  
## Hindu                   0.318976   0.055024   5.797 6.75e-09 ***
## Muslim                 -0.406381   0.080340  -5.058 4.23e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15290  on 12422  degrees of freedom
## AIC: 15214
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_6, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 993.22
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15213.82
BIC 15302.96
exp(Est.) 2.5% 97.5% z val. p
intercept 0.73 0.58 0.91 -2.78 0.01
Partisan_Index 0.66 0.62 0.70 -13.37 0.00
age 1.20 1.14 1.27 6.86 0.00
Rest_Tiers 0.90 0.83 0.98 -2.57 0.01
BJP 1.62 1.31 2.00 4.41 0.00
INC 0.99 0.86 1.14 -0.10 0.92
Partisan index*party 0.87 0.80 0.95 -3.23 0.00
South India 0.68 0.62 0.76 -7.35 0.00
East & Northeast India 1.06 0.95 1.19 1.10 0.27
West India 1.10 0.99 1.22 1.77 0.08
Hindu 1.38 1.24 1.53 5.80 0.00
Muslim 0.67 0.57 0.78 -5.06 0.00
Standard errors: MLE
vif(model_q10_6)
## Warning in vif.default(model_q10_6): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.895268  1        3.145675
## age_cb_new           11.108764  1        3.332981
## geo_citytier_in       2.609546  1        1.615409
## p_party_new          21.927792  2        2.163957
## partisan_index_party 11.272607  1        3.357470
## geo_region_in_cb      2.924706  3        1.195860
## religion_in_new       7.246752  2        1.640725
## q10_7 DV <- age + city tier + bordering + religion + partisanship*party.
model_q10_4 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+bordering+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisanship*party", "bordering","Hindu","Muslim")


summary(model_q10_4)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + bordering + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                    Estimate Std. Error z value Pr(>|z|)    
## intercept          -0.33492    0.18313  -1.829 0.067422 .  
## Partisan_Index     -0.41659    0.03126 -13.326  < 2e-16 ***
## age                 0.18261    0.02694   6.779 1.21e-11 ***
## Rest_Tiers         -0.12957    0.04113  -3.151 0.001629 ** 
## BJP                 0.56438    0.10791   5.230 1.69e-07 ***
## INC                -0.03429    0.07073  -0.485 0.627836    
## Partisanship*party -0.13983    0.04209  -3.322 0.000893 ***
## bordering          -0.05681    0.07166  -0.793 0.427956    
## Hindu               0.35762    0.05454   6.557 5.51e-11 ***
## Muslim             -0.36827    0.07982  -4.614 3.95e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15376  on 12424  degrees of freedom
## AIC: 15287
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 906.45
Pseudo-R² (Cragg-Uhler) 0.09
Pseudo-R² (McFadden) 0.05
AIC 15286.91
BIC 15361.20
exp(Est.) 2.5% 97.5% z val. p
intercept 0.72 0.50 1.02 -1.83 0.07
Partisan_Index 0.66 0.62 0.70 -13.33 0.00
age 1.20 1.14 1.27 6.78 0.00
Rest_Tiers 0.88 0.81 0.95 -3.15 0.00
BJP 1.76 1.42 2.17 5.23 0.00
INC 0.97 0.84 1.11 -0.48 0.63
Partisanship*party 0.87 0.80 0.94 -3.32 0.00
bordering 0.94 0.82 1.09 -0.79 0.43
Hindu 1.43 1.28 1.59 6.56 0.00
Muslim 0.69 0.59 0.81 -4.61 0.00
Standard errors: MLE
vif(model_q10_4)
## Warning in vif.default(model_q10_4): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.843300  1        3.137403
## age_cb_new           11.105399  1        3.332476
## geo_citytier_in       2.772418  1        1.665058
## p_party_new          21.531632  2        2.154117
## partisan_index_party 11.247815  1        3.353776
## bordering            51.512449  1        7.177217
## religion_in_new       7.155096  2        1.635512
## q10_8 DV <- age + city tier + distance + religion + partisanship*party.
model_q10_4 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+hub_dist+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisanship*party", "distance","Hindu","Muslim")


summary(model_q10_4)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + hub_dist + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                      Estimate Std. Error z value Pr(>|z|)    
## intercept          -2.155e-01  1.170e-01  -1.841  0.06558 .  
## Partisan_Index     -4.209e-01  3.133e-02 -13.434  < 2e-16 ***
## age                 1.800e-01  2.696e-02   6.675 2.47e-11 ***
## Rest_Tiers         -9.786e-02  4.015e-02  -2.437  0.01479 *  
## BJP                 5.035e-01  1.085e-01   4.640 3.48e-06 ***
## INC                -3.286e-02  7.091e-02  -0.463  0.64310    
## Partisanship*party -1.344e-01  4.215e-02  -3.188  0.00143 ** 
## distance           -2.112e-04  3.603e-05  -5.861 4.60e-09 ***
## Hindu               3.460e-01  5.464e-02   6.332 2.41e-10 ***
## Muslim             -3.808e-01  7.997e-02  -4.761 1.92e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15343  on 12424  degrees of freedom
## AIC: 15248
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 940.22
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15248.30
BIC 15322.58
exp(Est.) 2.5% 97.5% z val. p
intercept 0.81 0.64 1.01 -1.84 0.07
Partisan_Index 0.66 0.62 0.70 -13.43 0.00
age 1.20 1.14 1.26 6.67 0.00
Rest_Tiers 0.91 0.84 0.98 -2.44 0.01
BJP 1.65 1.34 2.05 4.64 0.00
INC 0.97 0.84 1.11 -0.46 0.64
Partisanship*party 0.87 0.80 0.95 -3.19 0.00
distance 1.00 1.00 1.00 -5.86 0.00
Hindu 1.41 1.27 1.57 6.33 0.00
Muslim 0.68 0.58 0.80 -4.76 0.00
Standard errors: MLE
vif(model_q10_4)
## Warning in vif.default(model_q10_4): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.860005  1        3.140064
## age_cb_new           11.090594  1        3.330254
## geo_citytier_in       2.630725  1        1.621951
## p_party_new          21.726393  2        2.158971
## partisan_index_party 11.248985  1        3.353951
## hub_dist              4.077974  1        2.019399
## religion_in_new       7.161398  2        1.635873
# q11a

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

## q11a_1 DV <- age + partisanship + city tier + region (2) + religion + party.

model_q11a_1 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb_new+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11a_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","SE","Hindu","Muslim")

summary(model_q11a_1)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb_new + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept       1.73190    0.17557   9.864  < 2e-16 ***
## Partisan_Index -0.26644    0.04261  -6.253 4.04e-10 ***
## age            -0.21433    0.04511  -4.752 2.02e-06 ***
## Rest_Tiers     -0.10652    0.06459  -1.649  0.09912 .  
## BJP             0.11965    0.07847   1.525  0.12733    
## INC             0.10857    0.12017   0.903  0.36626    
## SE             -0.15107    0.06481  -2.331  0.01975 *  
## Hindu          -0.10633    0.09348  -1.138  0.25532    
## Muslim         -0.41584    0.14098  -2.950  0.00318 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5861.1  on 4555  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5718.7
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11a_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4564 (7870 missing obs. deleted)
Dependent variable q11a
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 106.06
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5718.70
BIC 5776.54
exp(Est.) 2.5% 97.5% z val. p
intercept 5.65 4.01 7.97 9.86 0.00
Partisan_Index 0.77 0.70 0.83 -6.25 0.00
age 0.81 0.74 0.88 -4.75 0.00
Rest_Tiers 0.90 0.79 1.02 -1.65 0.10
BJP 1.13 0.97 1.31 1.52 0.13
INC 1.11 0.88 1.41 0.90 0.37
SE 0.86 0.76 0.98 -2.33 0.02
Hindu 0.90 0.75 1.08 -1.14 0.26
Muslim 0.66 0.50 0.87 -2.95 0.00
Standard errors: MLE
vif(model_q11a_1)
## Warning in vif.default(model_q11a_1): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        6.381596  1        2.526182
## age_cb_new           12.406934  1        3.522348
## geo_citytier_in       2.612986  1        1.616473
## p_party_new           4.366042  2        1.445513
## geo_region_in_cb_new  1.731430  1        1.315838
## religion_in_new       8.352838  2        1.700038
## q11a_2 DV <- age + partisanship + city tier + region (4) + religion + party
model_q11a_2 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11a_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q11a_2)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept               1.79390    0.18041   9.944  < 2e-16 ***
## Partisan_Index         -0.26490    0.04272  -6.201 5.61e-10 ***
## age                    -0.21751    0.04524  -4.807 1.53e-06 ***
## Rest_Tiers             -0.11308    0.06470  -1.748  0.08051 .  
## BJP                     0.10834    0.07889   1.373  0.16966    
## INC                     0.11960    0.12048   0.993  0.32083    
## South India            -0.26971    0.08640  -3.122  0.00180 ** 
## East & Northeast India -0.08920    0.08899  -1.002  0.31617    
## West India             -0.08818    0.08487  -1.039  0.29885    
## Hindu                  -0.12391    0.09394  -1.319  0.18718    
## Muslim                 -0.42860    0.14128  -3.034  0.00242 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5856.8  on 4553  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5717.4
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11a_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4564 (7870 missing obs. deleted)
Dependent variable q11a
Type Generalized linear model
Family binomial
Link logit
𝛘²(10) 110.35
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5717.42
BIC 5788.11
exp(Est.) 2.5% 97.5% z val. p
intercept 6.01 4.22 8.56 9.94 0.00
Partisan_Index 0.77 0.71 0.83 -6.20 0.00
age 0.80 0.74 0.88 -4.81 0.00
Rest_Tiers 0.89 0.79 1.01 -1.75 0.08
BJP 1.11 0.95 1.30 1.37 0.17
INC 1.13 0.89 1.43 0.99 0.32
South India 0.76 0.64 0.90 -3.12 0.00
East & Northeast India 0.91 0.77 1.09 -1.00 0.32
West India 0.92 0.78 1.08 -1.04 0.30
Hindu 0.88 0.73 1.06 -1.32 0.19
Muslim 0.65 0.49 0.86 -3.03 0.00
Standard errors: MLE
vif(model_q11a_2)
## Warning in vif.default(model_q11a_2): No intercept: vifs may not be sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    6.405152  1        2.530840
## age_cb_new       12.467360  1        3.530915
## geo_citytier_in   2.618527  1        1.618186
## p_party_new       4.452907  2        1.452650
## geo_region_in_cb  2.842938  3        1.190222
## religion_in_new   8.438911  2        1.704400
## q11a_3 DV <- age + partisanship + city tier + distance + religion + party.


model_q11a_3 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+hub_dist+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11a_3$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Distance","Hindu","Muslim")

summary(model_q11a_3)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + hub_dist + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## intercept       1.750e+00  1.831e-01   9.561  < 2e-16 ***
## Partisan_Index -2.639e-01  4.258e-02  -6.197 5.74e-10 ***
## age            -2.146e-01  4.510e-02  -4.758 1.95e-06 ***
## Rest_Tiers     -1.013e-01  6.465e-02  -1.566  0.11729    
## BJP             1.279e-01  7.842e-02   1.631  0.10286    
## INC             1.088e-01  1.201e-01   0.906  0.36519    
## Distance       -9.791e-05  5.947e-05  -1.646  0.09968 .  
## Hindu          -1.093e-01  9.353e-02  -1.168  0.24277    
## Muslim         -4.151e-01  1.409e-01  -2.945  0.00323 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5863.8  on 4555  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5722.2
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 930.01
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15256.28
BIC 15323.13
exp(Est.) 2.5% 97.5% z val. p
intercept 0.93 0.75 1.15 -0.71 0.48
Partisan_Index 0.62 0.59 0.65 -18.44 0.00
age 1.19 1.13 1.26 6.59 0.00
Rest_Tiers 0.91 0.84 0.98 -2.46 0.01
BJP 1.21 1.10 1.33 4.01 0.00
INC 0.93 0.81 1.07 -0.97 0.33
Distance 1.00 1.00 1.00 -5.94 0.00
Hindu 1.41 1.26 1.57 6.24 0.00
Muslim 0.68 0.58 0.79 -4.89 0.00
Standard errors: MLE
vif(model_q11a_3)
## Warning in vif.default(model_q11a_3): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.375037  1        2.524884
## age_cb_new      12.409201  1        3.522670
## geo_citytier_in  2.619481  1        1.618481
## p_party_new      4.365085  2        1.445434
## hub_dist         4.001093  1        2.000273
## religion_in_new  8.367648  2        1.700791
## q11a_4 DV <- age + partisanship + city tier + bordering + religion + party
model_q11_4 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+bordering+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","bordering","Hindu","Muslim")


summary(model_q11_4)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + bordering + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept       1.45488    0.28299   5.141 2.73e-07 ***
## Partisan_Index -0.26434    0.04259  -6.206 5.42e-10 ***
## age            -0.21256    0.04507  -4.716 2.41e-06 ***
## Rest_Tiers     -0.09281    0.06664  -1.393   0.1638    
## BJP             0.14848    0.07759   1.914   0.0557 .  
## INC             0.10754    0.12009   0.895   0.3705    
## bordering       0.09493    0.11239   0.845   0.3983    
## Hindu          -0.10239    0.09337  -1.097   0.2728    
## Muslim         -0.41402    0.14091  -2.938   0.0033 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5865.8  on 4555  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5726.8
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4564 (7870 missing obs. deleted)
Dependent variable q11a
Type Generalized linear model
Family binomial
Link logit
𝛘²(8) 101.35
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5726.80
BIC 5784.63
exp(Est.) 2.5% 97.5% z val. p
intercept 4.28 2.46 7.46 5.14 0.00
Partisan_Index 0.77 0.71 0.83 -6.21 0.00
age 0.81 0.74 0.88 -4.72 0.00
Rest_Tiers 0.91 0.80 1.04 -1.39 0.16
BJP 1.16 1.00 1.35 1.91 0.06
INC 1.11 0.88 1.41 0.90 0.37
bordering 1.10 0.88 1.37 0.84 0.40
Hindu 0.90 0.75 1.08 -1.10 0.27
Muslim 0.66 0.50 0.87 -2.94 0.00
Standard errors: MLE
vif(model_q11_4)
## Warning in vif.default(model_q11_4): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.381086  1        2.526081
## age_cb_new      12.400774  1        3.521473
## geo_citytier_in  2.785399  1        1.668952
## p_party_new      4.251763  2        1.435960
## bordering       48.185946  1        6.941610
## religion_in_new  8.345633  2        1.699671
## q11a_5 DV <- age + city tier + region (4) + religion + partisanship*party. 
model_q11a_5 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11a_5$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisan index*party","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q11a_5)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + geo_region_in_cb + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept               1.86602    0.19470   9.584  < 2e-16 ***
## Partisan_Index         -0.29514    0.05243  -5.629 1.81e-08 ***
## age                    -0.21905    0.04528  -4.838 1.31e-06 ***
## Rest_Tiers             -0.11431    0.06472  -1.766  0.07738 .  
## BJP                    -0.04170    0.16948  -0.246  0.80566    
## INC                     0.09969    0.12227   0.815  0.41488    
## Partisan index*party    0.06678    0.06675   1.001  0.31705    
## South India            -0.27211    0.08646  -3.147  0.00165 ** 
## East & Northeast India -0.09168    0.08903  -1.030  0.30315    
## West India             -0.08912    0.08488  -1.050  0.29372    
## Hindu                  -0.12547    0.09402  -1.335  0.18202    
## Muslim                 -0.43332    0.14148  -3.063  0.00219 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5855.8  on 4552  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5719.3
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11a_5, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4564 (7870 missing obs. deleted)
Dependent variable q11a
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 111.35
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5719.29
BIC 5796.40
exp(Est.) 2.5% 97.5% z val. p
intercept 6.46 4.41 9.47 9.58 0.00
Partisan_Index 0.74 0.67 0.82 -5.63 0.00
age 0.80 0.74 0.88 -4.84 0.00
Rest_Tiers 0.89 0.79 1.01 -1.77 0.08
BJP 0.96 0.69 1.34 -0.25 0.81
INC 1.10 0.87 1.40 0.82 0.41
Partisan index*party 1.07 0.94 1.22 1.00 0.32
South India 0.76 0.64 0.90 -3.15 0.00
East & Northeast India 0.91 0.77 1.09 -1.03 0.30
West India 0.91 0.77 1.08 -1.05 0.29
Hindu 0.88 0.73 1.06 -1.33 0.18
Muslim 0.65 0.49 0.86 -3.06 0.00
Standard errors: MLE
vif(model_q11a_5)
## Warning in vif.default(model_q11a_5): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.635607  1        3.104127
## age_cb_new           12.483126  1        3.533147
## geo_citytier_in       2.619639  1        1.618530
## p_party_new          21.896019  2        2.163173
## partisan_index_party 10.970861  1        3.312229
## geo_region_in_cb      2.845694  3        1.190414
## religion_in_new       8.460173  2        1.705473
## q11a_6 DV <- age + city tier + region (2) + religion + partisanship*party
model_q11a_6 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+partisan_index_party+p_party_new+geo_region_in_cb_new+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11a_6$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","partisan*party","BJP","INC","SE","Hindu","Muslim")


summary(model_q11a_6)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     partisan_index_party + p_party_new + geo_region_in_cb_new + 
##     religion_in_new, family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept       1.80274    0.18996   9.490  < 2e-16 ***
## Partisan_Index -0.29640    0.05234  -5.663 1.49e-08 ***
## age            -0.21578    0.04514  -4.780 1.75e-06 ***
## Rest_Tiers     -0.10767    0.06461  -1.667  0.09560 .  
## partisan*party  0.06617    0.06673   0.991  0.32145    
## BJP            -0.02902    0.16928  -0.171  0.86387    
## INC             0.08884    0.12196   0.728  0.46632    
## SE             -0.15311    0.06485  -2.361  0.01823 *  
## Hindu          -0.10785    0.09355  -1.153  0.24898    
## Muslim         -0.42056    0.14119  -2.979  0.00289 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5860.1  on 4554  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5720.6
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11a_6, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4564 (7870 missing obs. deleted)
Dependent variable q11a
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 107.04
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5720.55
BIC 5784.81
exp(Est.) 2.5% 97.5% z val. p
intercept 6.07 4.18 8.80 9.49 0.00
Partisan_Index 0.74 0.67 0.82 -5.66 0.00
age 0.81 0.74 0.88 -4.78 0.00
Rest_Tiers 0.90 0.79 1.02 -1.67 0.10
partisan*party 1.07 0.94 1.22 0.99 0.32
BJP 0.97 0.70 1.35 -0.17 0.86
INC 1.09 0.86 1.39 0.73 0.47
SE 0.86 0.76 0.97 -2.36 0.02
Hindu 0.90 0.75 1.08 -1.15 0.25
Muslim 0.66 0.50 0.87 -2.98 0.00
Standard errors: MLE
vif(model_q11a_6)
## Warning in vif.default(model_q11a_6): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.613851  1        3.100621
## age_cb_new           12.419863  1        3.524183
## geo_citytier_in       2.613998  1        1.616786
## partisan_index_party 10.974319  1        3.312751
## p_party_new          21.740268  2        2.159316
## geo_region_in_cb_new  1.732761  1        1.316344
## religion_in_new       8.374698  2        1.701149
## q11a_7 DV <- age + city tier + bordering + religion + partisanship*party.
model_q11a_7 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+bordering+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11a_7$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisanship*party", "bordering","Hindu","Muslim")


summary(model_q11a_7)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + bordering + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                    Estimate Std. Error z value Pr(>|z|)    
## intercept           1.52195    0.29283   5.197 2.02e-07 ***
## Partisan_Index     -0.29151    0.05224  -5.580 2.41e-08 ***
## age                -0.21386    0.04510  -4.742 2.12e-06 ***
## Rest_Tiers         -0.09406    0.06667  -1.411  0.15826    
## BJP                 0.01353    0.16847   0.080  0.93599    
## INC                 0.08953    0.12187   0.735  0.46257    
## Partisanship*party  0.06020    0.06669   0.903  0.36671    
## bordering           0.09304    0.11241   0.828  0.40787    
## Hindu              -0.10374    0.09344  -1.110  0.26688    
## Muslim             -0.41821    0.14110  -2.964  0.00304 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5865.0  on 4554  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5728.7
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11a_7, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4564 (7870 missing obs. deleted)
Dependent variable q11a
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 102.16
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5728.75
BIC 5793.01
exp(Est.) 2.5% 97.5% z val. p
intercept 4.58 2.58 8.13 5.20 0.00
Partisan_Index 0.75 0.67 0.83 -5.58 0.00
age 0.81 0.74 0.88 -4.74 0.00
Rest_Tiers 0.91 0.80 1.04 -1.41 0.16
BJP 1.01 0.73 1.41 0.08 0.94
INC 1.09 0.86 1.39 0.73 0.46
Partisanship*party 1.06 0.93 1.21 0.90 0.37
bordering 1.10 0.88 1.37 0.83 0.41
Hindu 0.90 0.75 1.08 -1.11 0.27
Muslim 0.66 0.50 0.87 -2.96 0.00
Standard errors: MLE
vif(model_q11a_7)
## Warning in vif.default(model_q11a_7): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.589556  1        3.096701
## age_cb_new           12.413453  1        3.523273
## geo_citytier_in       2.786692  1        1.669339
## p_party_new          21.522747  2        2.153894
## partisan_index_party 10.970968  1        3.312245
## bordering            48.195265  1        6.942281
## religion_in_new       8.365985  2        1.700706
## q11a_8 DV <- age + city tier + distance + religion + partisanship*party.
model_q11a_8 <-mint11_df_1 %>%  glm(q11a ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+hub_dist+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11a_8$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisanship*party", "distance","Hindu","Muslim")


summary(model_q11a_8)
## 
## Call:
## glm(formula = q11a ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + hub_dist + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                      Estimate Std. Error z value Pr(>|z|)    
## intercept           1.819e+00  1.970e-01   9.233  < 2e-16 ***
## Partisan_Index     -2.928e-01  5.227e-02  -5.601 2.13e-08 ***
## age                -2.160e-01  4.513e-02  -4.786 1.70e-06 ***
## Rest_Tiers         -1.023e-01  6.466e-02  -1.582  0.11370    
## BJP                -1.560e-02  1.691e-01  -0.092  0.92650    
## INC                 8.974e-02  1.219e-01   0.736  0.46168    
## Partisanship*party  6.391e-02  6.669e-02   0.958  0.33790    
## distance           -9.931e-05  5.949e-05  -1.669  0.09508 .  
## Hindu              -1.108e-01  9.361e-02  -1.184  0.23658    
## Muslim             -4.197e-01  1.411e-01  -2.973  0.00295 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 5967.2  on 4563  degrees of freedom
## Residual deviance: 5862.9  on 4554  degrees of freedom
##   (7870 observations deleted due to missingness)
## AIC: 5724.1
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11a_8, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 4564 (7870 missing obs. deleted)
Dependent variable q11a
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 104.27
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 5724.10
BIC 5788.36
exp(Est.) 2.5% 97.5% z val. p
intercept 6.17 4.19 9.07 9.23 0.00
Partisan_Index 0.75 0.67 0.83 -5.60 0.00
age 0.81 0.74 0.88 -4.79 0.00
Rest_Tiers 0.90 0.80 1.02 -1.58 0.11
BJP 0.98 0.71 1.37 -0.09 0.93
INC 1.09 0.86 1.39 0.74 0.46
Partisanship*party 1.07 0.94 1.21 0.96 0.34
distance 1.00 1.00 1.00 -1.67 0.10
Hindu 0.90 0.75 1.08 -1.18 0.24
Muslim 0.66 0.50 0.87 -2.97 0.00
Standard errors: MLE
vif(model_q11a_8)
## Warning in vif.default(model_q11a_8): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        9.596459  1        3.097815
## age_cb_new           12.422175  1        3.524511
## geo_citytier_in       2.620185  1        1.618699
## p_party_new          21.706314  2        2.158473
## partisan_index_party 10.967963  1        3.311791
## hub_dist              4.002316  1        2.000579
## religion_in_new       8.389398  2        1.701895
# q11b narrow morality
## data wrangling

mint11_df_4<-mint11_df_1 %>%filter(!is.na(q11b)) %>% mutate(q11b_narrow=case_when(q11b==2~1,
                                                          TRUE~0))


model_q11b_narrow_2 <-mint11_df_4 %>%  glm(q11b_narrow ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11b_narrow_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q11b_narrow_2)
## 
## Call:
## glm(formula = q11b_narrow ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept              -1.00142    0.13980  -7.163 7.87e-13 ***
## Partisan_Index          0.27758    0.03405   8.153 3.54e-16 ***
## age                    -0.10130    0.03495  -2.899 0.003746 ** 
## Rest_Tiers             -0.08825    0.05366  -1.645 0.100023    
## BJP                    -0.19365    0.06642  -2.916 0.003549 ** 
## INC                     0.08736    0.08367   1.044 0.296467    
## South India             0.11438    0.06474   1.767 0.077284 .  
## East & Northeast India -0.18202    0.08311  -2.190 0.028511 *  
## West India             -0.03456    0.07533  -0.459 0.646394    
## Hindu                  -0.19018    0.06531  -2.912 0.003591 ** 
## Muslim                 -0.29323    0.08675  -3.380 0.000725 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 9135.2  on 7869  degrees of freedom
## Residual deviance: 8943.9  on 7859  degrees of freedom
## AIC: 9072.8
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11b_narrow_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 7870
Dependent variable q11b_narrow
Type Generalized linear model
Family binomial
Link logit
𝛘²(10) 191.34
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 9072.76
BIC 9149.44
exp(Est.) 2.5% 97.5% z val. p
intercept 0.37 0.28 0.48 -7.16 0.00
Partisan_Index 1.32 1.23 1.41 8.15 0.00
age 0.90 0.84 0.97 -2.90 0.00
Rest_Tiers 0.92 0.82 1.02 -1.64 0.10
BJP 0.82 0.72 0.94 -2.92 0.00
INC 1.09 0.93 1.29 1.04 0.30
South India 1.12 0.99 1.27 1.77 0.08
East & Northeast India 0.83 0.71 0.98 -2.19 0.03
West India 0.97 0.83 1.12 -0.46 0.65
Hindu 0.83 0.73 0.94 -2.91 0.00
Muslim 0.75 0.63 0.88 -3.38 0.00
Standard errors: MLE
vif(model_q11b_narrow_2)
## Warning in vif.default(model_q11b_narrow_2): No intercept: vifs may not be
## sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    9.083606  1        3.013902
## age_cb_new       10.163201  1        3.187978
## geo_citytier_in   2.697222  1        1.642322
## p_party_new       3.144600  2        1.331654
## geo_region_in_cb  3.432651  3        1.228207
## religion_in_new   5.060923  2        1.499883
## q11b_2 narrow morality 
model_q11b_2 <-mint11_df_4 %>%  glm(q11b_narrow ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11b_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisan index*party","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q11b_2)
## 
## Call:
## glm(formula = q11b_narrow ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + geo_region_in_cb + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept              -1.02560    0.15185  -6.754 1.44e-11 ***
## Partisan_Index          0.28645    0.04038   7.094 1.30e-12 ***
## age                    -0.10091    0.03496  -2.886 0.003899 ** 
## Rest_Tiers             -0.08816    0.05366  -1.643 0.100376    
## BJP                    -0.13026    0.16811  -0.775 0.438428    
## INC                     0.09313    0.08489   1.097 0.272605    
## Partisan index*party   -0.02510    0.06117  -0.410 0.681544    
## South India             0.11524    0.06478   1.779 0.075259 .  
## East & Northeast India -0.18115    0.08313  -2.179 0.029332 *  
## West India             -0.03421    0.07533  -0.454 0.649715    
## Hindu                  -0.18959    0.06534  -2.902 0.003710 ** 
## Muslim                 -0.29170    0.08685  -3.359 0.000783 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 9135.2  on 7869  degrees of freedom
## Residual deviance: 8943.7  on 7858  degrees of freedom
## AIC: 9074.7
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11b_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 7870
Dependent variable q11b_narrow
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 191.50
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.02
AIC 9074.72
BIC 9158.36
exp(Est.) 2.5% 97.5% z val. p
intercept 0.36 0.27 0.48 -6.75 0.00
Partisan_Index 1.33 1.23 1.44 7.09 0.00
age 0.90 0.84 0.97 -2.89 0.00
Rest_Tiers 0.92 0.82 1.02 -1.64 0.10
BJP 0.88 0.63 1.22 -0.77 0.44
INC 1.10 0.93 1.30 1.10 0.27
Partisan index*party 0.98 0.87 1.10 -0.41 0.68
South India 1.12 0.99 1.27 1.78 0.08
East & Northeast India 0.83 0.71 0.98 -2.18 0.03
West India 0.97 0.83 1.12 -0.45 0.65
Hindu 0.83 0.73 0.94 -2.90 0.00
Muslim 0.75 0.63 0.89 -3.36 0.00
Standard errors: MLE
vif(model_q11b_2)
## Warning in vif.default(model_q11b_2): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index       12.773882  1        3.574057
## age_cb_new           10.170736  1        3.189159
## geo_citytier_in       2.697054  1        1.642271
## p_party_new          21.110668  2        2.143510
## partisan_index_party 11.674641  1        3.416817
## geo_region_in_cb      3.436435  3        1.228433
## religion_in_new       5.072183  2        1.500717
# 11b wider morality
## data wrangling
mint11_df_4<-mint11_df_1 %>%filter(!is.na(q11b)) %>% mutate(q11b_wider=case_when(q11b%in%c(2,3,6)~1,
                                                                                  TRUE~0))

model_q11b_wider_1 <-mint11_df_4 %>%  glm(q11b_wider ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11b_wider_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q11b_wider_1)
## 
## Call:
## glm(formula = q11b_wider ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.05906    0.12623  -0.468  0.63989    
## Partisan_Index          0.09211    0.03036   3.033  0.00242 ** 
## age                    -0.01601    0.03162  -0.506  0.61275    
## Rest_Tiers             -0.09466    0.04847  -1.953  0.05082 .  
## BJP                    -0.26833    0.05913  -4.538 5.67e-06 ***
## INC                    -0.13501    0.07678  -1.758  0.07868 .  
## South India             0.19373    0.05899   3.284  0.00102 ** 
## East & Northeast India -0.06325    0.07229  -0.875  0.38158    
## West India              0.01822    0.06729   0.271  0.78655    
## Hindu                  -0.19849    0.06085  -3.262  0.00111 ** 
## Muslim                  0.16137    0.07931   2.035  0.04190 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 10593  on 7869  degrees of freedom
## Residual deviance: 10437  on 7859  degrees of freedom
## AIC: 10522
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11b_wider_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 7870
Dependent variable q11b_wider
Type Generalized linear model
Family binomial
Link logit
𝛘²(10) 156.32
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.01
AIC 10521.73
BIC 10598.41
exp(Est.) 2.5% 97.5% z val. p
intercept 0.94 0.74 1.21 -0.47 0.64
Partisan_Index 1.10 1.03 1.16 3.03 0.00
age 0.98 0.92 1.05 -0.51 0.61
Rest_Tiers 0.91 0.83 1.00 -1.95 0.05
BJP 0.76 0.68 0.86 -4.54 0.00
INC 0.87 0.75 1.02 -1.76 0.08
South India 1.21 1.08 1.36 3.28 0.00
East & Northeast India 0.94 0.81 1.08 -0.87 0.38
West India 1.02 0.89 1.16 0.27 0.79
Hindu 0.82 0.73 0.92 -3.26 0.00
Muslim 1.18 1.01 1.37 2.03 0.04
Standard errors: MLE
vif(model_q11b_wider_1)
## Warning in vif.default(model_q11b_wider_1): No intercept: vifs may not be
## sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    8.228167  1        2.868478
## age_cb_new       10.386986  1        3.222885
## geo_citytier_in   2.744338  1        1.656604
## p_party_new       3.379798  2        1.355884
## geo_region_in_cb  3.363120  3        1.224025
## religion_in_new   5.704229  2        1.545430
## q11b_2 wider morality 
model_q11b_wider_2 <-mint11_df_4 %>%  glm(q11b_wider ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+partisan_index_party+geo_region_in_cb+religion_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q11b_wider_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Partisan index*party","South India", "East & Northeast India", "West India","Hindu","Muslim")

summary(model_q11b_wider_2)
## 
## Call:
## glm(formula = q11b_wider ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + partisan_index_party + geo_region_in_cb + religion_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.12312    0.13652  -0.902 0.367133    
## Partisan_Index          0.11605    0.03604   3.220 0.001282 ** 
## age                    -0.01482    0.03164  -0.468 0.639529    
## Rest_Tiers             -0.09449    0.04848  -1.949 0.051283 .  
## BJP                    -0.10556    0.14433  -0.731 0.464529    
## INC                    -0.11968    0.07781  -1.538 0.124026    
## Partisan index*party   -0.06613    0.05352  -1.236 0.216591    
## South India             0.19615    0.05903   3.323 0.000891 ***
## East & Northeast India -0.06074    0.07232  -0.840 0.400940    
## West India              0.01937    0.06731   0.288 0.773462    
## Hindu                  -0.19660    0.06088  -3.229 0.001241 ** 
## Muslim                  0.16598    0.07943   2.090 0.036651 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 10593  on 7869  degrees of freedom
## Residual deviance: 10435  on 7858  degrees of freedom
## AIC: 10523
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q11b_wider_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 7870
Dependent variable q11b_wider
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 157.85
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.01
AIC 10522.91
BIC 10606.56
exp(Est.) 2.5% 97.5% z val. p
intercept 0.88 0.68 1.16 -0.90 0.37
Partisan_Index 1.12 1.05 1.21 3.22 0.00
age 0.99 0.93 1.05 -0.47 0.64
Rest_Tiers 0.91 0.83 1.00 -1.95 0.05
BJP 0.90 0.68 1.19 -0.73 0.46
INC 0.89 0.76 1.03 -1.54 0.12
Partisan index*party 0.94 0.84 1.04 -1.24 0.22
South India 1.22 1.08 1.37 3.32 0.00
East & Northeast India 0.94 0.82 1.08 -0.84 0.40
West India 1.02 0.89 1.16 0.29 0.77
Hindu 0.82 0.73 0.93 -3.23 0.00
Muslim 1.18 1.01 1.38 2.09 0.04
Standard errors: MLE
vif(model_q11b_wider_2)
## Warning in vif.default(model_q11b_wider_2): No intercept: vifs may not be
## sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index       11.573288  1        3.401954
## age_cb_new           10.395252  1        3.224167
## geo_citytier_in       2.744730  1        1.656723
## p_party_new          21.132180  2        2.144056
## partisan_index_party 11.437146  1        3.381885
## geo_region_in_cb      3.367140  3        1.224269
## religion_in_new       5.721244  2        1.546581
# Set 5: (Q10 < dissatisfied with terrorism) 

## DV <- age + partisanship + city tier + region (4) + religion + party + dissatisfied. 
model_q10_2 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new+q3_4, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim","Terrorism_Dissatisfied")

summary(model_q10_2)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new + q3_4, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept               0.05046    0.11532   0.438  0.66166    
## Partisan_Index         -0.46237    0.02616 -17.674  < 2e-16 ***
## age                     0.17783    0.02707   6.570 5.03e-11 ***
## Rest_Tiers             -0.10682    0.04013  -2.662  0.00777 ** 
## BJP                     0.10527    0.04991   2.109  0.03494 *  
## INC                    -0.01252    0.07094  -0.176  0.85993    
## South India            -0.38718    0.05199  -7.447 9.54e-14 ***
## East & Northeast India  0.06054    0.05660   1.070  0.28482    
## West India              0.09307    0.05348   1.740  0.08180 .  
## Hindu                   0.28333    0.05539   5.115 3.14e-07 ***
## Muslim                 -0.37653    0.08096  -4.651 3.30e-06 ***
## Terrorism_Dissatisfied -0.10237    0.01909  -5.363 8.20e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15271  on 12422  degrees of freedom
## AIC: 15192
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 1011.82
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15191.54
BIC 15280.68
exp(Est.) 2.5% 97.5% z val. p
intercept 1.05 0.84 1.32 0.44 0.66
Partisan_Index 0.63 0.60 0.66 -17.67 0.00
age 1.19 1.13 1.26 6.57 0.00
Rest_Tiers 0.90 0.83 0.97 -2.66 0.01
BJP 1.11 1.01 1.23 2.11 0.03
INC 0.99 0.86 1.13 -0.18 0.86
South India 0.68 0.61 0.75 -7.45 0.00
East & Northeast India 1.06 0.95 1.19 1.07 0.28
West India 1.10 0.99 1.22 1.74 0.08
Hindu 1.33 1.19 1.48 5.12 0.00
Muslim 0.69 0.59 0.80 -4.65 0.00
Terrorism_Dissatisfied 0.90 0.87 0.94 -5.36 0.00
Standard errors: MLE
vif(model_q10_2)
## Warning in vif.default(model_q10_2): No intercept: vifs may not be sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    6.805665  1        2.608767
## age_cb_new       11.109713  1        3.333124
## geo_citytier_in   2.611327  1        1.615960
## p_party_new       4.484380  2        1.455210
## geo_region_in_cb  2.916772  3        1.195319
## religion_in_new   7.531587  2        1.656615
## q3_4              4.793630  1        2.189436
## DV <- age + partisanship + city tier + region (2) + religion + party + dissatisfied.
model_q10_1 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb_new+religion_in_new+q3_4, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","SE","Hindu","Muslim","Terrorism_Dissatisfied")

summary(model_q10_1)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb_new + religion_in_new + q3_4, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept               0.05288    0.11252   0.470  0.63840    
## Partisan_Index         -0.46352    0.02606 -17.785  < 2e-16 ***
## age                     0.17325    0.02698   6.421 1.35e-10 ***
## Rest_Tiers             -0.11421    0.04002  -2.854  0.00432 ** 
## BJP                     0.13558    0.04963   2.732  0.00630 ** 
## INC                    -0.04090    0.07055  -0.580  0.56207    
## SE                     -0.23159    0.04009  -5.776 7.63e-09 ***
## Hindu                   0.31630    0.05497   5.754 8.74e-09 ***
## Muslim                 -0.34977    0.08057  -4.341 1.42e-05 ***
## Terrorism_Dissatisfied -0.10044    0.01905  -5.273 1.34e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15326  on 12424  degrees of freedom
## AIC: 15230
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 956.42
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15230.32
BIC 15304.60
exp(Est.) 2.5% 97.5% z val. p
intercept 1.05 0.85 1.31 0.47 0.64
Partisan_Index 0.63 0.60 0.66 -17.78 0.00
age 1.19 1.13 1.25 6.42 0.00
Rest_Tiers 0.89 0.82 0.96 -2.85 0.00
BJP 1.15 1.04 1.26 2.73 0.01
INC 0.96 0.84 1.10 -0.58 0.56
SE 0.79 0.73 0.86 -5.78 0.00
Hindu 1.37 1.23 1.53 5.75 0.00
Muslim 0.70 0.60 0.83 -4.34 0.00
Terrorism_Dissatisfied 0.90 0.87 0.94 -5.27 0.00
Standard errors: MLE
vif(model_q10_1)
## Warning in vif.default(model_q10_1): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        6.784445  1        2.604697
## age_cb_new           11.094830  1        3.330890
## geo_citytier_in       2.613490  1        1.616629
## p_party_new           4.408958  2        1.449052
## geo_region_in_cb_new  1.817544  1        1.348163
## religion_in_new       7.443501  2        1.651750
## q3_4                  4.797057  1        2.190218
## DV <- age + partisanship + city tier + bordering + religion + party + dissatisfied.


## DV <- age + partisanship + city tier + distance + religion + party + dissatisfied.
model_q10_3 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+hub_dist+religion_in_new+q3_4, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10_3$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Distance","Hindu","Muslim","Terrorism_Dissatisfied")

summary(model_q10_3)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + hub_dist + religion_in_new + q3_4, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                          Estimate Std. Error z value Pr(>|z|)    
## intercept               1.464e-01  1.167e-01   1.254  0.20984    
## Partisan_Index         -4.623e-01  2.606e-02 -17.741  < 2e-16 ***
## age                     1.726e-01  2.698e-02   6.396 1.59e-10 ***
## Rest_Tiers             -1.015e-01  4.017e-02  -2.526  0.01153 *  
## BJP                     1.356e-01  4.960e-02   2.734  0.00627 ** 
## INC                    -3.873e-02  7.057e-02  -0.549  0.58312    
## Distance               -2.123e-04  3.606e-05  -5.887 3.93e-09 ***
## Hindu                   3.113e-01  5.500e-02   5.659 1.52e-08 ***
## Muslim                 -3.503e-01  8.058e-02  -4.348 1.37e-05 ***
## Terrorism_Dissatisfied -9.975e-02  1.905e-02  -5.236 1.64e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15325  on 12424  degrees of freedom
## AIC: 15228
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 957.70
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15227.53
BIC 15301.82
exp(Est.) 2.5% 97.5% z val. p
intercept 1.16 0.92 1.46 1.25 0.21
Partisan_Index 0.63 0.60 0.66 -17.74 0.00
age 1.19 1.13 1.25 6.40 0.00
Rest_Tiers 0.90 0.84 0.98 -2.53 0.01
BJP 1.15 1.04 1.26 2.73 0.01
INC 0.96 0.84 1.10 -0.55 0.58
Distance 1.00 1.00 1.00 -5.89 0.00
Hindu 1.37 1.23 1.52 5.66 0.00
Muslim 0.70 0.60 0.82 -4.35 0.00
Terrorism_Dissatisfied 0.91 0.87 0.94 -5.24 0.00
Standard errors: MLE
vif(model_q10_3)
## Warning in vif.default(model_q10_3): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.780030  1        2.603849
## age_cb_new      11.093632  1        3.330710
## geo_citytier_in  2.631937  1        1.622325
## p_party_new      4.406691  2        1.448866
## hub_dist         4.070893  1        2.017645
## religion_in_new  7.451834  2        1.652212
## q3_4             4.797720  1        2.190370
# Set 6: (Q11b < dissatisfied with terrorism) 

## DV <- age + partisanship + city tier + region (4) + religion + party + dissatisfied. 
## DV <- age + partisanship + city tier + region (2) + religion + party + dissatisfied.
## DV <- age + partisanship + city tier + bordering + religion + party + dissatisfied.
## DV <- age + partisanship + city tier + distance + religion + party + dissatisfied.


# Set 7: (Q11 < cricket) 

## DV <- age + partisanship + city tier + region (4) + religion + party + cricket. 

model_10c_1 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb_new+religion_in_new+q7_5, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10c_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","SE","Hindu","Muslim","Cricket")

summary(model_10c_1)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb_new + religion_in_new + q7_5, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.78631    0.11980  -6.563 5.26e-11 ***
## Partisan_Index -0.47241    0.02601 -18.160  < 2e-16 ***
## age             0.18422    0.02707   6.805 1.01e-11 ***
## Rest_Tiers     -0.11681    0.04015  -2.909 0.003622 ** 
## BJP             0.16837    0.04863   3.462 0.000536 ***
## INC            -0.06695    0.07060  -0.948 0.342987    
## SE             -0.21167    0.04027  -5.256 1.47e-07 ***
## Hindu           0.32293    0.05491   5.881 4.07e-09 ***
## Muslim         -0.37922    0.08042  -4.716 2.41e-06 ***
## Cricket         0.40925    0.03913  10.458  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15245  on 12424  degrees of freedom
## AIC: 15157
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10c_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 1037.90
Pseudo-R² (Cragg-Uhler) 0.11
Pseudo-R² (McFadden) 0.06
AIC 15156.57
BIC 15230.85
exp(Est.) 2.5% 97.5% z val. p
intercept 0.46 0.36 0.58 -6.56 0.00
Partisan_Index 0.62 0.59 0.66 -18.16 0.00
age 1.20 1.14 1.27 6.80 0.00
Rest_Tiers 0.89 0.82 0.96 -2.91 0.00
BJP 1.18 1.08 1.30 3.46 0.00
INC 0.94 0.81 1.07 -0.95 0.34
SE 0.81 0.75 0.88 -5.26 0.00
Hindu 1.38 1.24 1.54 5.88 0.00
Muslim 0.68 0.58 0.80 -4.72 0.00
Cricket 1.51 1.39 1.63 10.46 0.00
Standard errors: MLE
vif(model_10c_1)
## Warning in vif.default(model_10c_1): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        6.710081  1        2.590382
## age_cb_new           11.083415  1        3.329176
## geo_citytier_in       2.611301  1        1.615952
## p_party_new           4.096095  2        1.422632
## geo_region_in_cb_new  1.820680  1        1.349326
## religion_in_new       7.203118  2        1.638250
## q7_5                 10.214372  1        3.195993
## q9_2 DV <- age + partisanship + city tier + region (4) + religion + party
model_10c_2 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new+q7_5, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10c_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim","Cricket")

summary(model_10c_2)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new + q7_5, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.77393    0.12243  -6.321 2.59e-10 ***
## Partisan_Index         -0.47184    0.02610 -18.076  < 2e-16 ***
## age                     0.18835    0.02714   6.939 3.95e-12 ***
## Rest_Tiers             -0.10994    0.04025  -2.731   0.0063 ** 
## BJP                     0.14228    0.04887   2.911   0.0036 ** 
## INC                    -0.04208    0.07093  -0.593   0.5530    
## South India            -0.35619    0.05221  -6.822 8.98e-12 ***
## East & Northeast India  0.05884    0.05680   1.036   0.3003    
## West India              0.08734    0.05365   1.628   0.1035    
## Hindu                   0.29326    0.05531   5.302 1.14e-07 ***
## Muslim                 -0.40441    0.08078  -5.006 5.55e-07 ***
## Cricket                 0.39683    0.03923  10.115  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15198  on 12422  degrees of freedom
## AIC: 15125
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10c_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 1085.21
Pseudo-R² (Cragg-Uhler) 0.11
Pseudo-R² (McFadden) 0.07
AIC 15124.98
BIC 15214.12
exp(Est.) 2.5% 97.5% z val. p
intercept 0.46 0.36 0.59 -6.32 0.00
Partisan_Index 0.62 0.59 0.66 -18.08 0.00
age 1.21 1.14 1.27 6.94 0.00
Rest_Tiers 0.90 0.83 0.97 -2.73 0.01
BJP 1.15 1.05 1.27 2.91 0.00
INC 0.96 0.83 1.10 -0.59 0.55
South India 0.70 0.63 0.78 -6.82 0.00
East & Northeast India 1.06 0.95 1.19 1.04 0.30
West India 1.09 0.98 1.21 1.63 0.10
Hindu 1.34 1.20 1.49 5.30 0.00
Muslim 0.67 0.57 0.78 -5.01 0.00
Cricket 1.49 1.38 1.61 10.11 0.00
Standard errors: MLE
vif(model_10c_2)
## Warning in vif.default(model_10c_2): No intercept: vifs may not be sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    6.730975  1        2.594412
## age_cb_new       11.096739  1        3.331177
## geo_citytier_in   2.608948  1        1.615224
## p_party_new       4.157647  2        1.427946
## geo_region_in_cb  2.928743  3        1.196135
## religion_in_new   7.295276  2        1.643465
## q7_5             10.232139  1        3.198771
## q9_3 DV <- age + partisanship + city tier + distance + religion + party.

model_q10c_3 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+hub_dist+religion_in_new+q7_5, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10c_3$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Distance","Hindu","Muslim","Cricket")

summary(model_q10c_3)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + hub_dist + religion_in_new + q7_5, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## intercept      -6.960e-01  1.240e-01  -5.612 2.00e-08 ***
## Partisan_Index -4.712e-01  2.601e-02 -18.119  < 2e-16 ***
## age             1.835e-01  2.707e-02   6.780 1.20e-11 ***
## Rest_Tiers     -1.046e-01  4.030e-02  -2.597 0.009413 ** 
## BJP             1.665e-01  4.862e-02   3.424 0.000617 ***
## INC            -6.494e-02  7.062e-02  -0.920 0.357797    
## Distance       -1.994e-04  3.623e-05  -5.504 3.72e-08 ***
## Hindu           3.178e-01  5.494e-02   5.784 7.29e-09 ***
## Muslim         -3.797e-01  8.043e-02  -4.720 2.35e-06 ***
## Cricket         4.109e-01  3.912e-02  10.504  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15242  on 12424  degrees of freedom
## AIC: 15152
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10c_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 1040.56
Pseudo-R² (Cragg-Uhler) 0.11
Pseudo-R² (McFadden) 0.06
AIC 15152.44
BIC 15226.73
exp(Est.) 2.5% 97.5% z val. p
intercept 0.50 0.39 0.64 -5.61 0.00
Partisan_Index 0.62 0.59 0.66 -18.12 0.00
age 1.20 1.14 1.27 6.78 0.00
Rest_Tiers 0.90 0.83 0.97 -2.60 0.01
BJP 1.18 1.07 1.30 3.42 0.00
INC 0.94 0.82 1.08 -0.92 0.36
Distance 1.00 1.00 1.00 -5.50 0.00
Hindu 1.37 1.23 1.53 5.78 0.00
Muslim 0.68 0.58 0.80 -4.72 0.00
Cricket 1.51 1.40 1.63 10.50 0.00
Standard errors: MLE
vif(model_q10c_3)
## Warning in vif.default(model_q10c_3): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.705824  1        2.589561
## age_cb_new      11.082580  1        3.329051
## geo_citytier_in  2.629426  1        1.621551
## p_party_new      4.097809  2        1.422781
## hub_dist         4.078403  1        2.019506
## religion_in_new  7.209944  2        1.638638
## q7_5            10.207034  1        3.194845
## q9_4 DV <- age + partisanship + city tier + bordering + religion + party

model_10c_4 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+bordering+religion_in_new+q7_5, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10c_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","bordering","Hindu","Muslim","Cricket")


summary(model_10c_4)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + bordering + religion_in_new + q7_5, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.80198    0.18707  -4.287 1.81e-05 ***
## Partisan_Index -0.46918    0.02596 -18.071  < 2e-16 ***
## age             0.18609    0.02705   6.879 6.02e-12 ***
## Rest_Tiers     -0.13522    0.04130  -3.274  0.00106 ** 
## BJP             0.21116    0.04790   4.408 1.04e-05 ***
## INC            -0.06728    0.07046  -0.955  0.33968    
## bordering      -0.06064    0.07183  -0.844  0.39853    
## Hindu           0.32787    0.05485   5.977 2.27e-09 ***
## Muslim         -0.36883    0.08031  -4.593 4.37e-06 ***
## Cricket         0.41935    0.03905  10.739  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15272  on 12424  degrees of freedom
## AIC: 15186
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10c_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 1010.95
Pseudo-R² (Cragg-Uhler) 0.11
Pseudo-R² (McFadden) 0.06
AIC 15186.05
BIC 15260.34
exp(Est.) 2.5% 97.5% z val. p
intercept 0.45 0.31 0.65 -4.29 0.00
Partisan_Index 0.63 0.59 0.66 -18.07 0.00
age 1.20 1.14 1.27 6.88 0.00
Rest_Tiers 0.87 0.81 0.95 -3.27 0.00
BJP 1.24 1.12 1.36 4.41 0.00
INC 0.93 0.81 1.07 -0.95 0.34
bordering 0.94 0.82 1.08 -0.84 0.40
Hindu 1.39 1.25 1.55 5.98 0.00
Muslim 0.69 0.59 0.81 -4.59 0.00
Cricket 1.52 1.41 1.64 10.74 0.00
Standard errors: MLE
vif(model_10c_4)
## Warning in vif.default(model_10c_4): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.696361  1        2.587733
## age_cb_new      11.095856  1        3.331044
## geo_citytier_in  2.771928  1        1.664911
## p_party_new      3.970333  2        1.411584
## bordering       51.321970  1        7.163935
## religion_in_new  7.204149  2        1.638308
## q7_5            10.192069  1        3.192502
# Set 8: (Q11 < restrain) 

##DV <- age + partisanship + city tier + region (4) + religion + party + restrain. 
#DV <- age + partisanship + city tier + region (2) + religion + party + restrain.
#DV <- age + partisanship + city tier + bordering + religion + party + restrain.
#DV <- age + partisanship + city tier + distance + religion + party + restrain.

model_10r_1 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb_new+religion_in_new+q7_1, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10r_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","SE","Hindu","Muslim","Restrain")

summary(model_10r_1)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb_new + religion_in_new + q7_1, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.42748    0.11876  -3.599 0.000319 ***
## Partisan_Index -0.48302    0.02593 -18.627  < 2e-16 ***
## age             0.18265    0.02698   6.771 1.28e-11 ***
## Rest_Tiers     -0.11369    0.04000  -2.842 0.004483 ** 
## BJP             0.19545    0.04837   4.040 5.34e-05 ***
## INC            -0.06753    0.07025  -0.961 0.336416    
## SE             -0.22973    0.04007  -5.733 9.87e-09 ***
## Hindu           0.34566    0.05468   6.322 2.59e-10 ***
## Muslim         -0.39034    0.08012  -4.872 1.10e-06 ***
## Restrain        0.17202    0.03889   4.423 9.71e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15335  on 12424  degrees of freedom
## AIC: 15240
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10r_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 947.91
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15240.47
BIC 15314.75
exp(Est.) 2.5% 97.5% z val. p
intercept 0.65 0.52 0.82 -3.60 0.00
Partisan_Index 0.62 0.59 0.65 -18.63 0.00
age 1.20 1.14 1.27 6.77 0.00
Rest_Tiers 0.89 0.83 0.97 -2.84 0.00
BJP 1.22 1.11 1.34 4.04 0.00
INC 0.93 0.81 1.07 -0.96 0.34
SE 0.79 0.73 0.86 -5.73 0.00
Hindu 1.41 1.27 1.57 6.32 0.00
Muslim 0.68 0.58 0.79 -4.87 0.00
Restrain 1.19 1.10 1.28 4.42 0.00
Standard errors: MLE
vif(model_10r_1)
## Warning in vif.default(model_10r_1): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        6.717425  1        2.591800
## age_cb_new           11.089832  1        3.330140
## geo_citytier_in       2.611485  1        1.616009
## p_party_new           4.078217  2        1.421077
## geo_region_in_cb_new  1.818336  1        1.348457
## religion_in_new       7.186341  2        1.637295
## q7_1                  9.659471  1        3.107969
#q9_2 DV <- age + partisanship + city tier + region (4) + religion + party
model_10r_2 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new+q7_1, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10r_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim","Restraint")

summary(model_10r_2)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new + q7_1, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                        Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.42036    0.12167  -3.455 0.000550 ***
## Partisan_Index         -0.48204    0.02603 -18.522  < 2e-16 ***
## age                     0.18707    0.02706   6.914 4.72e-12 ***
## Rest_Tiers             -0.10635    0.04011  -2.652 0.008008 ** 
## BJP                     0.16738    0.04863   3.442 0.000578 ***
## INC                    -0.04138    0.07061  -0.586 0.557810    
## South India            -0.37808    0.05199  -7.273 3.52e-13 ***
## East & Northeast India  0.05387    0.05657   0.952 0.340909    
## West India              0.09533    0.05348   1.782 0.074674 .  
## Hindu                   0.31431    0.05509   5.706 1.16e-08 ***
## Muslim                 -0.41592    0.08049  -5.168 2.37e-07 ***
## Restraint               0.16129    0.03900   4.135 3.54e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15283  on 12422  degrees of freedom
## AIC: 15205
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10r_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 999.87
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15205.11
BIC 15294.25
exp(Est.) 2.5% 97.5% z val. p
intercept 0.66 0.52 0.83 -3.46 0.00
Partisan_Index 0.62 0.59 0.65 -18.52 0.00
age 1.21 1.14 1.27 6.91 0.00
Rest_Tiers 0.90 0.83 0.97 -2.65 0.01
BJP 1.18 1.07 1.30 3.44 0.00
INC 0.96 0.84 1.10 -0.59 0.56
South India 0.69 0.62 0.76 -7.27 0.00
East & Northeast India 1.06 0.94 1.18 0.95 0.34
West India 1.10 0.99 1.22 1.78 0.07
Hindu 1.37 1.23 1.53 5.71 0.00
Muslim 0.66 0.56 0.77 -5.17 0.00
Restraint 1.18 1.09 1.27 4.14 0.00
Standard errors: MLE
vif(model_10r_2)
## Warning in vif.default(model_10r_2): No intercept: vifs may not be sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    6.738170  1        2.595798
## age_cb_new       11.106370  1        3.332622
## geo_citytier_in   2.609164  1        1.615291
## p_party_new       4.141460  2        1.426554
## geo_region_in_cb  2.923550  3        1.195781
## religion_in_new   7.278213  2        1.642503
## q7_1              9.678312  1        3.110999
#q9_3 DV <- age + partisanship + city tier + distance + religion + party.

model_q10r_3 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+hub_dist+religion_in_new+q7_1, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10r_3$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Distance","Hindu","Muslim","Restraint")

summary(model_q10r_3)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + hub_dist + religion_in_new + q7_1, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## intercept      -3.306e-01  1.230e-01  -2.688  0.00718 ** 
## Partisan_Index -4.817e-01  2.592e-02 -18.581  < 2e-16 ***
## age             1.818e-01  2.697e-02   6.741 1.57e-11 ***
## Rest_Tiers     -1.010e-01  4.015e-02  -2.515  0.01189 *  
## BJP             1.948e-01  4.836e-02   4.028 5.63e-05 ***
## INC            -6.535e-02  7.027e-02  -0.930  0.35236    
## Distance       -2.110e-04  3.604e-05  -5.854 4.81e-09 ***
## Hindu           3.405e-01  5.471e-02   6.225 4.82e-10 ***
## Muslim         -3.907e-01  8.013e-02  -4.875 1.09e-06 ***
## Restraint       1.708e-01  3.889e-02   4.391 1.13e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15334  on 12424  degrees of freedom
## AIC: 15237
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10r_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 949.30
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15237.42
BIC 15311.70
exp(Est.) 2.5% 97.5% z val. p
intercept 0.72 0.56 0.91 -2.69 0.01
Partisan_Index 0.62 0.59 0.65 -18.58 0.00
age 1.20 1.14 1.26 6.74 0.00
Rest_Tiers 0.90 0.84 0.98 -2.52 0.01
BJP 1.22 1.11 1.34 4.03 0.00
INC 0.94 0.82 1.08 -0.93 0.35
Distance 1.00 1.00 1.00 -5.85 0.00
Hindu 1.41 1.26 1.56 6.22 0.00
Muslim 0.68 0.58 0.79 -4.88 0.00
Restraint 1.19 1.10 1.28 4.39 0.00
Standard errors: MLE
vif(model_q10r_3)
## Warning in vif.default(model_q10r_3): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.712870  1        2.590921
## age_cb_new      11.088546  1        3.329947
## geo_citytier_in  2.629877  1        1.621689
## p_party_new      4.079264  2        1.421168
## hub_dist         4.072915  1        2.018146
## religion_in_new  7.193276  2        1.637690
## q7_1             9.661287  1        3.108261
#q9_4 DV <- age + partisanship + city tier + bordering + religion + party
model_10r_4 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+bordering+religion_in_new+q7_1, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10r_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","bordering","Hindu","Muslim","Restraint")


summary(model_10r_4)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + bordering + religion_in_new + q7_1, family = binomial, 
##     data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.44792    0.18670  -2.399  0.01644 *  
## Partisan_Index -0.47981    0.02588 -18.543  < 2e-16 ***
## age             0.18444    0.02695   6.844 7.70e-12 ***
## Rest_Tiers     -0.13266    0.04113  -3.225  0.00126 ** 
## BJP             0.24282    0.04762   5.099 3.42e-07 ***
## INC            -0.06798    0.07011  -0.970  0.33222    
## bordering      -0.05808    0.07161  -0.811  0.41732    
## Hindu           0.35199    0.05461   6.445 1.15e-10 ***
## Muslim         -0.37899    0.07999  -4.738 2.16e-06 ***
## Restraint       0.17483    0.03883   4.502 6.72e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15367  on 12424  degrees of freedom
## AIC: 15276
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10r_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 915.64
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15275.68
BIC 15349.96
exp(Est.) 2.5% 97.5% z val. p
intercept 0.64 0.44 0.92 -2.40 0.02
Partisan_Index 0.62 0.59 0.65 -18.54 0.00
age 1.20 1.14 1.27 6.84 0.00
Rest_Tiers 0.88 0.81 0.95 -3.23 0.00
BJP 1.27 1.16 1.40 5.10 0.00
INC 0.93 0.81 1.07 -0.97 0.33
bordering 0.94 0.82 1.09 -0.81 0.42
Hindu 1.42 1.28 1.58 6.45 0.00
Muslim 0.68 0.59 0.80 -4.74 0.00
Restraint 1.19 1.10 1.29 4.50 0.00
Standard errors: MLE
vif(model_10r_4)
## Warning in vif.default(model_10r_4): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.702512  1        2.588921
## age_cb_new      11.103402  1        3.332177
## geo_citytier_in  2.771898  1        1.664902
## p_party_new      3.950403  2        1.409809
## bordering       51.415419  1        7.170455
## religion_in_new  7.189259  2        1.637461
## q7_1             9.658804  1        3.107862
#Set 9: robustness, caste (Q11 < caste) 

#DV <- age + partisanship + city tier + region (4) + religion + party + caste. 
#DV <- age + partisanship + city tier + region (2) + religion + party + caste.
#DV <- age + partisanship + city tier + bordering + religion + party + caste.
#DV <- age + partisanship + city tier + distance + religion + party + caste.
model_10cas_1 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb_new+religion_in_new+caste_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10cas_1$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","SE","Hindu","Muslim","Caste")

summary(model_10cas_1)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb_new + religion_in_new + caste_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.15524    0.10789  -1.439  0.15018    
## Partisan_Index -0.47829    0.02590 -18.468  < 2e-16 ***
## age             0.18016    0.02712   6.642 3.10e-11 ***
## Rest_Tiers     -0.11040    0.04003  -2.758  0.00581 ** 
## BJP             0.19123    0.04862   3.933 8.38e-05 ***
## INC            -0.07197    0.07022  -1.025  0.30535    
## SE             -0.23026    0.04017  -5.732 9.90e-09 ***
## Hindu           0.34237    0.05502   6.223 4.88e-10 ***
## Muslim         -0.39543    0.08035  -4.921 8.60e-07 ***
## Caste          -0.01126    0.01800  -0.626  0.53159    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15354  on 12424  degrees of freedom
## AIC: 15261
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10cas_1, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 928.72
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15261.29
BIC 15335.57
exp(Est.) 2.5% 97.5% z val. p
intercept 0.86 0.69 1.06 -1.44 0.15
Partisan_Index 0.62 0.59 0.65 -18.47 0.00
age 1.20 1.14 1.26 6.64 0.00
Rest_Tiers 0.90 0.83 0.97 -2.76 0.01
BJP 1.21 1.10 1.33 3.93 0.00
INC 0.93 0.81 1.07 -1.03 0.31
SE 0.79 0.73 0.86 -5.73 0.00
Hindu 1.41 1.26 1.57 6.22 0.00
Muslim 0.67 0.58 0.79 -4.92 0.00
Caste 0.99 0.95 1.02 -0.63 0.53
Standard errors: MLE
vif(model_10cas_1)
## Warning in vif.default(model_10cas_1): No intercept: vifs may not be sensible.
##                           GVIF Df GVIF^(1/(2*Df))
## partisan_index        6.710504  1        2.590464
## age_cb_new           11.232543  1        3.351499
## geo_citytier_in       2.620174  1        1.618695
## p_party_new           4.125800  2        1.425204
## geo_region_in_cb_new  1.829482  1        1.352584
## religion_in_new       7.291667  2        1.643262
## caste_in_new          3.795605  1        1.948231
#q9_2 DV <- age + partisanship + city tier + region (4) + religion + party
model_10cas_2 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+geo_region_in_cb+religion_in_new+caste_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10cas_2$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","South India", "East & Northeast India", "West India","Hindu","Muslim","Caste")

summary(model_10cas_2)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + geo_region_in_cb + religion_in_new + caste_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                         Estimate Std. Error z value Pr(>|z|)    
## intercept              -0.168895   0.110721  -1.525 0.127157    
## Partisan_Index         -0.477559   0.025994 -18.372  < 2e-16 ***
## age                     0.184103   0.027210   6.766 1.32e-11 ***
## Rest_Tiers             -0.103561   0.040139  -2.580 0.009879 ** 
## BJP                     0.163717   0.048865   3.350 0.000807 ***
## INC                    -0.044632   0.070586  -0.632 0.527183    
## South India            -0.384265   0.052089  -7.377 1.62e-13 ***
## East & Northeast India  0.057875   0.056568   1.023 0.306257    
## West India              0.092761   0.053431   1.736 0.082546 .  
## Hindu                   0.311602   0.055427   5.622 1.89e-08 ***
## Muslim                 -0.420229   0.080752  -5.204 1.95e-07 ***
## Caste                  -0.007191   0.018045  -0.399 0.690244    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15300  on 12422  degrees of freedom
## AIC: 15224
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10cas_2, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(11) 982.92
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15223.92
BIC 15313.06
exp(Est.) 2.5% 97.5% z val. p
intercept 0.84 0.68 1.05 -1.53 0.13
Partisan_Index 0.62 0.59 0.65 -18.37 0.00
age 1.20 1.14 1.27 6.77 0.00
Rest_Tiers 0.90 0.83 0.98 -2.58 0.01
BJP 1.18 1.07 1.30 3.35 0.00
INC 0.96 0.83 1.10 -0.63 0.53
South India 0.68 0.61 0.75 -7.38 0.00
East & Northeast India 1.06 0.95 1.18 1.02 0.31
West India 1.10 0.99 1.22 1.74 0.08
Hindu 1.37 1.23 1.52 5.62 0.00
Muslim 0.66 0.56 0.77 -5.20 0.00
Caste 0.99 0.96 1.03 -0.40 0.69
Standard errors: MLE
vif(model_10cas_2)
## Warning in vif.default(model_10cas_2): No intercept: vifs may not be sensible.
##                       GVIF Df GVIF^(1/(2*Df))
## partisan_index    6.731195  1        2.594455
## age_cb_new       11.250455  1        3.354170
## geo_citytier_in   2.618440  1        1.618159
## p_party_new       4.187163  2        1.430474
## geo_region_in_cb  2.938522  3        1.196800
## religion_in_new   7.385025  2        1.648496
## caste_in_new      3.794444  1        1.947933
#q9_3 DV <- age + partisanship + city tier + distance + religion + party.

model_q10cas_3 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+hub_dist+religion_in_new+caste_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_q10cas_3$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","Distance","Hindu","Muslim","Caste")

summary(model_q10cas_3)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + hub_dist + religion_in_new + caste_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## intercept      -6.013e-02  1.120e-01  -0.537    0.591    
## Partisan_Index -4.770e-01  2.589e-02 -18.424  < 2e-16 ***
## age             1.793e-01  2.712e-02   6.611 3.82e-11 ***
## Rest_Tiers     -9.767e-02  4.017e-02  -2.432    0.015 *  
## BJP             1.906e-01  4.860e-02   3.920 8.84e-05 ***
## INC            -6.973e-02  7.023e-02  -0.993    0.321    
## Distance       -2.123e-04  3.613e-05  -5.875 4.24e-09 ***
## Hindu           3.374e-01  5.504e-02   6.129 8.83e-10 ***
## Muslim         -3.956e-01  8.036e-02  -4.923 8.53e-07 ***
## Caste          -1.075e-02  1.800e-02  -0.597    0.550    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15352  on 12424  degrees of freedom
## AIC: 15258
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_q10cas_3, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 930.37
Pseudo-R² (Cragg-Uhler) 0.10
Pseudo-R² (McFadden) 0.06
AIC 15257.98
BIC 15332.26
exp(Est.) 2.5% 97.5% z val. p
intercept 0.94 0.76 1.17 -0.54 0.59
Partisan_Index 0.62 0.59 0.65 -18.42 0.00
age 1.20 1.13 1.26 6.61 0.00
Rest_Tiers 0.91 0.84 0.98 -2.43 0.02
BJP 1.21 1.10 1.33 3.92 0.00
INC 0.93 0.81 1.07 -0.99 0.32
Distance 1.00 1.00 1.00 -5.87 0.00
Hindu 1.40 1.26 1.56 6.13 0.00
Muslim 0.67 0.58 0.79 -4.92 0.00
Caste 0.99 0.96 1.02 -0.60 0.55
Standard errors: MLE
vif(model_q10cas_3)
## Warning in vif.default(model_q10cas_3): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.705690  1        2.589535
## age_cb_new      11.232633  1        3.351512
## geo_citytier_in  2.637213  1        1.623950
## p_party_new      4.126523  2        1.425267
## hub_dist         4.099425  1        2.024704
## religion_in_new  7.296794  2        1.643550
## caste_in_new     3.796486  1        1.948457
#q9_4 DV <- age + partisanship + city tier + bordering + religion + party
model_10cas_4 <-mint11_df_1 %>%  glm(q10 ~ partisan_index+age_cb_new+ geo_citytier_in+ p_party_new+bordering+religion_in_new+caste_in_new, data=., family = binomial,weight)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
names(model_10cas_4$coefficients) <-  c("intercept","Partisan_Index","age","Rest_Tiers","BJP","INC","bordering","Hindu","Muslim","Caste")


summary(model_10cas_4)
## 
## Call:
## glm(formula = q10 ~ partisan_index + age_cb_new + geo_citytier_in + 
##     p_party_new + bordering + religion_in_new + caste_in_new, 
##     family = binomial, data = ., weights = weight)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## intercept      -0.15464    0.17951  -0.861  0.38901    
## Partisan_Index -0.47470    0.02584 -18.371  < 2e-16 ***
## age             0.18340    0.02710   6.768 1.30e-11 ***
## Rest_Tiers     -0.12872    0.04117  -3.127  0.00177 ** 
## BJP             0.23627    0.04793   4.929 8.26e-07 ***
## INC            -0.07346    0.07007  -1.048  0.29441    
## bordering      -0.05991    0.07152  -0.838  0.40222    
## Hindu           0.34567    0.05496   6.290 3.18e-10 ***
## Muslim         -0.38687    0.08022  -4.823 1.42e-06 ***
## Caste          -0.01921    0.01796  -1.070  0.28470    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 16283  on 12433  degrees of freedom
## Residual deviance: 15386  on 12424  degrees of freedom
## AIC: 15297
## 
## Number of Fisher Scoring iterations: 4
summ(model = model_10cas_4, exp = TRUE)
## Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Observations 12434
Dependent variable q10
Type Generalized linear model
Family binomial
Link logit
𝛘²(9) 896.50
Pseudo-R² (Cragg-Uhler) 0.09
Pseudo-R² (McFadden) 0.05
AIC 15296.68
BIC 15370.97
exp(Est.) 2.5% 97.5% z val. p
intercept 0.86 0.60 1.22 -0.86 0.39
Partisan_Index 0.62 0.59 0.65 -18.37 0.00
age 1.20 1.14 1.27 6.77 0.00
Rest_Tiers 0.88 0.81 0.95 -3.13 0.00
BJP 1.27 1.15 1.39 4.93 0.00
INC 0.93 0.81 1.07 -1.05 0.29
bordering 0.94 0.82 1.08 -0.84 0.40
Hindu 1.41 1.27 1.57 6.29 0.00
Muslim 0.68 0.58 0.79 -4.82 0.00
Caste 0.98 0.95 1.02 -1.07 0.28
Standard errors: MLE
vif(model_10cas_4)
## Warning in vif.default(model_10cas_4): No intercept: vifs may not be sensible.
##                      GVIF Df GVIF^(1/(2*Df))
## partisan_index   6.693905  1        2.587258
## age_cb_new      11.244785  1        3.353324
## geo_citytier_in  2.782756  1        1.668160
## p_party_new      4.008663  2        1.414979
## bordering       51.374073  1        7.167571
## religion_in_new  7.296877  2        1.643555
## caste_in_new     3.783423  1        1.945102