1 Summary

The hypothesis we are testing is:

  • H1: Women are more likely to use non-violent tactics.

  • H2: Women are more likely to employ non-violent tactics, but they may resort to violence when the state actor appears less responsive to their demands.

1.1 Variables and measurement

The outcome variable in all the tests indicates whether the movement adopts violent tactics, such as armed conflicts, or civil tactics. Although the outcome variable is binary, we initially use the OLS estimator because the results are easier to interpret.

1.2 Results and discussion

We can see that the test results fully support Hypothesis 1 (H1) and Hypothesis 2 (H2). In non-election years, as compared to election years, women become less likely to adopt civil methods to resist against the state actor.

In the updated version of the analysis, I coded the variable, elections as we discussed yesterday. Country-fixed effects have been added to all the baseline analyses.

3 Full SCAD: event-level analysis

Here we use the SCAD dataset to test our hypothesis. We code the outcome variable: riots as 0 and civil resistance methods as 1. The observation unit is the event.

setwd("/Users/winniexia/Library/CloudStorage/Dropbox/Survey Experiments 2021/Analysis")

# data preparation
la <- read.csv("SCAD_full/SCAD2018LatinAmerica_Final.csv")
afr <- read.csv("SCAD_full/SCAD2018Africa_Final.csv")

data <- la %>%
  bind_rows(afr)

data <- data %>%
  filter(etype %in% c(1,2,3,4,5,6))

table(data$etype)
## 
##    1    2    3    4    5    6 
## 2449 4441  353 3509  327 1701
data$etype <- recode(data$etype,
                      `1` = "organized demonstration",
                      `2` = "spontaneous demonstration",
                     `3` = "organized riot",
                      `4` = "spontaneous riot",
                      `5` = "general strike",
                      `6` = "limited strike")


ggplot(data, aes(x = etype)) +
  geom_bar() +
  coord_flip() +
  theme_minimal() +
  labs(y = "Count",
       x= "") +
  theme_mfx()

The distribution of resistance types varies across events. We have recorded around 12,780 social conflicts in the SCAD database, with 30 percent of them employing organized or spontaneous riots as their primary tactic. Additionally, starting with the analysis in this section, we measure violence as the outcome variable based on the event type.

t1 <- table(data$female_event)
t2 <- table(data$etype, data$female_event)
kable(t1, format = "html", caption = "Female Event")  %>%
  kable_classic(full_width = F, html_font = "Cambria")
Female Event
Var1 Freq
0 12457
1 323
kable(t2, format = "html", caption = "Female Event across conflict types")  %>%
  kable_classic(full_width = F, html_font = "Cambria")
Female Event across conflict types
0 1
general strike 327 0
limited strike 1697 4
organized demonstration 2297 152
organized riot 351 2
spontaneous demonstration 4304 137
spontaneous riot 3481 28

As we can see, 323 out of 12,457 events are considered as ‘female events’ in the full SCAD dataset. Out of these 323, 28 have opted for a violent resistance tactic.

3.1 Baseline analysis

To maintain consistency with the analysis above, we code violent tactics as 0 and civil tactics as 1. Despite the binary outcome, we continue to use the OLS estimator to test the hypothesis, as it allows for easier interpretation.

data$vio <- ifelse(data$etype %in% c("organized riot", "spontaneous riot"), 0, 1)
election <- read_excel("/Users/winniexia/Desktop/PhD-3/6_female_violence/1_data/NELDA_scad.xlsx")
data <- data %>%
  left_join(election, by =c("styr" = "year",
                            "ccode" = "ccode"))

data$election[is.na(data$election)] <- 0
m1 <- feols(vio ~ female_event |countryname, data = data)

m2 <- feols(vio ~ female_event + election |countryname, data = data)

m3 <- feols(vio ~ female_event + election + election * female_event |countryname, data = data)

screenreg(list(m1, m2, m3))
## 
## ==================================================================
##                           Model 1       Model 2       Model 3     
## ------------------------------------------------------------------
## female_event                  0.22 ***      0.22 ***      0.20 ***
##                              (0.03)        (0.03)        (0.04)   
## election                                   -0.01         -0.01    
##                                            (0.01)        (0.01)   
## female_event:election                                     0.10 ** 
##                                                          (0.04)   
## ------------------------------------------------------------------
## Num. obs.                 15510         15510         15510       
## Num. groups: countryname     61            61            61       
## R^2 (full model)              0.06          0.06          0.06    
## R^2 (proj model)              0.01          0.01          0.01    
## Adj. R^2 (full model)         0.05          0.05          0.05    
## Adj. R^2 (proj model)         0.01          0.01          0.01    
## ==================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_slopes(m3, variables = "female_event", 
            condition = "election") +
  theme_mfx() +
  xlab("Election year") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

3.2 Adding control variables

In this analysis, we use the event as the unit of observation, as opposed to the campaign year. Additionally, we incorporate some control variables and country fixed effects into the models.

vdem <- readRDS("~/Desktop/Phd_project/Paper_three/1_data/v_dem/Vdem13.rds")
myvars <- c("country_name", "year", 
            "v2x_gender", "v2x_partipdem", "v2csreprss", "v2clgencl")

country_list <- unique(data$ccode)
vdem <- vdem %>%
  filter(COWcode %in% country_list)

data <- data %>%
    left_join(vdem, by =c("styr" = "year",
                            "ccode" = "COWcode"))
data$loc <- ifelse(data$locnum %in% c(1,2,4,6,7), 1, 0)
data$organized <- ifelse(data$etype %in% c(1, 3, 5, 6), 1, 0)


m4 <- feols(vio ~ female_event + election + election * female_event + loc + organized +
              v2x_partipdem + v2clgencl| countryname, data = data)

screenreg(m4)
## 
## ======================================
##                           Model 1     
## --------------------------------------
## female_event                  0.18 ***
##                              (0.04)   
## election                     -0.01    
##                              (0.01)   
## loc                           0.25 ***
##                              (0.02)   
## v2x_partipdem                 0.07    
##                              (0.19)   
## v2clgencl                    -0.05    
##                              (0.04)   
## female_event:election         0.10 ** 
##                              (0.03)   
## --------------------------------------
## Num. obs.                 15510       
## Num. groups: countryname     61       
## R^2 (full model)              0.10    
## R^2 (proj model)              0.05    
## Adj. R^2 (full model)         0.09    
## Adj. R^2 (proj model)         0.05    
## ======================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_slopes(m4, variables = "female_event", 
            condition = "election") +
  theme_mfx() +
  xlab("Election year") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

data$female_event <- as.factor(data$female_event)
data$election <- as.factor(data$election)

m4_1 <- lm(vio ~ female_event + election + election * female_event + loc + organized +
              v2x_partipdem + v2clgencl, data = data )

plot_model(m4_1, type = "pred", terms = c("election", "female_event")) +
  theme_mfx() +
  labs(title = "Predicted values of using civil resistance",
       x = "Election year",
       y = "",
       color = "Female event")

3.3 SCAD, interacted with women index

Here we interact the Gender Equality Index with respect to civil liberties.

m5 <- feols(vio ~ female_event + election +  v2clgencl * female_event + loc + organized + v2x_partipdem + v2clgencl | countryname, data = data)

m5_1 <- lm(vio ~ female_event + election + v2clgencl * female_event + loc + organized +
              v2x_partipdem + v2clgencl, data = data )

screenreg(list(m5, m5_1))
## 
## ====================================================
##                           Model 1       Model 2     
## ----------------------------------------------------
## female_event1                 0.20 ***      0.20 ***
##                              (0.06)        (0.04)   
## election1                    -0.01         -0.01    
##                              (0.01)        (0.01)   
## v2clgencl                    -0.05          0.01    
##                              (0.04)        (0.01)   
## loc                           0.25 ***      0.24 ***
##                              (0.02)        (0.01)   
## v2x_partipdem                 0.07         -0.08 *  
##                              (0.19)        (0.03)   
## female_event1:v2clgencl      -0.01          0.02    
##                              (0.05)        (0.03)   
## (Intercept)                                 0.50 ***
##                                            (0.01)   
## ----------------------------------------------------
## Num. obs.                 15510         15510       
## Num. groups: countryname     61                     
## R^2 (full model)              0.10                  
## R^2 (proj model)              0.05                  
## Adj. R^2 (full model)         0.09                  
## Adj. R^2 (proj model)         0.05                  
## R^2                                         0.05    
## Adj. R^2                                    0.05    
## ====================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_model(m5_1, type = "pred", terms = c("female_event", "v2clgencl")) +
  theme_mfx() +
  labs(title = "Coefficients of female event",
       x = "Female event",
       y = "",
       color = "Gender equality index")

plot_slopes(m5, variables = "female_event", 
            condition = "v2clgencl") +
  theme_mfx() +
  xlab("Gender equality index") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

3.4 Additional analysis, 20240310

So, I first use the new variable, ‘v2x_freexp_altinf’, to interact with the ‘female event’. Then, I remove ‘participatory freedom’ to avoid multicollinearity.

The variable ‘v2x_freexp_altinf’, sourced from V-Dem, measures the Freedom of Expression and Alternative Sources of Information index. It is an interval variable, ranging from low to high (0 to 1).

m6 <- feols(vio ~ female_event + election + loc + organized +
              v2x_freexp_altinf + v2clgencl| countryname, data = data)

m6_1 <- feols(vio ~ female_event + female_event * v2x_freexp_altinf + election + loc + organized +
              v2x_freexp_altinf + v2clgencl| countryname, data = data)

m6_2 <- lm(vio ~ female_event + female_event * v2x_freexp_altinf + election + loc + organized +
              v2x_freexp_altinf + v2clgencl, data = data)


screenreg(list(m6, m6_1, m6_2))
## 
## =========================================================================
##                                  Model 1       Model 2       Model 3     
## -------------------------------------------------------------------------
## female_event1                        0.20 ***      0.12 **       0.18 ***
##                                     (0.03)        (0.04)        (0.05)   
## election1                           -0.01         -0.01         -0.00    
##                                     (0.01)        (0.01)        (0.01)   
## loc                                  0.25 ***      0.25 ***      0.24 ***
##                                     (0.02)        (0.02)        (0.01)   
## v2x_freexp_altinf                    0.04          0.03         -0.15 ***
##                                     (0.07)        (0.07)        (0.02)   
## v2clgencl                           -0.05         -0.05          0.01 ** 
##                                     (0.04)        (0.04)        (0.00)   
## female_event1:v2x_freexp_altinf                    0.14          0.03    
##                                                   (0.09)        (0.08)   
## (Intercept)                                                      0.57 ***
##                                                                 (0.01)   
## -------------------------------------------------------------------------
## Num. obs.                        15510         15510         15510       
## Num. groups: countryname            61            61                     
## R^2 (full model)                     0.10          0.10                  
## R^2 (proj model)                     0.05          0.05                  
## Adj. R^2 (full model)                0.09          0.09                  
## Adj. R^2 (proj model)                0.05          0.05                  
## R^2                                                              0.05    
## Adj. R^2                                                         0.05    
## =========================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_model(m6_2, type = "pred", terms = c("female_event", "v2x_freexp_altinf")) +
  theme_mfx() +
  labs(title = "Coefficients of female event",
       x = "Female event",
       y = "",
       color = "Freedom of expression")

plot_slopes(m6_1, variables = "female_event", 
            condition = "v2x_freexp_altinf") +
  theme_mfx() +
  xlab("Freedom of expression") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

There are many measures related to democracy in V-Dem. Therefore, I have selected ‘v2x_liberal’, the Liberal Component Index, and ‘v2x_accountability’, the Accountability Index. The former measures the extent to which the liberal principle of democracy is achieved, with a range from 0 to 1. The latter assesses the extent to which the ideal of government accountability is achieved. Government accountability refers to the constraints on the government’s use of political power, enforced through requirements for justification of its actions and potential sanctions. It is derived as the normalized output from hierarchical latent variable analysis and is measured on an unbounded interval scale.

I did not select any variables related to elections/electory democracy to avoid replicating our previous analysis and to prevent multicollinearity.

m7 <- feols(vio ~ female_event + election + loc + organized +
             v2x_liberal + v2clgencl| countryname, data = data)

m7_1 <- feols(vio ~ female_event + female_event * v2x_liberal + election + loc + organized +
              v2x_liberal + v2clgencl| countryname, data = data)

m7_2 <- lm(vio ~ female_event + female_event * v2x_liberal + election + loc + organized +
              v2x_liberal + v2clgencl, data = data)

screenreg(list(m7, m7_1, m7_2))
## 
## ===================================================================
##                            Model 1       Model 2       Model 3     
## -------------------------------------------------------------------
## female_event1                  0.20 ***      0.19 **       0.28 ***
##                               (0.03)        (0.07)        (0.06)   
## election1                     -0.01         -0.01         -0.01    
##                               (0.01)        (0.01)        (0.01)   
## loc                            0.25 ***      0.25 ***      0.24 ***
##                               (0.02)        (0.02)        (0.01)   
## v2x_liberal                   -0.05         -0.05         -0.03    
##                               (0.07)        (0.07)        (0.02)   
## v2clgencl                     -0.03         -0.03          0.01    
##                               (0.04)        (0.04)        (0.01)   
## female_event1:v2x_liberal                    0.02         -0.15    
##                                             (0.15)        (0.11)   
## (Intercept)                                                0.50 ***
##                                                           (0.01)   
## -------------------------------------------------------------------
## Num. obs.                  15510         15510         15510       
## Num. groups: countryname      61            61                     
## R^2 (full model)               0.10          0.10                  
## R^2 (proj model)               0.05          0.05                  
## Adj. R^2 (full model)          0.09          0.09                  
## Adj. R^2 (proj model)          0.05          0.05                  
## R^2                                                        0.05    
## Adj. R^2                                                   0.05    
## ===================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_model(m7_2, type = "pred", terms = c("female_event", "v2x_liberal")) +
  theme_mfx() +
  labs(title = "Coefficients of female event",
       x = "Female event",
       y = "",
       color = "Liberal component index")

plot_slopes(m7_1, variables = "female_event", 
            condition = "v2x_liberal") +
  theme_mfx() +
  xlab("Liberal component index") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

m8 <- feols(vio ~ female_event + election + loc + organized +
             v2x_accountability + v2clgencl| countryname, data = data)

m8_1 <- feols(vio ~ female_event + female_event * v2x_accountability + election + loc + organized +
              v2x_accountability + v2clgencl| countryname, data = data)

m8_2 <- lm(vio ~ female_event + female_event *v2x_accountability + election + loc + organized +
              v2x_accountability + v2clgencl, data = data)

screenreg(list(m8, m8_1, m8_2))
## 
## ==========================================================================
##                                   Model 1       Model 2       Model 3     
## --------------------------------------------------------------------------
## female_event1                         0.20 ***      0.19 ***      0.21 ***
##                                      (0.03)        (0.03)        (0.03)   
## election1                            -0.01         -0.01         -0.01    
##                                      (0.01)        (0.01)        (0.01)   
## loc                                   0.25 ***      0.25 ***      0.24 ***
##                                      (0.02)        (0.02)        (0.01)   
## v2x_accountability                   -0.01         -0.01         -0.03 ***
##                                      (0.03)        (0.03)        (0.01)   
## v2clgencl                            -0.04         -0.04          0.01 *  
##                                      (0.04)        (0.04)        (0.00)   
## female_event1:v2x_accountability                    0.04         -0.02    
##                                                    (0.04)        (0.03)   
## (Intercept)                                                       0.49 ***
##                                                                  (0.01)   
## --------------------------------------------------------------------------
## Num. obs.                         15510         15510         15510       
## Num. groups: countryname             61            61                     
## R^2 (full model)                      0.10          0.10                  
## R^2 (proj model)                      0.05          0.05                  
## Adj. R^2 (full model)                 0.09          0.09                  
## Adj. R^2 (proj model)                 0.05          0.05                  
## R^2                                                               0.05    
## Adj. R^2                                                          0.05    
## ==========================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_model(m8_2, type = "pred", terms = c("female_event", "v2x_accountability")) +
  theme_mfx() +
  labs(title = "Coefficients of female event",
       x = "Female event",
       y = "",
       color = "Accountability index")

plot_slopes(m8_1, variables = "female_event", 
            condition = "v2x_accountability") +
  theme_mfx() +
  xlab("Accountability index") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

The only issue I find in the analysis above is the differing directions of the interaction terms in models with and without country fixed effects.

3.5 Additional analysis in April

In order to strengthen the analysis, I have selected some variables that measure the level of democracy and civil liberties, but not from V-Dem, to serve as a robustness check. This information primarily comes from two data sources. The first is the Lexical Index of Electoral Democracy (hereinafter referred to as LIED). I have chosen to explore the following variables from LIED: firstly, female_suffrage, which indicates whether virtually all female citizens are allowed to vote in national elections. This is a binary measurement, where 1 equals present and 0 equals absent. Secondly, political_liberties, which measures the freedom of expression, freedom of assembly, and freedom of association, and is also binary.

The Civil Liberties Data (CLD) provides a more detailed breakdown of freedoms, as opposed to aggregating them like the overall indicator from LIED does. It is disaggregated into: 1) freedom of opinion and expression; 2) freedom of assembly and association; 3) freedom of thought, conscience, and religion; 4) freedom of movement and residence; 5) fair trial. These variables are all ordinal, higher in numbers suggesting more freedom.

I prefer these two datasets because they offer a wide temporal span. Most other sources I found are only available for the years after 2000, which would cost us many observational units. Therefore, I have started with them.

library(readxl)
cld <- read_excel("/Users/winniexia/Desktop/PhD-3/6_female_violence/1_data/CLD_2.5.xls")
lied <- read_excel("/Users/winniexia/Desktop/PhD-3/6_female_violence/1_data/lied/LIED_6.5.xlsx")

cld <- cld %>%
  
  filter(YEAR > 1989)

lied <- lied %>%
  filter(year > 1989) %>%
  select(countryn, cow, year, female_suffrage, political_liberties)
data <- data %>%
    left_join(lied, by =c("styr" = "year",
                            "ccode" = "cow"))

data <- data %>%
  left_join(cld, by =c("styr" = "YEAR",
                            "ccode" = "COW id"))

Then let me start the analysis by interacting with Female_suffrage variable from LIED.

m9 <- feols(vio ~ female_event + election + loc + organized +
             female_suffrage + v2clgencl| countryname, data = data)

m9_1 <- feols(vio ~ female_event + female_event * female_suffrage + election + loc + organized +
              female_suffrage + v2clgencl| countryname, data = data)

m9_2 <- lm(vio ~ female_event + female_event * female_suffrage + election + loc + organized +
              female_suffrage + v2clgencl, data = data)


screenreg(list(m9, m9_1, m9_2))
## 
## =======================================================================
##                                Model 1       Model 2       Model 3     
## -----------------------------------------------------------------------
## female_event1                      0.20 ***     -0.42 *       -0.46    
##                                   (0.03)        (0.20)        (0.26)   
## election1                         -0.01         -0.01         -0.01    
##                                   (0.01)        (0.01)        (0.01)   
## loc                                0.25 ***      0.25 ***      0.24 ***
##                                   (0.02)        (0.02)        (0.01)   
## female_suffrage                    0.12          0.11         -0.07 *  
##                                   (0.12)        (0.11)        (0.04)   
## v2clgencl                         -0.06         -0.05          0.00    
##                                   (0.04)        (0.04)        (0.00)   
## female_event1:female_suffrage                    0.62 **       0.67 *  
##                                                 (0.21)        (0.27)   
## (Intercept)                                                    0.55 ***
##                                                               (0.04)   
## -----------------------------------------------------------------------
## Num. obs.                      15509         15509         15509       
## Num. groups: countryname          61            61                     
## R^2 (full model)                   0.10          0.10                  
## R^2 (proj model)                   0.05          0.05                  
## Adj. R^2 (full model)              0.09          0.09                  
## Adj. R^2 (proj model)              0.05          0.05                  
## R^2                                                            0.05    
## Adj. R^2                                                       0.05    
## =======================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_slopes(m9_1, variables = "female_event", 
            condition = "female_suffrage") +
  theme_mfx() +
  xlab("Presence of Women Suffrage") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

m10 <- feols(vio ~ female_event + election + loc + organized +
             freexp| countryname, data = data)

m10_1 <- feols(vio ~ female_event + female_event * freexp + election + loc + organized +
              freexp | countryname, data = data)


screenreg(list(m10, m10_1))
## 
## ====================================================
##                           Model 1       Model 2     
## ----------------------------------------------------
## female_event1                 0.20 ***      0.05    
##                              (0.03)        (0.08)   
## election1                    -0.01         -0.01    
##                              (0.01)        (0.01)   
## loc                           0.25 ***      0.24 ***
##                              (0.02)        (0.02)   
## freexp                       -0.05         -0.05    
##                              (0.03)        (0.03)   
## female_event1:freexp                        0.07    
##                                            (0.04)   
## ----------------------------------------------------
## Num. obs.                 15509         15509       
## Num. groups: countryname     61            61       
## R^2 (full model)              0.10          0.10    
## R^2 (proj model)              0.05          0.05    
## Adj. R^2 (full model)         0.09          0.09    
## Adj. R^2 (proj model)         0.05          0.05    
## ====================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_slopes(m10_1, variables = "female_event", 
            condition = "freexp") +
  theme_mfx() +
  xlab("Level of freedome of expression") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

m11 <- feols(vio ~ female_event + election + loc + organized +
             freass | countryname, data = data)

m11_1 <- feols(vio ~ female_event + female_event * freass + election + loc + organized +
              freass | countryname, data = data)


screenreg(list(m11, m11_1))
## 
## ====================================================
##                           Model 1       Model 2     
## ----------------------------------------------------
## female_event1                 0.20 ***      0.22 *  
##                              (0.03)        (0.10)   
## election1                    -0.01         -0.01    
##                              (0.01)        (0.01)   
## loc                           0.25 ***      0.25 ***
##                              (0.02)        (0.02)   
## freass                       -0.04         -0.04    
##                              (0.02)        (0.02)   
## female_event1:freass                       -0.01    
##                                            (0.04)   
## ----------------------------------------------------
## Num. obs.                 15509         15509       
## Num. groups: countryname     61            61       
## R^2 (full model)              0.10          0.10    
## R^2 (proj model)              0.05          0.05    
## Adj. R^2 (full model)         0.09          0.09    
## Adj. R^2 (proj model)         0.05          0.05    
## ====================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_slopes(m11_1, variables = "female_event", 
            condition = "freass") +
  theme_mfx() +
  xlab("Level of free association") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

m12 <- feols(vio ~ female_event + election + loc + organized +
             fremov | countryname, data = data)

m12_1 <- feols(vio ~ female_event + female_event * fremov + election + loc + organized +
              fremov | countryname, data = data)


screenreg(list(m12, m12_1))
## 
## ====================================================
##                           Model 1       Model 2     
## ----------------------------------------------------
## female_event1                 0.20 ***      0.25    
##                              (0.03)        (0.13)   
## election1                    -0.01         -0.01    
##                              (0.01)        (0.01)   
## loc                           0.25 ***      0.25 ***
##                              (0.02)        (0.02)   
## fremov                       -0.01         -0.01    
##                              (0.03)        (0.03)   
## female_event1:fremov                       -0.02    
##                                            (0.05)   
## ----------------------------------------------------
## Num. obs.                 15509         15509       
## Num. groups: countryname     61            61       
## R^2 (full model)              0.10          0.10    
## R^2 (proj model)              0.05          0.05    
## Adj. R^2 (full model)         0.09          0.09    
## Adj. R^2 (proj model)         0.05          0.05    
## ====================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_slopes(m12_1, variables = "female_event", 
            condition = "fremov") +
  theme_mfx() +
  xlab("Level of free movement") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

m13 <- feols(vio ~ female_event + election + loc + organized +
             frerel | countryname, data = data)

m13_1 <- feols(vio ~ female_event + female_event * frerel + election + loc + organized +
              frerel | countryname, data = data)


screenreg(list(m13, m13_1))
## 
## ====================================================
##                           Model 1       Model 2     
## ----------------------------------------------------
## female_event1                 0.20 ***      0.22    
##                              (0.03)        (0.14)   
## election1                    -0.01         -0.01    
##                              (0.01)        (0.01)   
## loc                           0.25 ***      0.25 ***
##                              (0.02)        (0.02)   
## frerel                       -0.04         -0.04    
##                              (0.02)        (0.02)   
## female_event1:frerel                       -0.01    
##                                            (0.04)   
## ----------------------------------------------------
## Num. obs.                 15509         15509       
## Num. groups: countryname     61            61       
## R^2 (full model)              0.10          0.10    
## R^2 (proj model)              0.05          0.05    
## Adj. R^2 (full model)         0.09          0.09    
## Adj. R^2 (proj model)         0.05          0.05    
## ====================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
plot_slopes(m13_1, variables = "female_event", 
            condition = "frerel") +
  theme_mfx() +
  xlab("Level of free knowledge and religion") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "#B22222") +
  ggtitle("Marginal effect of female event") +
  ylab("")

3.6 Valuating the sensitivity of our model

I recall that you would like us to have a loop to exclude a random observation each time and run for 100 times, to avoid the results are drive by one specific case.

set.seed(123) # Setting a seed for reproducibility
n <- nrow(data) # Number of observations in your dataset
iterations <- 100 # Number of iterations

results <- list() # A list to store the results

for (i in 1:iterations) {
  # Randomly select an observation to exclude
  exclude_row <- sample(1:n, 1)
  
  # Exclude the selected observation
  df_subset <- data[-exclude_row, ]
  
  # Fit the model to the reduced dataset
 model <- feols(vio ~ female_event + female_event * female_suffrage + election +
                  loc + organized + female_suffrage + v2clgencl| countryname, data = df_subset)
  
  # Store the modelsummary 
  results[[i]] <- summary(model)$coefficients
}

Then I was thinking, how could we present the results? I guess one way is to plot the coefficients of the interaction term.

coefficients_variable <- sapply(results, function(x) x[["female_event1:female_suffrage"]])

# Create a data frame for plotting
plot_data <- data.frame(Iteration = 1:100, Coefficient = coefficients_variable)

# Plot the coefficients of x1 across iterations
ggplot(plot_data, aes(x = Iteration, y = Coefficient)) +
  geom_line() + # or geom_point() if you prefer dots
  theme_mfx() +
  labs(title = "Coefficient of interaction term across iterations",
       x = "Iteration",
       y = "Coefficient")

# Plot a histogram of the coefficient values
ggplot(plot_data, aes(x = Coefficient)) +
  geom_histogram(fill = "darkkhaki", color = "black") +
  theme_mfx() +
  labs(title = "Distribution of Coefficient across Iterations",
       x = "Coefficient",
       y = "Frequency")