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.4425174 | -2.2068315 | 0.0391791 | -0.7282558 | -0.0257047 |
| country_fam_male | all | -0.3651060 | -1.7538813 | 0.0947633 | -0.6817686 | 0.0667824 |
| actual_duties | f | 0.3147368 | 1.4829086 | 0.1536861 | -0.1232228 | 0.6500821 |
| country_career_male | m | -0.2716986 | -1.2625678 | 0.2212680 | -0.6220509 | 0.1693037 |
| country_fam_male | f | -0.2011662 | -0.9184176 | 0.3693442 | -0.5740846 | 0.2408714 |
| family_importance | f | 0.1190989 | 0.5364448 | 0.5975682 | -0.3185025 | 0.5148549 |
| actual_duties | m | 0.1139498 | 0.5129402 | 0.6136124 | -0.3231851 | 0.5110083 |
| career_importance | f | 0.1110479 | 0.4997119 | 0.6227311 | -0.3258148 | 0.5088334 |
| career_importance | m | -0.0172190 | -0.0770170 | 0.9393753 | -0.4356646 | 0.4073467 |
| family_importance | m | 0.0128722 | 0.0575710 | 0.9546617 | -0.4109666 | 0.4321354 |
| country_career_male | f | -0.0035605 | -0.0159230 | 0.9874536 | -0.4245316 | 0.4186765 |
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 |