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


##### Effectiveness
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_C <- data_FFM_eff %>% filter(IV == 2)
eff_N <- data_FFM_eff %>% filter(IV == 5)
eff_O <- data_FFM_eff %>% filter(IV == 1)

### Collectivism
calculation_mod(eff_E, mods = eff_E$Collectivism, method = "HS")$result
calculation_mod(eff_A, mods = eff_A$Collectivism, method = "HS")$result 
calculation_mod(eff_C, mods = eff_C$Collectivism, method = "HS")$result 
calculation_mod(eff_N, mods = eff_N$Collectivism, method = "HS")$result 
calculation_mod(eff_O, mods = eff_O$Collectivism, method = "HS")$result 

### Power Distance
calculation_mod(eff_E, mods = eff_E$Power_Distance, method = "HS")$result 
calculation_mod(eff_A, mods = eff_A$Power_Distance, method = "HS")$result 
calculation_mod(eff_C, mods = eff_C$Power_Distance, method = "HS")$result 
calculation_mod(eff_N, mods = eff_N$Power_Distance, method = "HS")$result 
calculation_mod(eff_O, mods = eff_O$Power_Distance, method = "HS")$result 

### Uncertainty Avoidance
calculation_mod(eff_E, mods = eff_E$Uncertainty_Avoidance, method = "HS")$result   # p = .0346
calculation_mod(eff_A, mods = eff_A$Uncertainty_Avoidance, method = "HS")$result 
calculation_mod(eff_C, mods = eff_C$Uncertainty_Avoidance, method = "HS")$result 
calculation_mod(eff_N, mods = eff_N$Uncertainty_Avoidance, method = "HS")$result 
calculation_mod(eff_O, mods = eff_O$Uncertainty_Avoidance, method = "HS")$result 

### Masculinity-Femininity (Assertiveness)
calculation_mod(eff_E, mods = eff_E$Assertiveness, method = "HS")$result 
calculation_mod(eff_A, mods = eff_A$Assertiveness, method = "HS")$result
calculation_mod(eff_C, mods = eff_C$Assertiveness, method = "HS")$result 
calculation_mod(eff_N, mods = eff_N$Assertiveness, method = "HS")$result 
calculation_mod(eff_O, mods = eff_O$Assertiveness, method = "HS")$result 

### Tightness-Looseness
calculation_mod(eff_E, mods = eff_E$Tightness_Looseness, method = "HS")$result 
calculation_mod(eff_A, mods = eff_A$Tightness_Looseness, method = "HS")$result 
calculation_mod(eff_C, mods = eff_C$Tightness_Looseness, method = "HS")$result 
calculation_mod(eff_N, mods = eff_N$Tightness_Looseness, method = "HS")$result 
calculation_mod(eff_O, mods = eff_O$Tightness_Looseness, method = "HS")$result 


##### Emergence
data_FFM_emg <- data_FFM %>% filter(DV == 1 & INCLUDE_IN_ANALYSIS == 1)

emg_E <- data_FFM_emg %>% filter(IV == 3)
emg_A <- data_FFM_emg %>% filter(IV == 4)
emg_C <- data_FFM_emg %>% filter(IV == 2)
emg_N <- data_FFM_emg %>% filter(IV == 5)
emg_O <- data_FFM_emg %>% filter(IV == 1)

### Collectivism
calculation_mod(emg_E, mods = emg_E$Collectivism, method = "HS")$result 
calculation_mod(emg_A, mods = emg_A$Collectivism, method = "HS")$result 
calculation_mod(emg_C, mods = emg_C$Collectivism, method = "HS")$result 
calculation_mod(emg_N, mods = emg_N$Collectivism, method = "HS")$result 
calculation_mod(emg_O, mods = emg_O$Collectivism, method = "HS")$result   # p = .0472

### Power Distance
calculation_mod(emg_E, mods = emg_E$Power_Distance, method = "HS")$result 
calculation_mod(emg_A, mods = emg_A$Power_Distance, method = "HS")$result   # p = .0052
calculation_mod(emg_C, mods = emg_C$Power_Distance, method = "HS")$result 
calculation_mod(emg_N, mods = emg_N$Power_Distance, method = "HS")$result 
calculation_mod(emg_O, mods = emg_O$Power_Distance, method = "HS")$result 

### Uncertainty Avoidance
calculation_mod(emg_E, mods = emg_E$Uncertainty_Avoidance, method = "HS")$result
calculation_mod(emg_A, mods = emg_A$Uncertainty_Avoidance, method = "HS")$result 
calculation_mod(emg_C, mods = emg_C$Uncertainty_Avoidance, method = "HS")$result 
calculation_mod(emg_N, mods = emg_N$Uncertainty_Avoidance, method = "HS")$result 
calculation_mod(emg_O, mods = emg_O$Uncertainty_Avoidance, method = "HS")$result 

### Masculinity-Femininity (Assertiveness)
calculation_mod(emg_E, mods = emg_E$Assertiveness, method = "HS")$result 
calculation_mod(emg_A, mods = emg_A$Assertiveness, method = "HS")$result
calculation_mod(emg_C, mods = emg_C$Assertiveness, method = "HS")$result 
calculation_mod(emg_N, mods = emg_N$Assertiveness, method = "HS")$result 
calculation_mod(emg_O, mods = emg_O$Assertiveness, method = "HS")$result 

### Tightness-Looseness
calculation_mod(emg_E, mods = emg_E$Tightness_Looseness, method = "HS")$result 
calculation_mod(emg_A, mods = emg_A$Tightness_Looseness, method = "HS")$result 
calculation_mod(emg_C, mods = emg_C$Tightness_Looseness, method = "HS")$result 
calculation_mod(emg_N, mods = emg_N$Tightness_Looseness, method = "HS")$result 
calculation_mod(emg_O, mods = emg_O$Tightness_Looseness, method = "HS")$result 
