/* An Example of dummy dependent variable (binary choice) model Data " cps_msa2013 : 2013 Current population survey for 3 MSA 3 MSA : NY, LA, CHICAGO Created by Jin Man Lee Updated: 10/31/2023 */ clear all use https://bigblue.depaul.edu/jlee141/econdata/cps_data/cps_msa2013.dta gen educyr = 0 replace educyr = 1 if educ92 == 1 replace educyr = 4 if educ92 == 2 replace educyr = 6 if educ92 == 3 replace educyr = 8 if educ92 == 4 replace educyr = 9 if educ92 == 5 replace educyr = 10 if educ92 == 6 replace educyr = 11 if educ92 == 7 replace educyr = 12 if educ92 == 8 | educ92 == 9 replace educyr = 14 if educ92 == 10 | educ92 == 11 | educ92 == 12 replace educyr = 16 if educ92 == 13 replace educyr = 18 if educ92 == 14 replace educyr = 20 if educ92 == 15 replace educyr = 21 if educ92 == 16 gen edusq = educyr*educyr tab lfstat female tab lfstat female, nolabel gen laborp = (lfstat == 1 | lfstat == 2 ) keep if !missing(laborp) & female == 1 tab laborp female gen lhincome = log(inch_all) /* LP, PROBIT, and LOGIT Models */ reg laborp age educyr married child lhincome predict p_reg mfx probit laborp age educyr married child lhincome predict p_probit mfx logit laborp age educyr married child lhincome predict p_logit mfx twoway (scatter (laborp p_reg) lhincome) (scatter p_probit lhincome) (scatter p_logit lhincome)