options(digits =2)rm(list=ls())## Install "pacman" package if not installed# (remove the # symbol from the line below):# install.packages("pacman")## Load R packages:pacman::p_load(data.table, tidyverse, haven, labelled, vtable, psych, scales, weights, clipr, forcats, stargazer, ggthemes, ggcharts, geomtextpath, corrplot, tm, readxl, arsenal)## Import dataset:#ds <- read_excel("~/Desktop/oxford/data/tanzania/Tanzania Data Entry.xlsx")ds <-fread("~/Desktop/oxford/data/tanzania/Tanzania Data Entry - Sheet1.csv")
4 4m 4 7 Advance level
23 8 1 7 1
Bachelor Degree Certificate Certtificate Cheti Chuo
1 2 1 6 6
Chuo Ckikuu Chuo kikuu Chuo Kikuu Claiasa nne College
1 11 3 1 1
Darasa 7 Darasa 8 Darasa la 7 Darasa la Saba Darsa la 7
8 1 1 1 2
Darsa La 7 Darsa la saba Degree Degree-Shahada Didato channe
3 1 15 1 1
Digri/Shahada Diploma Elimu Msingi Form 4 Form 5
1 15 1 14 1
Form 6 Form Five Form Five 5 Form Four Form Four 4
2 2 2 73 3
Form Four 5 Form IV Form One 1 Form Six Form Three
1 1 1 14 1
Form Two Form Two 2 IV Kidato 4 Kidato cha 1
6 1 1 3 1
Kidato cha 4 Kidato cha 6 Kidato cha nne Kidato Cha seta Kidato Channe
1 2 2 1 1
Kidato chaune La 4 La 7 LA 7 La nne
1 3 7 8 4
La nne (4) La nne mkoloni La saba La saba 7 Lanne Mkoloni
1 1 17 8 2
Lasaba Msingi O Level Post Graduate Primary
1 3 1 1 1
Secondary Sekonorw Shadada Shahada Shahada yai
6 1 3 5 1
Shule Msiry Shule ya msingi Sokondal StaShahada Std VII
1 1 1 2 3
STD VII Uzamili VI VII Std
8 1 1 1
Section 2. Factor Analysis: Group fusion/identification (Version 1)
Display code
## Four ingroup fusion items:# I have a deep emotional bond with the [ingroup].ds$IGF01 <-as.numeric(ds$`Q11.1 Group Bonds`)# I am strong because of the [ingroup].ds$IGF02 <-as.numeric(ds$`Q11.2 Group Bonds`)# I make the [ingroup] strong. ds$IGF03 <-as.numeric(ds$`Q11.3 Group Bonds`)# I am one with the [ingroup]ds$IGF04 <-as.numeric(ds$`Q11.4 Group Bonds`)## Four outgroup fusion items:# I have a deep emotional bond with the [outgroup].ds$OGF01 <-as.numeric(ds$`Q11.5 Group Bonds`)# I am strong because of the [outgroup].ds$OGF02 <-as.numeric(ds$`Q11.6 Group Bonds`)# I make the [outgroup] strong. ds$OGF03 <-as.numeric(ds$`Q11.7 Group Bonds`)# I am one with the [outgroup].ds$OGF04 <-as.numeric(ds$`Q11.8 Group Bonds`)## Four ingroup identification items:# I identify with the [ingroup].ds$IGI01 <-as.numeric(ds$`Q11.9 Group Bonds`)# I have a lot in common with the [ingroup].ds$IGI02 <-as.numeric(ds$`Q11.10 Group Bonds`)# I connect with the values of the [ingroup].ds$IGI03 <-as.numeric(ds$`Q11.11 Group Bonds`)# I feel a sense of belonging with the [ingroup].ds$IGI04 <-as.numeric(ds$`Q11.12 Group Bonds`)## Four outgroup identification items:# I identify with the [outgroup]. ds$OGI01 <-as.numeric(ds$`Q11.13 Group Bonds`)# I have a lot in common with the [outgroup]. ds$OGI02 <-as.numeric(ds$`Q11.14 Group Bonds`)# I connect with the values of the [outgroup]. ds$OGI03 <-as.numeric(ds$`Q11.15 Group Bonds`)# I feel a sense of belonging with the [outgroup]. ds$OGI04 <-as.numeric(ds$`Q11.16 Group Bonds`)
Shorthand for item names: IG = Ingroup, OG = Outgroup F = Fusion, I = Identification So for example: IGF01 = “ingroup fusion: item 1” OGI04 = “outgroup identification: item 4”, and so on
The correlation plot above shows the correlation coefficients between the sixteen different items (eight for ingroup fusion/identification and eight for outgroup fusion/identification).
Parallel analysis suggests that the number of factors = 2 and the number of components = 2
Scree plot suggests a two factor structure. We will proceed with promax rotation, which assumes that the items are inter-correlated (that is, not independent from each other).
Call:
factanal(x = bonds, factors = 2, rotation = "promax")
Uniquenesses:
IGF01 IGF02 IGF03 IGF04 IGI01 IGI02 IGI03 IGI04 OGF01 OGF02 OGF03 OGF04 OGI01
0.56 0.56 0.70 0.65 0.68 0.85 0.77 0.81 0.39 0.52 0.45 0.58 0.32
OGI02 OGI03 OGI04
0.32 0.35 0.31
Loadings:
Factor1 Factor2
IGF01 0.694
IGF02 0.134 0.705
IGF03 0.537
IGF04 0.591
IGI01 0.534
IGI02 0.362
IGI03 -0.149 0.404
IGI04 -0.107 0.383
OGF01 0.776
OGF02 0.721
OGF03 0.758
OGF04 0.660
OGI01 0.841
OGI02 0.801
OGI03 0.803
OGI04 0.835
Factor1 Factor2
SS loadings 4.89 2.36
Proportion Var 0.31 0.15
Cumulative Var 0.31 0.45
Factor Correlations:
Factor1 Factor2
Factor1 1.000 0.376
Factor2 0.376 1.000
Test of the hypothesis that 2 factors are sufficient.
The chi square statistic is 305 on 89 degrees of freedom.
The p-value is 0.00000000000000000000000016
We want to split the ingroup/outgroup fusion/identification items into distinct factors. We can examine what the three and four factor solutions looks like.
Section 3. Factor Analysis: Group fusion/identification (Version 2)
The fourth item has been removed from each sub-scale:
Display code
## Remove 4th item from all subscales and retry:## New dataframe:bonds <-cbind.data.frame(ds$IGF01, ds$IGF02, ds$IGF03, ds$IGI01, ds$IGI02, ds$IGI03, ds$OGF01, ds$OGF02, ds$OGF03, ds$OGI01, ds$OGI02, ds$OGI03)names(bonds) <-sub('ds\\$', '', names(bonds))bonds <-na.omit(bonds)mtx1 <-cor(bonds[, c(1:12)])corrplot(mtx1, method ="number", number.cex =0.7,col=c("white", "darkred", "red","darkgrey", "blue", "darkblue"))
Display code
parallel <-fa.parallel(bonds)
Parallel analysis suggests that the number of factors = 2 and the number of components = 2
Two factor model:
Display code
# Two factor modelfit04 <-factanal(bonds, 2, rotation="promax")fit04
Call:
factanal(x = bonds, factors = 2, rotation = "promax")
Uniquenesses:
IGF01 IGF02 IGF03 IGI01 IGI02 IGI03 OGF01 OGF02 OGF03 OGI01 OGI02 OGI03
0.59 0.61 0.65 0.69 0.81 0.78 0.35 0.53 0.44 0.35 0.32 0.33
Loadings:
Factor1 Factor2
IGF01 0.664
IGF02 0.102 0.654
IGF03 0.587
IGI01 -0.108 0.510
IGI02 0.400
IGI03 -0.155 0.395
OGF01 0.810
OGF02 0.705
OGF03 0.764
OGI01 0.819
OGI02 0.808
OGI03 0.809
Factor1 Factor2
SS loadings 3.77 1.80
Proportion Var 0.31 0.15
Cumulative Var 0.31 0.46
Factor Correlations:
Factor1 Factor2
Factor1 1.000 0.369
Factor2 0.369 1.000
Test of the hypothesis that 2 factors are sufficient.
The chi square statistic is 142 on 43 degrees of freedom.
The p-value is 0.0000000000018
Three factor model
Display code
# Three factor model:fit05 <-factanal(bonds, 3, rotation="promax")fit05
Call:
factanal(x = bonds, factors = 3, rotation = "promax")
Uniquenesses:
IGF01 IGF02 IGF03 IGI01 IGI02 IGI03 OGF01 OGF02 OGF03 OGI01 OGI02 OGI03
0.58 0.59 0.66 0.69 0.81 0.78 0.25 0.51 0.28 0.35 0.22 0.26
Loadings:
Factor1 Factor2 Factor3
IGF01 0.189 -0.104 0.656
IGF02 0.184 0.671
IGF03 0.582
IGI01 0.508
IGI02 0.404
IGI03 -0.126 0.396
OGF01 0.818
OGF02 0.632 0.110
OGF03 0.916
OGI01 0.248 0.618
OGI02 0.851
OGI03 0.792
Factor1 Factor2 Factor3
SS loadings 2.04 1.80 1.80
Proportion Var 0.17 0.15 0.15
Cumulative Var 0.17 0.32 0.47
Factor Correlations:
Factor1 Factor2 Factor3
Factor1 1.000 -0.329 -0.753
Factor2 -0.329 1.000 0.360
Factor3 -0.753 0.360 1.000
Test of the hypothesis that 3 factors are sufficient.
The chi square statistic is 49 on 33 degrees of freedom.
The p-value is 0.036
Four factor model
Display code
# Four factor model:fit06 <-factanal(bonds, 4, rotation="promax")fit06
Call:
factanal(x = bonds, factors = 4, rotation = "promax")
Uniquenesses:
IGF01 IGF02 IGF03 IGI01 IGI02 IGI03 OGF01 OGF02 OGF03 OGI01 OGI02 OGI03
0.508 0.607 0.650 0.707 0.005 0.783 0.261 0.501 0.254 0.352 0.218 0.262
Loadings:
Factor1 Factor2 Factor3 Factor4
IGF01 0.160 0.754 -0.115
IGF02 0.186 -0.106 0.603
IGF03 0.587
IGI01 0.453
IGI02 1.024
IGI03 -0.130 0.334
OGF01 0.118 0.771
OGF02 0.153 0.587 0.101
OGF03 0.939
OGI01 0.664 0.190
OGI02 0.892
OGI03 0.834
Factor1 Factor2 Factor3 Factor4
SS loadings 2.02 1.92 1.61 1.094
Proportion Var 0.17 0.16 0.13 0.091
Cumulative Var 0.17 0.33 0.46 0.554
Factor Correlations:
Factor1 Factor2 Factor3 Factor4
Factor1 1.000 -0.243 -0.443 -0.295
Factor2 -0.243 1.000 0.309 0.767
Factor3 -0.443 0.309 1.000 0.311
Factor4 -0.295 0.767 0.311 1.000
Test of the hypothesis that 4 factors are sufficient.
The chi square statistic is 31 on 24 degrees of freedom.
The p-value is 0.14
FA basically suggests that ingroup / outgroup fusion/identification are not distinct factors. Only real split is between ingroup (identification + fusion) as one factor and outgroup (identification + fusion) as another factor. However, I’ll replicate the analysis as before - two constructs for ingroup fusion / identification and a single “bonds” construct for outgroup fusion+identification. Here is the reliability and inter-correlations of the three sub-scales:
## BCL and BBL items:# BCL_01:# Seek out opportunities to bridge social divisions with their opponents, enemies, opposition groups, or other outgroups. # Variables: Q6.1, Q7.1# BCL_02:# Demonstrate willingness to compromise with their opponents, enemies, opposition groups, or other outgroups. # Variables: Q6.2, Q7.2# BCL_03:# Try to understand and empathize with their opponents, enemies, opposition groups, or other outgroups. # Variables: Q6.3, Q7.3# BBL_01:# Represent the interests of the communities and groups that they belong to even at the cost of other groups.# Variables: Q6.4, Q7.4# BBL_02:# Focus on building stronger connections within the communities and groups they belong to rather than building stronger relationships with other groups across boundaries.# Variables: Q6.5, Q7.5# BBL_03:# Try to gain benefits for the communities and groups they belong to even at the expense of other groups.# Variables: Q6.6, Q7.6ds$ENDBCL01 <-as.numeric(ds$`Q6.1 Leadership Quality`)ds$ENDBCL02 <-as.numeric(ds$`Q6.2 Leadership Quality`)ds$ENDBCL03 <-as.numeric(ds$`Q6.3 Leadership Quality`)ds$ENDBBL01 <-as.numeric(ds$`Q6.4 Leadership Quality`)ds$ENDBBL02 <-as.numeric(ds$`Q6.5 Leadership Quality`)ds$ENDBBL03 <-as.numeric(ds$`Q6.6 Leadership Quality`)ds$EXPBCL01 <-as.numeric(ds$`Q7.1 Leadership Experience`)ds$EXPBCL02 <-as.numeric(ds$`Q7.2 Leadership Experience`)ds$EXPBCL03 <-as.numeric(ds$`Q7.3 Leadership Experience`)ds$EXPBBL01 <-as.numeric(ds$`Q7.4 Leadership Experience`)ds$EXPBBL02 <-as.numeric(ds$`Q7.5 Leadership Experience`)ds$EXPBBL03 <-as.numeric(ds$`Q7.6 Leadership Experience`)leadership <-cbind.data.frame(ds$ENDBCL01, ds$ENDBCL02, ds$ENDBCL03, ds$ENDBBL01, ds$ENDBBL02, ds$ENDBBL03, ds$EXPBCL01, ds$EXPBCL02, ds$EXPBCL03, ds$EXPBBL01, ds$EXPBBL02, ds$EXPBBL03)names(leadership) <-sub('ds\\$', '', names(leadership))leadership <-na.omit(leadership)mtx1 <-cor(leadership[, c(1:12)])
Shorthand for item names: END = Endorse, EXP = Experience BCL = BCL, BBL = BBL So for example: ENDBCL01 = “Endorsement of BCL, item 1” EXPBBL02 = “Experience of BBL, item 2”, and so on
The correlation plot above shows the correlation coefficients between the twelve different items (six for endorsement of BCL/BBL, and six for experience of BCL/BBL).
KMO and Bartlett’s test:
Display code
## Kaiser-Meyer-Olkin (KMO) test of factorabilityKMO(r=cor(leadership))
Call:
factanal(x = leadership, factors = 4, rotation = "promax")
Uniquenesses:
ENDBCL01 ENDBCL02 ENDBCL03 ENDBBL01 ENDBBL02 ENDBBL03 EXPBCL01 EXPBCL02
0.642 0.005 0.541 0.628 0.416 0.451 0.417 0.212
EXPBCL03 EXPBBL01 EXPBBL02 EXPBBL03
0.433 0.424 0.431 0.356
Loadings:
Factor1 Factor2 Factor3 Factor4
ENDBCL01 0.544 -0.150
ENDBCL02 0.261 0.855
ENDBCL03 0.334 0.226 0.352
ENDBBL01 0.198 0.513
ENDBBL02 -0.157 0.804
ENDBBL03 -0.151 0.726
EXPBCL01 0.812 -0.113
EXPBCL02 0.870 -0.133
EXPBCL03 0.754 0.116
EXPBBL01 0.112 0.737
EXPBBL02 0.737
EXPBBL03 -0.131 0.848 0.124
Factor1 Factor2 Factor3 Factor4
SS loadings 2.52 1.91 1.52 0.908
Proportion Var 0.21 0.16 0.13 0.076
Cumulative Var 0.21 0.37 0.50 0.572
Factor Correlations:
Factor1 Factor2 Factor3 Factor4
Factor1 1.000 0.2103 0.5197 0.175
Factor2 0.210 1.0000 -0.0591 -0.354
Factor3 0.520 -0.0591 1.0000 0.147
Factor4 0.175 -0.3541 0.1470 1.000
Test of the hypothesis that 4 factors are sufficient.
The chi square statistic is 41 on 24 degrees of freedom.
The p-value is 0.016
Again, FA structure does not really support a four factor Endorse/Experience BCL/BBL structure. I will still split the sub-scales into those four constructs.
## Four regression models predicting endorsement and experience of BCL / BBL:lm01 <-lm(Endorse_BCL~IG_Fusion+IG_Identification+OG_Bonds+Age+Female+Married+`SES-`,data = ds)lm02 <-lm(Experience_BCL~IG_Fusion+IG_Identification+OG_Bonds+Age+Female+Married+`SES-`, data = ds)lm03 <-lm(Endorse_BBL~IG_Fusion+IG_Identification+OG_Bonds+Age+Female+Married+`SES-`, data = ds)lm04 <-lm(Experience_BBL~IG_Fusion+IG_Identification+OG_Bonds+Age+Female+Married+`SES-`, data = ds)
This set of regression models have additional predictor variables compared to the last set. It adds empathic concern, perspective taking, and perceived history of discrimination as additional predictors.
Display code
## Four regression models predicting endorsement and experience of BCL / BBL:lm01 <-lm(Endorse_BCL~IG_Fusion+IG_Identification+OG_Bonds+empathic_concern+perspective_taking+history_discrimination+Age+Female+Married+`SES-`, data = ds)lm02 <-lm(Experience_BCL~IG_Fusion+IG_Identification+OG_Bonds+empathic_concern+perspective_taking+history_discrimination+Age+Female+Married+`SES-`, data = ds)lm03 <-lm(Endorse_BBL~IG_Fusion+IG_Identification+OG_Bonds+empathic_concern+perspective_taking+history_discrimination+Age+Female+Married+`SES-`, data = ds)lm04 <-lm(Experience_BBL~IG_Fusion+IG_Identification+OG_Bonds+empathic_concern+perspective_taking+history_discrimination+Age+Female+Married+`SES-`, data = ds)
Section 9. Alternative regression models with different outcomes
This set of regression models have different outcome variables which are: outgroup cooperation, outgroup hostility, and willingness to fight outgroup.
Display code
lm01 <-lm(og_cooperation~IG_Fusion+IG_Identification+OG_Bonds+empathic_concern+perspective_taking+history_discrimination+Age+Female+Married+`SES-`, data = ds)lm02 <-lm(og_hostility~IG_Fusion+IG_Identification+OG_Bonds+empathic_concern+perspective_taking+history_discrimination+Age+Female+Married+`SES-`, data = ds)lm03 <-lm(fight_outgroup~IG_Fusion+IG_Identification+OG_Bonds+empathic_concern+perspective_taking+history_discrimination+Age+Female+Married+`SES-`, data = ds)
ds$religious_freedom_per_01 <-as.numeric(ds$`Q16.1 Religious Freedom`)ds$religious_freedom_per_02a <-as.numeric(ds$`Q16.2 Religious Freedom`)ds$religious_freedom_per_02 <- (8- ds$religious_freedom_per_02a)ds$religious_freedom_per_03 <-as.numeric(ds$`Q16.3 Religious Freedom`)ds$religious_freedom_per_04 <-as.numeric(ds$`Q16.4 Religious Freedom`)ds$religious_freedom_per_05 <-as.numeric(ds$`Q16.5 Religious Freedom`)ds$religious_freedom_per_06 <-as.numeric(ds$`Q16.6 Religious Freedom`)ds$religious_freedom_per_07 <-as.numeric(ds$`Q16.7 Religious Freedom`)ds$religious_freedom_per_08 <-as.numeric(ds$`Q16.8 Religious Freedom`)ds$sprf <- (ds$religious_freedom_per_01+ds$religious_freedom_per_02+ ds$religious_freedom_per_03+ds$religious_freedom_per_04+ ds$religious_freedom_per_05+ds$religious_freedom_per_06+ ds$religious_freedom_per_07+ds$religious_freedom_per_08)/8summary(ds$sprf)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
2.5 5.0 5.5 5.4 5.8 7.0 29
Display code
ds %>%drop_na(sprf)%>%ggplot(aes(x = sprf))+geom_histogram(color ="black",fill ="gray",bins =30)+geom_textvline(label ="Mean = 5.40", xintercept =5.40, vjust =1.1, lwd =1.05, linetype =2)+labs(x ="SPRF score", y ="Frequency", title ="Social perception of religious freedom: Tanzania")+theme_bw()
Experience of religious freedom
Display code
ds$religious_freedom_exp_01a <-as.numeric(ds$`Q17.1 Life experience`)ds$religious_freedom_exp_01 <- (8- ds$religious_freedom_exp_01a)ds$religious_freedom_exp_02a <-as.numeric(ds$`Q17.2 Life experience`)ds$religious_freedom_exp_02 <- (8- ds$religious_freedom_exp_02a)ds$religious_freedom_exp_03a <-as.numeric(ds$`Q17.3 Life experience`)ds$religious_freedom_exp_03 <- (8- ds$religious_freedom_exp_03a)ds$religious_freedom_exp_04a <-as.numeric(ds$`Q17.4 Life experience`)ds$religious_freedom_exp_04 <- (8- ds$religious_freedom_exp_04a)ds$religious_freedom_exp_05a <-as.numeric(ds$`Q17.1 Life experience`)ds$religious_freedom_exp_05 <- (8- ds$religious_freedom_exp_05a)ds$religious_freedom_exp_06a <-as.numeric(ds$`Q17.1 Life experience`)ds$religious_freedom_exp_06 <- (8- ds$religious_freedom_exp_06a)ds$exp_religious_freedom <- (ds$religious_freedom_exp_01+ds$religious_freedom_exp_02+ ds$religious_freedom_exp_03+ds$religious_freedom_exp_04+ ds$religious_freedom_exp_05+ds$religious_freedom_exp_06)/6summary(ds$exp_religious_freedom)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
1 5 6 6 7 7 35
Display code
ds %>%drop_na(exp_religious_freedom)%>%ggplot(aes(x = exp_religious_freedom))+geom_histogram(color ="black",fill ="gray",bins =30)+geom_textvline(label ="Mean = 6.00", xintercept =6.00, vjust =1.1, lwd =1.05, linetype =2)+labs(x ="Experience of religious freedom score", y ="Frequency", title ="Experience of religious freedom: Tanzania")+theme_bw()
Experience of religious freedom based on religious affiliation
Religion Exp_religious_freedom
1 Christian: Catholic 4.9
2 Christian: Other 6.5
3 Christian: Pentecostal 6.4
4 Christian: Protestant 5.7
5 Muslim: Shia 6.6
6 Muslim: Sunni 6.5
7 Other 6.2
8 Spiritual not religious 5.8
Display code
ds %>%drop_na(religion, exp_religious_freedom)%>%ggplot(aes(y = exp_religious_freedom, x = religion))+geom_boxplot()+labs(x ="", y ="Experience of religious freedom score", title ="Experience of religious freedom: Tanzania")+coord_flip()+theme_bw()
Section 11. Positive/Negative contact with outgroup
Never Very rarely Rarely Sometimes Often Very often
112 86 59 38 5 5
Always
5
Display code
# never, very rarely, rarely# sometimes, often, very often, alwaysds$nc02 <-as.numeric(ds$nc01)summary(ds$nc02)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
1 1 2 2 3 7 42
Display code
ds %>%drop_na(pc02)%>%ggplot(aes(x = pc02))+geom_histogram(color ="black",fill ="gray",bins =30)+geom_textvline(label ="Mean = 2.00", xintercept =2.00, vjust =1.1, lwd =1.05, linetype =2)+labs(x ="Negative contact score", y ="Frequency", title ="Negative contact with outgroup: Tanzania")+theme_bw()
Section 12. Inter-group marriage
No data for Tanzania
Section 13. Outgroup affect
Outgroup affect: Scale construction
Display code
## Feel outgroup: negative to positive:ds$ogaf1 <-as.character(ds$`Q13.1 Outgroup`)## convert to sentence case:ds$ogaf1 <-gsub("(\\D)(\\D+)", "\\U\\1\\L\\2", ds$ogaf1, perl =TRUE)ds$og_aff_01 <-factor(ds$ogaf1, levels=c("Very negative", "Moderately negative","A little negative", "Neutral", "A little positive", "Moderately positive", "Very positive"))table(ds$og_aff_01)
Very negative Moderately negative A little negative Neutral
25 27 41 36
A little positive Moderately positive Very positive
74 82 50
Display code
## Feel Outgroup: Hostile to friendly:ds$ogaf2 <-as.character(ds$`Q13.2 Outgroup`)## convert to sentence case:ds$ogaf2 <-gsub("(\\D)(\\D+)", "\\U\\1\\L\\2", ds$ogaf2, perl =TRUE)ds$og_aff_02 <-factor(ds$ogaf2, levels =c("Very hostile", "Moderately hostile", "A little hostile", "Neutral", "A little friendly", "Moderately friendly","Very friendly"))table(ds$og_aff_02)
Very hostile Moderately hostile A little hostile Neutral
25 19 42 30
A little friendly Moderately friendly Very friendly
88 85 46
Display code
## Feel Outgroup: Suspicious to trusting:ds$ogaf3 <-as.character(ds$`Q13.3 Outgroup`)## convert to sentence case:ds$ogaf3 <-gsub("(\\D)(\\D+)", "\\U\\1\\L\\2", ds$ogaf3, perl =TRUE)# remove extra spaces:ds$ogaf3 <-gsub("\\s+"," ",ds$ogaf3, perl =TRUE)ds$og_aff_03 <-factor(ds$ogaf3, levels =c("Very suspicious", "Moderately suspicious", "A little suspicious", "Neutral","A little trusting", "Moderately trusting","Very trusting"))table(ds$og_aff_03)
Very suspicious Moderately suspicious A little suspicious
26 35 47
Neutral A little trusting Moderately trusting
28 77 89
Very trusting
33
Display code
## Feel Outgroup: Contempt to respect:ds$ogaf4 <-as.character(ds$`Q13.4 Outgroup`)## convert to sentence case:ds$ogaf4 <-gsub("(\\D)(\\D+)", "\\U\\1\\L\\2", ds$ogaf4, perl =TRUE)ds$og_aff_04 <-factor(ds$ogaf4, levels =c("A lot of contempt", "Moderate contempt","A little contempt", "Neutral", "A little respect", "Moderate respect","A lot of respect"))table(ds$og_aff_04)
A lot of contempt Moderate contempt A little contempt Neutral
24 21 30 31
A little respect Moderate respect A lot of respect
79 90 59
Display code
## Feel Outgroup: Concerned to Unconcerned:ds$ogaf5 <-as.character(ds$`Q13.5 Outgroup`)## convert to sentence case:ds$ogaf5 <-gsub("(\\D)(\\D+)", "\\U\\1\\L\\2", ds$ogaf5, perl =TRUE)# remove extra spaces:ds$ogaf5 <-gsub("\\s+"," ",ds$ogaf5, perl =TRUE)ds$og_aff_05 <-factor(ds$ogaf5, levels =c("Very concerned", "Moderately concerned", "A little concerned", "Neutral","A little unconcerned", "Moderately unconcerned","Very unconcerned"))table(ds$og_aff_05)
Very concerned Moderately concerned A little concerned
37 67 62
Neutral A little unconcerned Moderately unconcerned
29 63 53
Very unconcerned
18
Display code
## Feel Outgroup: Threatened to Relaxed:ds$ogaf6 <-as.character(ds$`Q13.6 Outgroup`)## convert to sentence case:ds$ogaf6 <-gsub("(\\D)(\\D+)", "\\U\\1\\L\\2", ds$ogaf6, perl =TRUE)ds$og_aff_06 <-factor(ds$ogaf6, levels =c("Very threatened", "Moderately threatened", "A little threatened", "Neutral", "A little relaxed", "Moderately relaxed", "Very relaxed"))table(ds$og_aff_06)
Very threatened Moderately threatened A little threatened
25 33 35
Neutral A little relaxed Moderately relaxed
53 53 89
Very relaxed
47
Based on the output of factor analysis as well as reliability, it seems like one item (“concerned to unconcerned”) is problematic. Here is the scale without that item:
Based on the above output for factor analysis and reliability analysis, the “outgroup affect” scale is highly reliable if we drop the problematic item (“concerned to unconcerned”). Here is the visualization for the scale after dropping the problematic item:
This set of regression models have additional predictors: frequency of positive and negative contact, and interaction between perspective taking and perceived history of discrimination
Display code
ds$freq_positive_contact <- ds$pc02ds$freq_negative_contact <- ds$nc02ds$perspectiveXdiscrimination <- ds$perspective_taking*ds$history_discrimination## Four regression models predicting endorsement and experience of BCL / BBL:lm01 <-lm(Endorse_BCL~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)lm02 <-lm(Experience_BCL~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)lm03 <-lm(Endorse_BBL~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)lm04 <-lm(Experience_BBL~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)
Same predictors as section 14 above, but with different outcomes. This set of regression models has an additional outcome variable: affect towards outgroup.
Display code
## Four regression models:lm01 <-lm(og_cooperation~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)lm02 <-lm(og_hostility~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)lm03 <-lm(fight_outgroup~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)lm04 <-lm(og_affect~IG_Fusion+IG_Identification+OG_Bonds+freq_positive_contact+freq_negative_contact+empathic_concern+perspective_taking+history_discrimination+perspectiveXdiscrimination+Age+Female+Married+`SES-`, data = ds)
Below are the individual Cronbach’s alpha for each of the seven subscales, followed by their individual visualizations, followed by the correlation between the seven sub-scales
Social perception of religious freedom
Display code
Display code