Set params

MIN_PARTICIPANTS_PER_COUNTRY <- 50

Gender-career

From wiki:

From 2005 to present, the Gender-Career IAT was available on the Project Implicit demonstration website (https://implicit.harvard.edu/implicit/selectatest.html Click on “Gender-Career IAT” to try it yourself). The Gender-Career IAT includes one standard IAT (Male vs. Female; Career vs. Family), sets of explicit measures on gender roles (such as association between career with females or males, personal importance of career or family), set of demographic questions (age, gender, education level, number of children, etc.), and debriefing questions about how respondents thought about their IAT score after the task.

From 2005 to the end of 2016, there are more than 1,645,902 session IDs created for Gender-Career IAT, and the overall completion rate is around 49.8%. There were 1,052,013 respondents who completed the standard IAT part of the task, which is 63.9% of the total respondents


Read in 2016 gender IAT data.

d <- read_sav("data/Gender-Career IAT.public.2016.sav") %>%
  select(D_biep.Male_Career_all, sex, countryres)

countries <- rev(sort(unique(d$countryres)))[1:181]

d_clean <- d %>% 
  filter(!is.na(D_biep.Male_Career_all) & !is.na(countryres)) %>%
  mutate(countryres = as.factor(countryres)) %>%
  filter(countryres %in% countries) %>%
  rename(overall_iat_score = D_biep.Male_Career_all)  %>%
  mutate(country_name = countrycode(countryres,
                                    "iso2c",
                                    "country.name")) %>%
  mutate(country_name = replace(country_name, 
                                countryres == "UK", "UK")) 

country_ns <- count(d_clean, countryres)  %>%
  filter(n >= MIN_PARTICIPANTS_PER_COUNTRY)

d_clean_frequent <- d_clean %>%
  inner_join(country_ns)

There are 36 with at least 50 participants. This includes 59967 participants.

Get country means

country_means_career <-d_clean_frequent %>%
  group_by(country_name) %>%
  multi_boot_standard(col = "overall_iat_score") 

Country means

ggplot(country_means_career, aes(x = reorder(country_name, mean), y = mean)) +
  geom_bar(stat = "identity") +
  ggtitle("IAT gender-career bias (2016 data)") +
  ylab("IAT gender bias") +
  xlab("Country") +
  geom_linerange(aes(ymin = ci_lower, ymax = ci_upper)) +
  theme_bw() +
  theme(axis.text.x = element_text(angle = 60, hjust = 1),
        legend.position = "none") 

World map

map_world <- map_data(map = "world") %>%
  mutate(country_name = region) %>%
  mutate(country_name = fct_recode(country_name,
    `United States of America` = "USA", 
    `Russian Federation` = "Russia",
    `Republic of Korea` = "South Korea")) 

map_data <- left_join(map_world, country_means_career) %>%
  rename(gender_bias = mean) %>%
  filter(lat > -57, 
         long > -165) 

ggplot(map_data, aes(x = long, y = lat, 
                            group = group, 
                            fill = gender_bias)) + 
  scale_fill_gradient2(midpoint = mean(map_data$gender_bias, na.rm = T), 
                       low = "blue", high = "red") +
  #scale_fill_continuous(low ="white", high = "blue") + 
  geom_polygon(color = "black", size = .1) +
  #geom_polygon() +
  theme_bw()

Europe map

ggplot(map_data, aes(x = long, y = lat, 
                            group = group, 
                            fill = gender_bias)) + 
  scale_fill_gradient2(midpoint = mean(map_data$gender_bias, na.rm = T), low = "blue", high = "red") +
  #scale_fill_continuous(low ="white", high = "blue") + 
  geom_polygon(color = "black", size = .1) +
  #geom_polygon() +
  theme_bw() +
  coord_map(xlim = c(-13, 35),  ylim = c(32, 71))

Gender-science

From wiki:

From 2003 to present, the Gender-Science IAT was available on the Project Implicit demonstration website (https://implicit.harvard.edu/implicit/selectatest.html Click on “Gender-Science IAT” to try it yourself). The Gender- Science IAT includes one standard IAT (Male vs. Female; Science vs. Liberal Arts), sets of explicit measures on gender roles (such as association of science/liberal arts with females or males, personal attitude toward science/liberal arts), set of demographic questions (age, gender, education level, etc.), and debriefing questions about how respondents thought about their IAT score after the task.

From 2003 to the end of 2016, there are more than 1,269,658 session IDs created for Gender-Science IAT, and the overall completion rate is around 48.6%. There were 751,022 respondents who completed the standard IAT part of the task, which is 59.2% of the total respondents.


Read in 2016 gender IAT data.

d <- read_sav("data/Gender-Science IAT.public.2016.sav") %>%
  select(D_biep.Male_Science_all, sex, countryres)

countries <- rev(sort(unique(d$countryres)))[1:166]

d_clean <- d %>% 
  filter(!is.na(D_biep.Male_Science_all) & !is.na(countryres)) %>%
  mutate(countryres = as.factor(countryres)) %>%
  filter(countryres %in% countries) %>%
  rename(overall_iat_score = D_biep.Male_Science_all)  %>%
  mutate(country_name = countrycode(countryres,
                                    "iso2c",
                                    "country.name")) %>%
  mutate(country_name = replace(country_name, 
                                countryres == "UK", "UK")) 

country_ns <- count(d_clean, countryres)  %>%
  filter(n >= MIN_PARTICIPANTS_PER_COUNTRY)

d_clean_frequent <- d_clean %>%
  inner_join(country_ns)

There are 32 with at least 50 participants. This includes 42692 participants.

Get country means

country_means_science <-d_clean_frequent %>%
  group_by(country_name) %>%
  multi_boot_standard(col = "overall_iat_score") 

Country means

ggplot(country_means_science, aes(x = reorder(country_name, mean), y = mean)) +
  geom_bar(stat = "identity") +
  ggtitle("IAT gender-science bias (2016 data)") +
  ylab("IAT gender bias") +
  xlab("Country") +
  geom_linerange(aes(ymin = ci_lower, ymax = ci_upper)) +
  theme_bw() +
  theme(axis.text.x = element_text(angle = 60, hjust = 1),
        legend.position = "none") 

World map

map_world <- map_data(map = "world") %>%
  mutate(country_name = region) %>%
  mutate(country_name = fct_recode(country_name,
    `United States of America` = "USA", 
    `Russian Federation` = "Russia",
    `Republic of Korea` = "South Korea")) 

map_data <- left_join(map_world, country_means_science) %>%
  rename(gender_bias = mean) %>%
  filter(lat > -57, 
         long > -165) 

ggplot(map_data, aes(x = long, y = lat, 
                            group = group, 
                            fill = gender_bias)) + 
  scale_fill_gradient2(midpoint = mean(map_data$gender_bias, na.rm = T), 
                       low = "blue", high = "red") +
  #scale_fill_continuous(low ="white", high = "blue") + 
  geom_polygon(color = "black", size = .1) +
  #geom_polygon() +
  theme_bw()

Europe map

ggplot(map_data, aes(x = long, y = lat, 
                            group = group, 
                            fill = gender_bias)) + 
  scale_fill_gradient2(midpoint = mean(map_data$gender_bias, na.rm = T), low = "blue", high = "red") +
  #scale_fill_continuous(low ="white", high = "blue") + 
  geom_polygon(color = "black", size = .1) +
  #geom_polygon() +
  theme_bw() +
  coord_map(xlim = c(-13, 35),  ylim = c(32, 71))

Comparison of two meassures

all_biases <- country_means_career %>%
  rename(career_bias = mean,
         career_ci_upper = ci_upper,
         career_ci_lower = ci_lower) %>%
  inner_join(country_means_science, by = "country_name") %>%
  rename(science_bias = mean,
         science_ci_upper = ci_upper,
         science_ci_lower = ci_lower)

ggplot(all_biases, aes(x = career_bias, y = science_bias)) +
  geom_point() +
  geom_errorbarh(aes(xmin = career_ci_lower, xmax = career_ci_upper)) +
  geom_linerange(aes(ymin = science_ci_lower, ymax = science_ci_upper)) +
  geom_smooth(method = "lm", se = F) +
  theme_bw()

ggplot(all_biases, aes(x = career_bias, y = science_bias)) +
  geom_smooth(method = "lm", se = F) +
  geom_label(aes(label =  country_name)) +
  theme_bw()

tidy(cor.test(all_biases$science_bias, all_biases$career_bias)) %>%
       select(1:6) %>%
       kable()
estimate statistic p.value parameter conf.low conf.high
0.6370095 4.450119 0.0001165 29 0.3650729 0.8087909