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

event_names = c("Inland Terror", "Bennet Gov. Fall", "Judicial Reform", "Gallant Dismissal", "Oct. 7th War")

demographics <- c("gender", "age_group") # , "education"

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

1 Combined Effects

1.1 Cognitive (Ideology) Dimension

# Basic analysis (no controls)
results_c_overall <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_ideology", 
  group_var = NULL,
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Cognitive (Ideology) Dimension"
)

# View results
cat(results_c_overall$results_text)

1.1.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 12.98, p = 0.000, η²p = 0.002

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.78, SE = 0.05 (n = 1608) - Post_Event: M = 3.57, SE = 0.04 (n = 1607)

1.1.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.00, p = 0.947, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.57, SE = 0.04 (n = 1607) - Post_Event: M = 3.52, SE = 0.06 (n = 886)

1.1.3 PAIR3 (PANEL - REPEATED MEASURES) - 666 matched pairs

Main effect of Wave: F(1, 665) = 0.31, p = 0.579, ηG² = 0.000

Control Variables: gender, age_group

Descriptive Statistics: - Pre_Event: M = 3.48, SE = 0.07 (n = 666) - Post_Event: M = 3.51, SE = 0.07 (n = 666)

1.1.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 2.14, p = 0.143, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.55, SE = 0.07 (n = 697) - Post_Event: M = 3.66, SE = 0.05 (n = 1524)

1.1.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.20, p = 0.654, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.66, SE = 0.05 (n = 1524) - Post_Event: M = 3.78, SE = 0.06 (n = 1114)

print(results_c_overall$plot)

1.2 Behavioral (Violence) Dimension

# Basic analysis (no controls)
results_b_overall <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_violence", 
  group_var = NULL,
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Behavioral (Violence) Dimension"
)

# View results
cat(results_b_overall$results_text)

1.2.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 7.46, p = 0.006, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 1.53, SE = 0.02 (n = 1608) - Post_Event: M = 1.61, SE = 0.03 (n = 1607)

1.2.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 1.52, p = 0.217, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 1.61, SE = 0.03 (n = 1607) - Post_Event: M = 1.57, SE = 0.03 (n = 886)

1.2.3 PAIR3 (PANEL - REPEATED MEASURES) - 666 matched pairs

Main effect of Wave: F(1, 665) = 0.01, p = 0.909, ηG² = 0.000

Control Variables: gender, age_group

Descriptive Statistics: - Pre_Event: M = 1.54, SE = 0.04 (n = 666) - Post_Event: M = 1.54, SE = 0.04 (n = 666)

1.2.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 1.04, p = 0.307, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 1.53, SE = 0.04 (n = 697) - Post_Event: M = 1.58, SE = 0.02 (n = 1524)

1.2.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 2.66, p = 0.103, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 1.58, SE = 0.02 (n = 1524) - Post_Event: M = 1.62, SE = 0.03 (n = 1114)

print(results_b_overall$plot)

1.3 Social (Intolerance) Dimension

# Basic analysis (no controls)
results_s_overall <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_intolerance", 
  group_var = NULL,
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Social (Intolerance) Dimension"
)

# View results
cat(results_s_overall$results_text)

1.3.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.04, p = 0.833, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.84, SE = 0.04 (n = 1608) - Post_Event: M = 3.84, SE = 0.04 (n = 1607)

1.3.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.04, p = 0.852, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.84, SE = 0.04 (n = 1607) - Post_Event: M = 3.84, SE = 0.05 (n = 886)

1.3.3 PAIR3 (PANEL - REPEATED MEASURES) - 666 matched pairs

Main effect of Wave: F(1, 665) = 1.61, p = 0.205, ηG² = 0.000

Control Variables: gender, age_group

Descriptive Statistics: - Pre_Event: M = 3.91, SE = 0.06 (n = 666) - Post_Event: M = 3.85, SE = 0.06 (n = 666)

1.3.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.02, p = 0.883, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.84, SE = 0.06 (n = 697) - Post_Event: M = 3.84, SE = 0.04 (n = 1524)

1.3.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.13, p = 0.724, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.84, SE = 0.04 (n = 1524) - Post_Event: M = 3.84, SE = 0.05 (n = 1114)

print(results_s_overall$plot)

1.4 Overall (Combined Dimensions)

# Basic analysis (no controls)
results_o_overall <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_overall", 
  group_var = NULL,
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Overall (Combined Dimensions)"
)

# View results
cat(results_o_overall$results_text)

1.4.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 6.81, p = 0.009, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.44, SE = 0.03 (n = 1608) - Post_Event: M = 3.37, SE = 0.02 (n = 1607)

1.4.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.02, p = 0.884, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.37, SE = 0.02 (n = 1607) - Post_Event: M = 3.35, SE = 0.03 (n = 886)

1.4.3 PAIR3 (PANEL - REPEATED MEASURES) - 666 matched pairs

Main effect of Wave: F(1, 665) = 0.14, p = 0.713, ηG² = 0.000

Control Variables: gender, age_group

Descriptive Statistics: - Pre_Event: M = 3.35, SE = 0.04 (n = 666) - Post_Event: M = 3.34, SE = 0.04 (n = 666)

1.4.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 1.74, p = 0.187, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.35, SE = 0.04 (n = 697) - Post_Event: M = 3.40, SE = 0.02 (n = 1524)

1.4.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.28, p = 0.595, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + gender_factor + age_group_factor

Descriptive Statistics: - Pre_Event: M = 3.40, SE = 0.02 (n = 1524) - Post_Event: M = 3.46, SE = 0.03 (n = 1114)

print(results_o_overall$plot)

1.5 Combined Effects Plot

overall_effects <- af_extract_overall_effects(
  results_list = list(results_c_overall, results_b_overall, results_s_overall, results_o_overall),
  extremism_labels = c("Cognitive", "Behavioral", "Social", "Overall"),
  event_names = event_names
)

p <- af_plot_overall_effects(
  overall_data = overall_effects,
  plot_title = "Overall Political Extremism Response to Events",
  plot_note = "Error bars represent 95% confidence intervals"
)

print(p)

2 Effects by political Orientation

2.1 Cognitive (Ideology) Dimension

# Basic analysis (no controls)
results_c <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_ideology", 
  group_var = "pe_left_center_right",
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Cognitive (Ideology) Dimension"
)

# View results
cat(results_c$results_text)

2.1.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 23.57, p = 0.000, η²p = 0.004 Main effect of pe_left_center_right: F(2, 2) = 36.90, p = 0.000, η²p = 0.013 Interaction effect: F(2, 2) = 5.20, p = 0.006, η²p = 0.002

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.81, SE = 0.07 (n = 901) - center Pre_Event: M = 3.31, SE = 0.09 (n = 464) - left Pre_Event: M = 4.57, SE = 0.13 (n = 243) - right Post_Event: M = 3.43, SE = 0.06 (n = 887) - center Post_Event: M = 3.28, SE = 0.07 (n = 475) - left Post_Event: M = 4.64, SE = 0.11 (n = 245)

2.1.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.86, p = 0.353, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 59.56, p = 0.000, η²p = 0.026 Interaction effect: F(2, 2) = 3.37, p = 0.035, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.43, SE = 0.06 (n = 887) - center Pre_Event: M = 3.28, SE = 0.07 (n = 475) - left Pre_Event: M = 4.64, SE = 0.11 (n = 245) - right Post_Event: M = 3.32, SE = 0.07 (n = 542) - center Post_Event: M = 3.30, SE = 0.10 (n = 238) - left Post_Event: M = 5.08, SE = 0.18 (n = 106)

2.1.3 PAIR3 (PANEL - REPEATED MEASURES) - 595 matched pairs

Main effect of Wave: F(1, 571) = 0.54, p = 0.461, ηG² = 0.000 Main effect of pe_left_center_right: F(2, 571) = 40.10, p = 0.000, ηG² = 0.103

Control Variables: gender, age_group

Descriptive Statistics: - right Pre_Event: M = 3.33, SE = 0.09 (n = 385) - center Pre_Event: M = 3.40, SE = 0.13 (n = 151) - left Pre_Event: M = 5.24, SE = 0.23 (n = 59) - right Post_Event: M = 3.33, SE = 0.09 (n = 385) - center Post_Event: M = 3.30, SE = 0.15 (n = 151) - left Post_Event: M = 5.49, SE = 0.19 (n = 59)

2.1.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 3.12, p = 0.078, η²p = 0.001 Main effect of pe_left_center_right: F(2, 2) = 37.92, p = 0.000, η²p = 0.023 Interaction effect: F(2, 2) = 3.02, p = 0.049, η²p = 0.002

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.32, SE = 0.08 (n = 419) - center Pre_Event: M = 3.34, SE = 0.13 (n = 189) - left Pre_Event: M = 5.08, SE = 0.19 (n = 89) - right Post_Event: M = 3.49, SE = 0.06 (n = 889) - center Post_Event: M = 3.64, SE = 0.08 (n = 457) - left Post_Event: M = 4.58, SE = 0.14 (n = 178)

2.1.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.00, p = 0.948, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 31.13, p = 0.000, η²p = 0.014 Interaction effect: F(2, 2) = 0.80, p = 0.450, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_ideology ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.49, SE = 0.06 (n = 889) - center Pre_Event: M = 3.64, SE = 0.08 (n = 457) - left Pre_Event: M = 4.58, SE = 0.14 (n = 178) - right Post_Event: M = 3.54, SE = 0.07 (n = 662) - center Post_Event: M = 3.78, SE = 0.11 (n = 328) - left Post_Event: M = 5.09, SE = 0.17 (n = 124)

print(results_c$plot)

2.2 Behavioral (Violence) Dimension

# Basic analysis (no controls)
results_b <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_violence", 
  group_var = "pe_left_center_right",
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Behavioral (Violence) Dimension"
)

# View results
cat(results_b$results_text)

2.2.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 13.26, p = 0.000, η²p = 0.003 Main effect of pe_left_center_right: F(2, 2) = 2.95, p = 0.052, η²p = 0.001 Interaction effect: F(2, 2) = 3.02, p = 0.049, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 1.59, SE = 0.03 (n = 901) - center Pre_Event: M = 1.50, SE = 0.04 (n = 464) - left Pre_Event: M = 1.39, SE = 0.05 (n = 243) - right Post_Event: M = 1.75, SE = 0.04 (n = 887) - center Post_Event: M = 1.49, SE = 0.04 (n = 475) - left Post_Event: M = 1.34, SE = 0.04 (n = 245)

2.2.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 2.24, p = 0.135, η²p = 0.001 Main effect of pe_left_center_right: F(2, 2) = 14.84, p = 0.000, η²p = 0.007 Interaction effect: F(2, 2) = 0.39, p = 0.675, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 1.75, SE = 0.04 (n = 887) - center Pre_Event: M = 1.49, SE = 0.04 (n = 475) - left Pre_Event: M = 1.34, SE = 0.04 (n = 245) - right Post_Event: M = 1.66, SE = 0.04 (n = 542) - center Post_Event: M = 1.50, SE = 0.06 (n = 238) - left Post_Event: M = 1.26, SE = 0.06 (n = 106)

2.2.3 PAIR3 (PANEL - REPEATED MEASURES) - 595 matched pairs

Main effect of Wave: F(1, 571) = 1.47, p = 0.226, ηG² = 0.001 Main effect of pe_left_center_right: F(2, 571) = 2.57, p = 0.077, ηG² = 0.007

Control Variables: gender, age_group

Descriptive Statistics: - right Pre_Event: M = 1.62, SE = 0.05 (n = 385) - center Pre_Event: M = 1.44, SE = 0.07 (n = 151) - left Pre_Event: M = 1.25, SE = 0.07 (n = 59) - right Post_Event: M = 1.55, SE = 0.05 (n = 385) - center Post_Event: M = 1.58, SE = 0.08 (n = 151) - left Post_Event: M = 1.41, SE = 0.11 (n = 59)

2.2.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.58, p = 0.447, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 1.41, p = 0.243, η²p = 0.001 Interaction effect: F(2, 2) = 0.64, p = 0.528, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 1.53, SE = 0.05 (n = 419) - center Pre_Event: M = 1.57, SE = 0.07 (n = 189) - left Pre_Event: M = 1.45, SE = 0.09 (n = 89) - right Post_Event: M = 1.59, SE = 0.03 (n = 889) - center Post_Event: M = 1.58, SE = 0.04 (n = 457) - left Post_Event: M = 1.55, SE = 0.07 (n = 178)

2.2.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.01, p = 0.905, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 0.29, p = 0.748, η²p = 0.000 Interaction effect: F(2, 2) = 4.07, p = 0.017, η²p = 0.002

Control Variables: gender, age_group Model Formula: pe_violence ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 1.59, SE = 0.03 (n = 889) - center Pre_Event: M = 1.58, SE = 0.04 (n = 457) - left Pre_Event: M = 1.55, SE = 0.07 (n = 178) - right Post_Event: M = 1.55, SE = 0.04 (n = 662) - center Post_Event: M = 1.66, SE = 0.05 (n = 328) - left Post_Event: M = 1.87, SE = 0.11 (n = 124)

print(results_b$plot)

2.3 Social (Intolerance) Dimension

# Basic analysis (no controls)
results_s <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_intolerance", 
  group_var = "pe_left_center_right",
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Social (Intolerance) Dimension"
)

# View results
cat(results_s$results_text)

2.3.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 3.55, p = 0.060, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 128.97, p = 0.000, η²p = 0.035 Interaction effect: F(2, 2) = 5.46, p = 0.004, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 4.27, SE = 0.05 (n = 901) - center Pre_Event: M = 3.57, SE = 0.07 (n = 464) - left Pre_Event: M = 2.76, SE = 0.08 (n = 243) - right Post_Event: M = 4.42, SE = 0.05 (n = 887) - center Post_Event: M = 3.36, SE = 0.06 (n = 475) - left Post_Event: M = 2.67, SE = 0.08 (n = 245)

2.3.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 5.63, p = 0.018, η²p = 0.001 Main effect of pe_left_center_right: F(2, 2) = 190.68, p = 0.000, η²p = 0.062 Interaction effect: F(2, 2) = 3.68, p = 0.025, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 4.42, SE = 0.05 (n = 887) - center Pre_Event: M = 3.36, SE = 0.06 (n = 475) - left Pre_Event: M = 2.67, SE = 0.08 (n = 245) - right Post_Event: M = 4.23, SE = 0.07 (n = 542) - center Post_Event: M = 3.50, SE = 0.10 (n = 238) - left Post_Event: M = 2.57, SE = 0.13 (n = 106)

2.3.3 PAIR3 (PANEL - REPEATED MEASURES) - 595 matched pairs

Main effect of Wave: F(1, 571) = 0.70, p = 0.403, ηG² = 0.000 Main effect of pe_left_center_right: F(2, 571) = 52.84, p = 0.000, ηG² = 0.128

Control Variables: gender, age_group

Descriptive Statistics: - right Pre_Event: M = 4.37, SE = 0.08 (n = 385) - center Pre_Event: M = 3.55, SE = 0.12 (n = 151) - left Pre_Event: M = 2.42, SE = 0.15 (n = 59) - right Post_Event: M = 4.32, SE = 0.08 (n = 385) - center Post_Event: M = 3.47, SE = 0.12 (n = 151) - left Post_Event: M = 2.35, SE = 0.14 (n = 59)

2.3.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 0.06, p = 0.812, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 55.88, p = 0.000, η²p = 0.028 Interaction effect: F(2, 2) = 0.93, p = 0.393, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 4.27, SE = 0.07 (n = 419) - center Pre_Event: M = 3.49, SE = 0.11 (n = 189) - left Pre_Event: M = 2.53, SE = 0.12 (n = 89) - right Post_Event: M = 4.22, SE = 0.05 (n = 889) - center Post_Event: M = 3.50, SE = 0.07 (n = 457) - left Post_Event: M = 2.80, SE = 0.09 (n = 178)

2.3.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 2.82, p = 0.093, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 84.24, p = 0.000, η²p = 0.030 Interaction effect: F(2, 2) = 1.09, p = 0.335, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_intolerance ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 4.22, SE = 0.05 (n = 889) - center Pre_Event: M = 3.50, SE = 0.07 (n = 457) - left Pre_Event: M = 2.80, SE = 0.09 (n = 178) - right Post_Event: M = 4.13, SE = 0.06 (n = 662) - center Post_Event: M = 3.62, SE = 0.08 (n = 328) - left Post_Event: M = 2.86, SE = 0.12 (n = 124)

print(results_s$plot)

2.4 Overall (Combined Dimensions)

# Basic analysis (no controls)
results_o <- af_analyze_extremism_waves(
  df = df, 
  wave_var = "Wave",
  extremism_var = "pe_overall", 
  group_var = "pe_left_center_right",
  respondent_id_var = "respondent_id", 
  control_vars = c("gender", "age_group"), 
  panel_pairs = c(3),
  event_names = event_names,
  plots_per_row = 5,      
  line_width = 0.7,       
  use_bw = FALSE,
  show_sig = TRUE,
  plot_title = "Overall (Combined Dimensions)"
)

# View results
cat(results_o$results_text)

2.4.1 PAIR1 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 4.44, p = 0.035, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 37.11, p = 0.000, η²p = 0.007 Interaction effect: F(2, 2) = 0.42, p = 0.655, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.62, SE = 0.04 (n = 901) - center Pre_Event: M = 3.16, SE = 0.04 (n = 464) - left Pre_Event: M = 3.35, SE = 0.06 (n = 243) - right Post_Event: M = 3.55, SE = 0.03 (n = 887) - center Post_Event: M = 3.04, SE = 0.03 (n = 475) - left Post_Event: M = 3.35, SE = 0.05 (n = 245)

2.4.2 PAIR2 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 5.54, p = 0.019, η²p = 0.001 Main effect of pe_left_center_right: F(2, 2) = 45.42, p = 0.000, η²p = 0.011 Interaction effect: F(2, 2) = 6.21, p = 0.002, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.55, SE = 0.03 (n = 887) - center Pre_Event: M = 3.04, SE = 0.03 (n = 475) - left Pre_Event: M = 3.35, SE = 0.05 (n = 245) - right Post_Event: M = 3.42, SE = 0.04 (n = 542) - center Post_Event: M = 3.12, SE = 0.05 (n = 238) - left Post_Event: M = 3.54, SE = 0.08 (n = 106)

2.4.3 PAIR3 (PANEL - REPEATED MEASURES) - 595 matched pairs

Main effect of Wave: F(1, 571) = 0.24, p = 0.623, ηG² = 0.000 Main effect of pe_left_center_right: F(2, 571) = 4.36, p = 0.013, ηG² = 0.012

Control Variables: gender, age_group

Descriptive Statistics: - right Pre_Event: M = 3.47, SE = 0.05 (n = 385) - center Pre_Event: M = 3.17, SE = 0.06 (n = 151) - left Pre_Event: M = 3.55, SE = 0.10 (n = 59) - right Post_Event: M = 3.42, SE = 0.05 (n = 385) - center Post_Event: M = 3.14, SE = 0.07 (n = 151) - left Post_Event: M = 3.67, SE = 0.09 (n = 59)

2.4.4 PAIR4 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 2.40, p = 0.121, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 5.02, p = 0.007, η²p = 0.002 Interaction effect: F(2, 2) = 0.65, p = 0.524, η²p = 0.000

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.40, SE = 0.05 (n = 419) - center Pre_Event: M = 3.16, SE = 0.06 (n = 189) - left Pre_Event: M = 3.54, SE = 0.08 (n = 89) - right Post_Event: M = 3.47, SE = 0.03 (n = 889) - center Post_Event: M = 3.26, SE = 0.04 (n = 457) - left Post_Event: M = 3.42, SE = 0.06 (n = 178)

2.4.5 PAIR5 (CROSS-SECTIONAL)

Main effect of Wave: F(1, 1) = 1.53, p = 0.216, η²p = 0.000 Main effect of pe_left_center_right: F(2, 2) = 8.68, p = 0.000, η²p = 0.002 Interaction effect: F(2, 2) = 3.68, p = 0.025, η²p = 0.001

Control Variables: gender, age_group Model Formula: pe_overall ~ wave_factor + group_factor + gender_factor + age_group_factor + wave_factor:group_factor

Descriptive Statistics: - right Pre_Event: M = 3.47, SE = 0.03 (n = 889) - center Pre_Event: M = 3.26, SE = 0.04 (n = 457) - left Pre_Event: M = 3.42, SE = 0.06 (n = 178) - right Post_Event: M = 3.44, SE = 0.04 (n = 662) - center Post_Event: M = 3.40, SE = 0.05 (n = 328) - left Post_Event: M = 3.75, SE = 0.08 (n = 124)

print(results_o$plot)

2.5 Combined Effects PLot by Political Orientation

effect_data <- af_extract_effect_data(
  results_list = list(results_c, results_b, results_s, results_o),
  extremism_labels = c("Cognitive", "Behavioral", "Social", "Overall"),
  event_names = event_names,
  df = df,
  group_var = "pe_left_center_right",
  panel_pairs = c(3)
  )

p <- af_plot_effects(
  effect_data = effect_data,
  plot_title = "Political Extremism Response to Events",
  plot_note = "Error bars represent 95% confidence intervals",
  use_bw = FALSE
  )

p