# Read the data from indices_table.txt
df <- as.data.frame(readRDS("Israel Survey/data/il_pe.RDS"))

wave_var <- "Wave"
wave_order <- c("First", "Second", "Third", "Fourth", "Fifth", "Sixth")

community_var <- "pe_left_center_right"
community_order <- c("left", "center", "right") # Set "center" as the reference level since it is the 'neutral' level.

dimensions_order <- c("Overall", "Cognitive", "Behavioral", "Social")

# Calculate the Political Extremism Gauge Indices
indices_result <- af_gauge_indices(df, pop_var1 = wave_var, comm_var1 = community_var,
                                   threshold_type = "MAD", k_factor = 1.5)
df <- indices_result$df

# Convert data to a more manageable format for analysis
df <- df %>%
  mutate(Wave = factor(Wave, levels = wave_order)) %>%
  mutate(!!sym(community_var) := factor(!!sym(community_var), levels = community_order)) %>%
  mutate(event_occurred = factor(1, levels = c(0, 1)))  # used for pairwise regression

# Print Event Table 
event_table <- data.frame(
  event_name = c("Inland Terror", "Bennet Gov. Fall", "Judicial Reform", "Gallant Dismissal", "Oct. 7th War"),
  waves = c("1-2", "2-3", "3-4", "4-5", "5-6"),
  type = c("Security", "Political", "Political", "Political", "Security"),
  stringsAsFactors = FALSE
)

gt(event_table) %>%
  tab_header(
    title = md("**Event Table**"),
  )
Event Table
event_name waves type
Inland Terror 1-2 Security
Bennet Gov. Fall 2-3 Political
Judicial Reform 3-4 Political
Gallant Dismissal 4-5 Political
Oct. 7th War 5-6 Security

# add event_type and event_result info to df based on the event_table
df <- af_add_event_info(df, wave_var, wave_order, event_table, community_var)

# Create the wave list in the form
wave_list <- list()
for(i in 1:nrow(event_table)) {
  wave_range <- as.numeric(unlist(strsplit(event_table$waves[i], "-")))
  wave_list[[event_table$event_name[i]]] <- c(wave_order[wave_range[1]],              
                                                      wave_order[wave_range[2]])
}

# Create demographics regression formula part
demographics <- c("gender", "age_group") # , "education"
d_fmla <- paste(demographics, collapse = "+")

# Set display names for regression results 
display_names <- list(
  "Wave" = "Wave",
  "post_event1" = "Inland Terror", 
  "post_event2" = "Bennet Gov. Fall", 
  "post_event3" = "Judicial Reform", 
  "post_event4" = "Gallant Dismissal", 
  "post_event5" = "Oct. 7th War",
  "immediate_event1" = "Inland Terror", 
  "immediate_event2" = "Bennet Gov. Fall", 
  "immediate_event3" = "Judicial Reform", 
  "immediate_event4" = "Gallant Dismissal", 
  "immediate_event5" = "Oct. 7th War",
  "pe_left_center_right" = "Political Orientation",
  "event_occurred" = "Event Occured",
  "event_type" = "Event Type",
  "gender" = "Gender",
  "age_group" = "Age Group",
  "education" = "Education"
)

coef_names <- c(
  "event_occurred1" = "Event Occurred",
  "pe_left_center_rightcenter" = "Political Orientation[center]", 
  "pe_left_center_rightright" = "Political Orientation[right]",
  "event_occurred1:pe_left_center_rightcenter" = "Event Occurred : Political Orientation[center]", 
  "event_occurred1:pe_left_center_rightright" = "Event Occurred : Political Orientation[right]"
)

1 Dimensions

# Create Panel Dataset
df1 <- df$respondent_id[df$Wave == "Third"]
df2 <- df$respondent_id[df$Wave == "Fourth"]
panel_respondents <- intersect(df1, df2)

panel_df <- df %>%
  filter(Wave %in% c("Third", "Fourth")) %>%
  filter(respondent_id %in% panel_respondents) %>%
  mutate(event_occurred = factor(case_when(
    Wave == "Third" ~ 0,
    Wave == "Fourth" ~ 1
  ), levels = c(0, 1)))

p_data <- plm::pdata.frame(panel_df, index = c("respondent_id", "event_occurred"))

plm::pdim(p_data)

Balanced Panel: n = 671, T = 2, N = 1342

# The within estimator will automatically drop the main effects of time-invariant variables 
# (like pe_left_center_right, gender, age_group) but keeps the interactions event_occurred * pe_left_center_right.

mp1 <- plm(pe_ideology ~ event_occurred  * pe_left_center_right + age_group, data = p_data, model = "within")
mp2 <- plm(pe_violence ~ event_occurred  * pe_left_center_right + age_group, data = p_data, model = "within")
mp3 <- plm(pe_intolerance ~ event_occurred  * pe_left_center_right + age_group, data = p_data, model = "within")
mp4 <- plm(pe_overall ~ event_occurred  * pe_left_center_right + age_group, data = p_data, model = "within")

1.1 Cognitive Dimension

formula_str <- paste("pe_ideology ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS")
models[[3]] <- mp1 # Override with panel model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Cognitive Dimension")

notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Cognitive Political Extremism ~ Event Occurred x Political Orientation + Demographics")
Cognitive Political Extremism ~ Event Occurred x Political Orientation + Demographics
Dependent variable:
pe_ideology
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] 0.041 0.459* 0.256 -0.386 0.295
(0.168) (0.194) (0.176) (0.227) (0.211)
Political Orientation[center] -1.256*** -1.320*** 0.347 -1.667*** -1.026***
(0.147) (0.131) (0.303) (0.225) (0.158)
Political Orientation[right] -0.767*** -1.222*** 0.214 -1.745*** -1.156***
(0.134) (0.121) (0.330) (0.204) (0.147)
Gender[Female] -0.570*** -0.587*** -0.621*** -0.519***
(0.066) (0.068) (0.075) (0.070)
Age Group[31-45] -0.067 -0.188* 0.123 -0.097 -0.030
(0.086) (0.089) (1.006) (0.097) (0.095)
Age Group[46-60] -0.007 -0.028 1.036 0.112 0.200*
(0.092) (0.095) (1.299) (0.100) (0.097)
Age Group[60+] 0.302** 0.383*** 0.535*** 0.525***
(0.103) (0.102) (0.128) (0.114)
Event Occured[1] × Political Orientation[center] -0.068 -0.360 -0.284 0.634* -0.240
(0.207) (0.234) (0.211) (0.273) (0.246)
Event Occured[1] × Political Orientation[right] -0.467* -0.543* -0.233 0.570* -0.289
(0.189) (0.214) (0.190) (0.249) (0.229)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.080 0.121 0.006 0.096 0.080
Adjusted R2 0.077 0.117 -1.007 0.092 0.077
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses.

1.2 Behavioral Dimension

formula_str <- paste("pe_violence ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS")
models[[3]] <- mp2 # Override with panel model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Behavioral Dimension")

notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Behavioral Political Extremism ~ Event Occurred x Political Orientation + Demographics")
Behavioral Political Extremism ~ Event Occurred x Political Orientation + Demographics
Dependent variable:
pe_violence
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] -0.031 -0.122 0.114 0.156 0.326**
(0.086) (0.114) (0.102) (0.123) (0.113)
Political Orientation[center] 0.105 0.152* 0.036 0.193 0.029
(0.075) (0.077) (0.176) (0.121) (0.085)
Political Orientation[right] 0.165* 0.353*** -0.027 0.092 -0.013
(0.069) (0.071) (0.192) (0.110) (0.079)
Gender[Female] -0.176*** -0.192*** -0.275*** -0.269***
(0.034) (0.040) (0.040) (0.037)
Age Group[31-45] -0.131** -0.154** 0.512 -0.004 -0.059
(0.044) (0.052) (0.585) (0.052) (0.051)
Age Group[46-60] -0.180*** -0.256*** 0.560 -0.266*** -0.205***
(0.047) (0.056) (0.756) (0.054) (0.052)
Age Group[60+] -0.283*** -0.309*** -0.193** -0.254***
(0.053) (0.060) (0.069) (0.061)
Event Occured[1] × Political Orientation[center] 0.048 0.110 0.032 -0.166 -0.205
(0.106) (0.138) (0.122) (0.147) (0.132)
Event Occured[1] × Political Orientation[right] 0.195* 0.042 -0.192 -0.113 -0.332**
(0.097) (0.126) (0.111) (0.135) (0.123)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.034 0.043 0.019 0.039 0.033
Adjusted R2 0.031 0.040 -0.981 0.035 0.030
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses.

1.3 Social Dimension

formula_str <- paste("pe_intolerance ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS")
models[[3]] <- mp3 # Override with panel model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Social Dimension")

notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Social Political Extremism ~ Event Occurred x Political Orientation + Demographics")
Social Political Extremism ~ Event Occurred x Political Orientation + Demographics
Dependent variable:
pe_intolerance
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] -0.118 -0.051 -0.113 0.273 -0.005
(0.128) (0.167) (0.167) (0.197) (0.181)
Political Orientation[center] 0.814*** 0.687*** 0.062 0.939*** 0.679***
(0.112) (0.113) (0.289) (0.195) (0.135)
Political Orientation[right] 1.559*** 1.807*** -0.101 1.738*** 1.449***
(0.103) (0.104) (0.314) (0.176) (0.126)
Gender[Female] 0.002 0.089 -0.018 0.046
(0.050) (0.058) (0.065) (0.060)
Age Group[31-45] 0.215** 0.186* 0.728 0.136 0.188*
(0.066) (0.077) (0.957) (0.084) (0.081)
Age Group[46-60] 0.337*** 0.257** 2.183 0.341*** 0.310***
(0.070) (0.082) (1.237) (0.086) (0.083)
Age Group[60+] 0.461*** 0.458*** 0.398*** 0.386***
(0.079) (0.088) (0.111) (0.097)
Event Occured[1] × Political Orientation[center] -0.121 0.241 0.038 -0.266 0.068
(0.158) (0.202) (0.200) (0.237) (0.211)
Event Occured[1] × Political Orientation[right] 0.244 -0.135 0.063 -0.294 -0.128
(0.145) (0.185) (0.181) (0.216) (0.196)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.170 0.175 0.009 0.118 0.091
Adjusted R2 0.168 0.172 -1.001 0.115 0.087
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses.

1.4 overall

formula_str <- paste("pe_overall ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS") 
models[[3]] <- mp4 # Override with panel model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Overall (Combined Dimensions)")

notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Overall Political Extremism ~ Event Occurred * Political Orientation + Demographics")
Overall Political Extremism ~ Event Occurred * Political Orientation + Demographics
Dependent variable:
pe_overall
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] -0.022 0.207 0.099 -0.064 0.227*
(0.087) (0.106) (0.096) (0.121) (0.111)
Political Orientation[center] -0.191* -0.291*** 0.129 -0.344** -0.196*
(0.076) (0.071) (0.165) (0.120) (0.083)
Political Orientation[right] 0.275*** 0.205** 0.017 -0.134 0.028
(0.070) (0.066) (0.179) (0.109) (0.077)
Gender[Female] -0.271*** -0.238*** -0.333*** -0.262***
(0.034) (0.037) (0.040) (0.037)
Age Group[31-45] 0.046 -0.013 0.540 0.013 0.051
(0.045) (0.049) (0.547) (0.052) (0.050)
Age Group[46-60] 0.127** 0.057 1.342 0.113* 0.155**
(0.048) (0.052) (0.706) (0.053) (0.051)
Age Group[60+] 0.238*** 0.255*** 0.316*** 0.293***
(0.054) (0.056) (0.068) (0.060)
Event Occured[1] × Political Orientation[center] -0.098 -0.079 -0.089 0.141 -0.136
(0.108) (0.128) (0.114) (0.146) (0.129)
Event Occured[1] × Political Orientation[right] -0.074 -0.323** -0.135 0.150 -0.287*
(0.098) (0.117) (0.103) (0.133) (0.120)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.074 0.072 0.011 0.053 0.041
Adjusted R2 0.072 0.069 -0.997 0.050 0.038
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses.

2 Individual Extremism Level

# Logistic regression with the response variable being a binary indicator of whether the respondent 
# is part of the more extremist group (counted in the Extremism Level index).
#
# The model asks: "How do event_occurred, political_orientation, and their interaction affect the odds of i_cel = 1, 
# controlling for age_group and accounting for unobserved individual-level characteristics?"

mp1 <- clogit(i_cel ~ event_occurred * pe_left_center_right + age_group + cluster(respondent_id), 
              data = panel_df, method = "approximate")
mp2 <- clogit(i_bel ~ event_occurred * pe_left_center_right + age_group + cluster(respondent_id), 
              data = panel_df, method = "approximate")
mp3_no_interaction <- clogit(i_sel ~ event_occurred + pe_left_center_right + age_group + cluster(respondent_id), 
              data = panel_df, method = "approximate")
mp4 <- clogit(i_oel ~ event_occurred * pe_left_center_right + age_group + cluster(respondent_id), 
              data = panel_df, method = "approximate")

2.1 Cognitive Dimension

formula_str <- paste("i_cel ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "Logit")
models[[3]] <- mp1 # Override with panel model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Cognitive Dimension", 
                    exp_ctrl = c(TRUE, TRUE, TRUE, TRUE, TRUE))

notes <- af_create_regression_notes(df, models = models, display_names = display_names, is_exp = TRUE,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, coef_exp = TRUE, notes = notes, 
             title = "Individual Extremist ~ Event Occurred x Political Orientation + Demographics")
Individual Extremist ~ Event Occurred x Political Orientation + Demographics
Dependent variable:
i_cel i_cel i_cel
logistic conditional logistic
logistic
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] 0.969 3.125*** 0.964 0.420** 1.456
(0.194) (0.246) (0.220) (0.276) (0.247)
Political Orientation[center] 0.277*** 0.209*** 0.217*** 0.208*** 0.330***
(0.196) (0.208) (0.257) (0.287) (0.208)
Political Orientation[right] 0.526*** 0.400*** 0.282*** 0.138*** 0.283***
(0.160) (0.166) (0.200) (0.259) (0.191)
Gender[Female] 0.513*** 0.468*** 0.402*** 0.521***
(0.094) (0.112) (0.119) (0.105)
Age Group[31-45] 0.932 0.912 0.887 0.875 1.073
(0.124) (0.151) (0.172) (0.155) (0.150)
Age Group[46-60] 1.107 1.196 1.256 1.112 1.292
(0.129) (0.156) (0.173) (0.156) (0.150)
Age Group[60+] 1.323* 1.684** 1.848*** 1.808** 1.844***
(0.140) (0.160) (0.175) (0.183) (0.163)
Event Occured[1] × Political Orientation[center] 0.765 0.453* 1.661** 1.518 1.061
(0.284) (0.353) (0.339) (0.355) (0.306)
Event Occured[1] × Political Orientation[right] 0.751 0.307*** 0.995 1.923* 0.783
(0.228) (0.286) (0.278) (0.322) (0.285)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.069
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses. The coefficients of models 1 and 2 and 3 and 4 and 5 are exponentiated.

2.2 Behavioral Dimension

formula_str <- paste("i_bel ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "Logit")
models[[3]] <- mp2 # Override with panel model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Behavioral Dimension", 
                    exp_ctrl = c(TRUE, TRUE, TRUE, TRUE, TRUE))

notes <- af_create_regression_notes(df, models = models, display_names = display_names, is_exp = TRUE,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, coef_exp = TRUE, notes = notes, 
             title = "Individual Extremist ~ Event Occurred x Political Orientation + Demographics")
Individual Extremist ~ Event Occurred x Political Orientation + Demographics
Dependent variable:
i_bel i_bel i_bel
logistic conditional logistic
logistic
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] 0.521** 0.810 1.557 1.343 1.289
(0.211) (0.302) (0.344) (0.286) (0.248)
Political Orientation[center] 0.878 1.283 1.451 1.228 0.881
(0.171) (0.194) (0.310) (0.284) (0.191)
Political Orientation[right] 1.250 2.319*** 1.824* 0.952 0.770
(0.154) (0.176) (0.290) (0.259) (0.178)
Gender[Female] 0.699*** 0.682*** 0.693*** 0.637***
(0.077) (0.089) (0.095) (0.086)
Age Group[31-45] 0.848 0.776* 0.891 0.988 0.928
(0.098) (0.114) (0.121) (0.118) (0.113)
Age Group[46-60] 0.695*** 0.577*** 0.422*** 0.575*** 0.606***
(0.106) (0.126) (0.163) (0.129) (0.121)
Age Group[60+] 0.615*** 0.670** 0.878 0.810 0.687**
(0.122) (0.134) (0.147) (0.160) (0.139)
Event Occured[1] × Political Orientation[center] 1.461 1.571 0.769 0.718 1.181
(0.258) (0.351) (0.394) (0.343) (0.290)
Event Occured[1] × Political Orientation[right] 1.853** 1.111 0.515* 0.816 0.735
(0.233) (0.322) (0.366) (0.315) (0.272)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.031
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses. The coefficients of models 1 and 2 and 3 and 4 and 5 are exponentiated.

2.3 Social Dimension

The social dimension of wave 4 does not have any left politically-oriented people in the extremism tail, i.e., i_sel == 0 for all respondents. This means we have perfect separation, and the regression will provide wrong results (inf). To resolve this, the interaction term was removed from pairs 3 & 4.

model4_data <- df[df$Wave %in% c("Fourth", "Fifth"), ]
model4_data$event_occurred <- ifelse(model4_data$Wave == "Fourth", 0, 1)
formula_no_interaction <- paste("i_sel ~ event_occurred + pe_left_center_right","+", d_fmla)
model4_no_interaction <- glm(formula_no_interaction, data = model4_data, family = binomial(link = "logit"))

formula_str <- paste("i_sel ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "Logit")
models[[3]] <- mp3_no_interaction # Override with panel no-interaction model
models[[4]] <- model4_no_interaction # Override with no-interaction model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Social Dimension", 
                    exp_ctrl = c(TRUE, TRUE, TRUE, TRUE, TRUE))

notes <- af_create_regression_notes(df, models = models, display_names = display_names, is_exp = TRUE,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, coef_exp = TRUE, notes = notes, 
             title = "Individual Extremist ~ Event Occurred x Political Orientation + Demographics")
Individual Extremist ~ Event Occurred x Political Orientation + Demographics
Dependent variable:
i_sel i_sel i_sel
logistic conditional logistic
logistic
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] 1.265 0.772 1.018 1.774
(0.513) (0.677) (0.136) (0.619)
Event Occured 0.948
(0.130)
Political Orientation[center] 4.005*** 1.831 12.048* 4.770*** 3.141*
(0.412) (0.387) (1.016) (0.473) (0.485)
Political Orientation[right] 10.189*** 9.447*** 32.068*** 14.547*** 9.668***
(0.392) (0.349) (1.003) (0.457) (0.462)
Gender[Female] 0.975 1.017 0.824 1.151
(0.099) (0.114) (0.122) (0.111)
Age Group[31-45] 1.258 1.029 0.768 0.836 0.986
(0.129) (0.148) (0.184) (0.161) (0.149)
Age Group[46-60] 1.228 1.045 1.044 1.312 1.193
(0.139) (0.159) (0.183) (0.159) (0.151)
Age Group[60+] 1.401* 1.096 0.869 1.164 1.134
(0.155) (0.172) (0.215) (0.206) (0.181)
Event Occured[1] × Political Orientation[center] 0.458 1.531 0.570
(0.566) (0.744) (0.670)
Event Occured[1] × Political Orientation[right] 0.945 0.926 0.554
(0.524) (0.690) (0.631)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.055
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses. The coefficients of models 1 and 2 and 3 and 4 and 5 are exponentiated.

2.4 Overall (Combined Dimensions)

formula_str <- paste("i_oel ~ event_occurred * pe_left_center_right","+", d_fmla)
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "Logit")
models[[3]] <- mp4 # Override with panel model

coef_table <- af_coef_and_ci_table(models, coef_names)
af_coef_and_ci_plot(coef_table, xpose = TRUE, title = "Overall (Combined Dimensions)", 
                    exp_ctrl = c(TRUE, TRUE, TRUE, TRUE, TRUE))

notes <- af_create_regression_notes(df, models = models, display_names = display_names, is_exp = TRUE,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, coef_exp = TRUE, notes = notes, 
             title = "Individual Extremist ~ Event Occurred x Political Orientation + Demographics")
Individual Extremist ~ Event Occurred x Political Orientation + Demographics
Dependent variable:
i_oel i_oel i_oel
logistic conditional logistic
logistic
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] 0.612 1.596 2.129 0.516 1.740
(0.359) (0.447) (0.592) (0.435) (0.410)
Political Orientation[center] 0.625 0.748 1.708 0.593 1.308
(0.306) (0.359) (0.548) (0.415) (0.342)
Political Orientation[right] 2.823*** 5.448*** 3.050* 1.295 3.071***
(0.244) (0.288) (0.513) (0.340) (0.312)
Gender[Female] 0.605*** 0.601*** 0.491*** 0.693**
(0.104) (0.119) (0.128) (0.117)
Age Group[31-45] 0.870 0.701* 0.828 0.888 0.893
(0.132) (0.154) (0.203) (0.164) (0.157)
Age Group[46-60] 0.867 0.780 1.091 1.109 1.128
(0.144) (0.166) (0.205) (0.168) (0.158)
Age Group[60+] 1.259 1.286 1.449 1.466 1.146
(0.154) (0.167) (0.211) (0.203) (0.187)
Event Occured[1] × Political Orientation[center] 1.195 1.419 0.348* 2.118 0.490
(0.471) (0.554) (0.687) (0.538) (0.485)
Event Occured[1] × Political Orientation[right] 1.899 0.418 0.410 2.286 0.416*
(0.376) (0.467) (0.614) (0.463) (0.432)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.020
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. The reference category for Political Orientation is ‘left’. The reference category for Gender is ‘Male’. The reference category for Age Group is ‘18-30’. Standard errors in parentheses. The coefficients of models 1 and 2 and 3 and 4 and 5 are exponentiated.

3 Multicollinearity (VIF) Test

formula_str <- paste("pe_overall ~ Wave * pe_left_center_right","+", d_fmla)
model <- lm(formula_str, data=df, na.action = na.omit)

result <- af_vif_test(model, interactions = TRUE)

print(result$interpretation)

[1] “We use VIF to test for multicollinearity. The results indicate that all adjusted GVIF values are ≤ 2.is not a concern.adjusted GVIF value: 1.01.”


result$table
Multicollinearity Assessment (with Interactions)
Predictor Adjusted GVIF1
Wave 1.002
pe_left_center_right 1.002
gender 1.010
age_group 1.010
1 Values > 2 indicate problematic multicollinearity

4 Robustness

4.1 Impact of Occurred Events on the Dimensions

mp1 <- plm(pe_ideology ~ event_occurred , data = p_data, model = "within")
mp2 <- plm(pe_violence ~ event_occurred , data = p_data, model = "within")
mp3 <- plm(pe_intolerance ~ event_occurred , data = p_data, model = "within")
mp4 <- plm(pe_overall ~ event_occurred , data = p_data, model = "within")
formula_str <- "pe_ideology ~ event_occurred"
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS")
models[[3]] <- mp1 # Override with panel model
notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Cognitive Political Extremism ~ Event Occurred")
Cognitive Political Extremism ~ Event Occurred
Dependent variable:
pe_ideology
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] -0.210** -0.047 0.035 0.106 0.121
(0.068) (0.074) (0.054) (0.084) (0.073)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.003 0.0002 0.001 0.001 0.001
Adjusted R2 0.003 -0.0002 -1.000 0.0003 0.001
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. Standard errors in parentheses.
formula_str <- "pe_violence ~ event_occurred"
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS") 
models[[3]] <- mp2 # Override with panel model
notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Behavioral Political Extremism ~ Event Occurred")
Behavioral Political Extremism ~ Event Occurred
Dependent variable:
pe_violence
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] 0.075* -0.038 0.005 0.054 0.034
(0.034) (0.042) (0.032) (0.044) (0.038)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.001 0.0003 0.00004 0.001 0.0003
Adjusted R2 0.001 -0.0001 -1.001 0.0002 -0.0001
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. Standard errors in parentheses.
formula_str <- "pe_intolerance ~ event_occurred"
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS")
models[[3]] <- mp3 # Override with panel model
notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Social Political Extremism ~ Event Occurred")
Social Political Extremism ~ Event Occurred
Dependent variable:
pe_intolerance
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] 0.0004 -0.001 -0.057 0.000 0.000
(0.055) (0.066) (0.052) (0.073) (0.063)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.000 0.00000 0.002 0.000 0.000
Adjusted R2 -0.0003 -0.0004 -0.998 -0.0005 -0.0004
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. Standard errors in parentheses.
formula_str <- "pe_overall ~ event_occurred"
models <- af_wave_pair_regression(df, wave_var = wave_var, wave_list = wave_list, 
                                      formula_str = formula_str, regression_type = "OLS") 
models[[3]] <- mp4 # Override with panel model
notes <- af_create_regression_notes(df, models = models, display_names = display_names,
                                   show_significance = TRUE, significance_levels = c(0.05, 0.01, 0.001))
cov_labels <- af_cov_names(df, models, display_names)
af_stargazer(models = models, cov_labels = cov_labels, notes = notes, 
             title = "Overall Political Extremism ~ Event Occurred")
Overall Political Extremism ~ Event Occurred
Dependent variable:
pe_overall
OLS panel OLS
linear
Inland Terror Bennet Gov. Fall Judicial Reform Gallant Dismissal Oct. 7th War
(1) (2) (3) (4) (5)
Event Occured[1] -0.078* -0.013 -0.006 0.050 0.057
(0.035) (0.039) (0.030) (0.044) (0.038)
Observations 3,215 2,493 1,342 2,221 2,638
R2 0.002 0.00004 0.0001 0.001 0.001
Adjusted R2 0.001 -0.0004 -1.001 0.0001 0.001
Note: * p < 0.050; ** p < 0.010; *** p < 0.001. The reference category for Event Occured is ‘0’. Standard errors in parentheses.