Skip to content

Instantly share code, notes, and snippets.

View lukeholman's full-sized avatar

Luke Holman lukeholman

View GitHub Profile
@lukeholman
lukeholman / gist:01b47df8fd72bb68454b713539e04db7
Created August 4, 2018 01:07
Quick model about name-gender associations
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