Created
February 23, 2020 16:44
-
-
Save cdriveraus/29d424b2aae7a18b6c6e8332d80c07e9 to your computer and use it in GitHub Desktop.
Earnings inequality
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
n <- 100000 | |
pe <- .2 #patriarchy benefit to male ability | |
ba <- rnorm(n) #baseline ability | |
m <- rbinom(n,1,.5) #male | |
h <- ba + pe * m + rnorm(n)#h index | |
e1 <- ba + pe *m + rnorm(n)#earnings assuming caused by ability | |
e2 <- h + rnorm(n)#earnings assuming caused by h-index | |
lm(e1~h+m) | |
lm(e2~h+m) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment