This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
# Here, I use 'Kim' as shorthand for all names that differ in gender association between the local and immigrant population | |
# For simplicity I assume Kim is an equally common name in both countries | |
expand.grid( | |
p_kim_local = c(0.001, 0.01, 0.05, 0.1), # True proportion of locally-born people named Kim | |
p_male_kim_immigrants = 0.90, # pTrue roportion males among foreign-born people named Kim: | |
p_male_kim_locals = 0.10, # True proportion males among locally-born people named Kim: | |
p_male_kim_GENDERIZE = seq(0.1, 0.9, length = 11), # worldwide estimate for gender of people named Kim from Genderize.io | |
p_immigrants = seq(0, 0.5, length = 11), # True proportion of researchers who are immigrants |