Are the explicit measures correlated with language bias?
Read in behavior and language biases
countries_langs <- read_csv("../../data/other/countries_lang.csv") %>%
mutate(language_name = ifelse(language_name == "Spanish; Castilian", "Spanish", language_name),
language_name = ifelse(language_name == "Dutch; Flemish", "Dutch", language_name))
IAT_behavior_measures <- read_csv("IAT_behavior_measures.csv") %>%
left_join(countries_langs %>% select(country_name, language_name, language_code)) %>%
filter(type %in% c("country_fam_male",
"country_career_male",
"career_importance",
"family_importance",
"actual_duties")) %>%
group_by(type, language_code, sex) %>%
summarize(mean = mean(mean))
lang_bias <- read_csv("career_effect_sizes.csv")
lang_bias_google <- read_csv("google_translate/career_effect_sizes_google.csv",
col_names = c("language_code", "test", "test_name", "lang_bias")) %>%
filter(language_code != "he", language_code != "zu", language_code != "th")
#,language_code != "ha",language_code != "id",language_code != "zh")
d <- left_join(IAT_behavior_measures, lang_bias) %>%
mutate_if(is.character, as.factor) %>%
filter(!is.na(lang_bias))
There are 22 languages represented here.
ggplot(d, aes(x = mean)) +
geom_histogram() +
facet_wrap(~type, scales = "free_x")+
theme_bw()
d %>%
mutate(type2 = ifelse(type %in% c("country_gender_D_score_diff", "country_means_D_score", "country_gender_D_score"), "D-score", ifelse(type %in% c("country_RT_ratio", "country_RT_mean"), "RT", "explicit"))) %>%
ggplot( aes(x = mean, y = lang_bias, group = sex, color = sex, shape = type2)) +
geom_point() +
geom_smooth(method = "lm") +
facet_grid(.~type2 + type, scales = "free_x", drop = T) +
theme_bw()
d %>%
group_by(type, sex) %>%
do(tidy(cor.test(.$mean, .$lang_bias))) %>%
arrange(p.value) %>%
select(-parameter, -method, -alternative) %>%
kable()
| type | sex | estimate | statistic | p.value | conf.low | conf.high |
|---|---|---|---|---|---|---|
| country_fam_male | m | -0.4218447 | -2.0807468 | 0.0505227 | -0.7160935 | -0.0002873 |
| country_fam_male | all | -0.3369457 | -1.6004551 | 0.1251758 | -0.6641987 | 0.0986813 |
| actual_duties | f | 0.3007289 | 1.4101781 | 0.1738504 | -0.1384312 | 0.6410577 |
| country_career_male | m | -0.2294514 | -1.0542654 | 0.3043319 | -0.5936326 | 0.2127370 |
| country_fam_male | f | -0.1772190 | -0.8052942 | 0.4301204 | -0.5571955 | 0.2641240 |
| actual_duties | m | 0.1680040 | 0.7621699 | 0.4548538 | -0.2729371 | 0.5506116 |
| family_importance | f | 0.1572155 | 0.7119426 | 0.4847230 | -0.2831619 | 0.5428425 |
| career_importance | f | 0.1314582 | 0.5930457 | 0.5597977 | -0.3071751 | 0.5240233 |
| family_importance | m | 0.0334524 | 0.1496876 | 0.8825103 | -0.3937088 | 0.4487320 |
| career_importance | m | 0.0235743 | 0.1054570 | 0.9170637 | -0.4020299 | 0.4408016 |
| country_career_male | f | -0.0030871 | -0.0138060 | 0.9891216 | -0.4241435 | 0.4190668 |
d <- left_join(IAT_behavior_measures, lang_bias_google) %>%
mutate_if(is.character, as.factor) %>%
filter(!is.na(lang_bias))
There are 24 languages represented here.
d %>%
mutate(type2 = ifelse(type %in% c("country_gender_D_score_diff", "country_means_D_score", "country_gender_D_score"), "D-score", ifelse(type %in% c("country_RT_ratio", "country_RT_mean"), "RT", "explicit"))) %>%
ggplot( aes(x = mean, y = lang_bias,
group = sex, color = sex, shape = type2)) +
geom_point() +
geom_smooth(method = "lm") +
facet_grid(.~type2 + type, scales = "free_x", drop = T) +
theme_bw()
d %>%
group_by(type, sex) %>%
do(tidy(cor.test(.$mean, .$lang_bias))) %>%
arrange(p.value) %>%
select(-parameter, -method, -alternative) %>%
kable()
| type | sex | estimate | statistic | p.value | conf.low | conf.high |
|---|---|---|---|---|---|---|
| country_career_male | m | -0.2693992 | -1.3121047 | 0.2030113 | -0.6068470 | 0.1503351 |
| country_fam_male | m | -0.1911728 | -0.9135289 | 0.3708681 | -0.5520001 | 0.2299579 |
| actual_duties | m | 0.1191114 | 0.5626880 | 0.5793369 | -0.2986344 | 0.4985531 |
| career_importance | f | 0.0756430 | 0.3558165 | 0.7253672 | -0.3380696 | 0.4648551 |
| actual_duties | f | -0.0534211 | -0.2509256 | 0.8042004 | -0.4471811 | 0.3576836 |
| country_fam_male | all | -0.0524387 | -0.2462984 | 0.8077348 | -0.4463926 | 0.3585424 |
| country_career_male | f | -0.0522501 | -0.2454098 | 0.8084140 | -0.4462411 | 0.3587073 |
| family_importance | f | -0.0421212 | -0.1977415 | 0.8450630 | -0.4380744 | 0.3675202 |
| career_importance | m | -0.0281069 | -0.1318850 | 0.8962740 | -0.4266660 | 0.3795938 |
| family_importance | m | 0.0248419 | 0.1165550 | 0.9082701 | -0.3823867 | 0.4239898 |
| country_fam_male | f | 0.0121356 | 0.0569254 | 0.9551185 | -0.3931859 | 0.4135080 |