Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
clear all
set obs 10000
* Half of the population is female.
generate female = runiform()>=0.5
* Innate ability is independent of gender.
generate ability = rnormal()
* All women experience discrimination.
generate discrimination = female
* Data generating processes
generate occupation = (1) + (2)*ability + (0)*female + (-2)*discrimination + rnormal()
generate wage = (1) + (-1)*discrimination + (1)*occupation + 2*ability + rnormal()
* Regressions
regress wage discrimination
regress wage discrimination occupation
regress wage discrimination occupation ability