source("../Utilities/Utilities-Main.R")
source("../Utilities/Utilities-Extra.R")

data_FFM_eff <- data_FFM %>% filter(INCLUDE_AS_JUDGE_OP == 1)

eff_E <- data_FFM_eff %>% filter(IV == 3)
eff_A <- data_FFM_eff %>% filter(IV == 4)

eff_E_control <- get_data(eff_E)
eff_A_control <- get_data(eff_A)

eff_E_control$mods <- eff_E$Collectivism

eff_E_control$Occupation <- as.factor(eff_E$`Occupation Code`)
eff_E_control$Percent_Male <- eff_E$mod_menamongleaders
control_model_E <- rma(ri.m, var.i2, weights = 1/var.i2, mods = ~ mods + Occupation + Percent_Male, 
                       method = "HS", test = "knha", data = eff_E_control)
summary(control_model_E)   # p < .05, k = 47

eff_A_control$mods <- eff_A$Collectivism
eff_A_control$Occupation <- as.factor(eff_A$`Occupation Code`)
eff_A_control$Percent_Male <- eff_A$mod_menamongleaders

control_model_A <- rma(ri.m, var.i2, weights = 1/var.i2, mods = ~ mods + Occupation + Percent_Male, method = "HS", test = "knha", data = eff_A_control)
summary(control_model_A)   # p < .05, k = 39
