capture log close set matsize 500 set more off log using rm4ch3, text replace *** *** RM4CLDV Ch 3: Binary Outcomes - using SPost - verified 3/9/01 *** *** Page 37: Table 3.1 - Descriptive Statistics use binlfp2,clear summarize lfp k5 k618 age wc hc lwg inc *** Page 38: Table 3.2 - linear probability model (LPM) regress lfp k5 k618 age wc hc lwg inc *** Page 38: Table 3.2 - standardized coefficients for LPM listcoef, help *** Page 39: Predictions in sample for LPM predict lpmpred summarize lpmpred *** Get predicated values for age=35, k5=4, wc=hc=0, else mean prvalue, x(age=35 k5=4 k618=0 wc=0 hc=0) rest(mean) *** Page 49: Table 3.3 - binary logit (BLM) and binary probit (BPM) logit lfp k5 k618 age wc hc lwg inc, nolog probit lfp k5 k618 age wc hc lwg inc, nolog *** Page 52: Complementary log log model cloglog lfp k5 k618 age wc hc lwg inc, nolog *** Page 65: Range of Predictions quietly regress lfp k5 k618 age wc hc lwg inc predict lpmprob quietly probit lfp k5 k618 age wc hc lwg inc predict bpmprob quietly logit lfp k5 k618 age wc hc lwg inc predict blmprob summarize lpmprob bpmprob blmprob *** Page 66: Change in probability as variables go from minimum to maximum prchange, rest(mean) fromto *** Page 67: Figure 3.10 prgen age, x(wc=0) rest(mean) f(30) t(60) gen(wc0) n(7) prgen age, x(wc 1) rest(mean) f(30) t(60) gen(wc1) n(7) set textsize 125 label var wc0p1 "Did not attend college" label var wc1p1 "Attended college" #delimit ; graph wc0p1 wc1p1 wc1x, s(OS) pen(22) b2("Age of Wife") l2("Pr(In Labor Force)") gap(3) xlabel(30,35,40,45,50,55,60) ylabel(0,.25,.50,.75,1) xscale(30,60) yscale(0,1) connect(ss) ; #delimit cr translate @Graph rm4ch3fig10.wmf, replace *** Page 68: Figure 3.11 - must reestimate probit since data was changed use binlfp2,clear quietly probit lfp k5 k618 age wc hc lwg inc prgen inc, x(age=30) rest(mean) f(0) t(100) gen(in30) n(13) prgen inc, x(age=40) rest(mean) f(0) t(100) gen(in40) n(13) prgen inc, x(age=50) rest(mean) f(0) t(100) gen(in50) n(13) prgen inc, x(age=60) rest(mean) f(0) t(100) gen(in60) n(13) set textsize 125 label var in30p1 "Age 30" label var in40p1 "Age 40" label var in50p1 "Age 50" label var in60p1 "Age 60" #delimit ; graph in30p1 in40p1 in50p1 in60p1 in60x, s(pdST) pen(22) b2("Income") l2("Pr(In Labor Force)") gap(4) xlabel(0,20,40,60,80,100) ylabel(0,.25,.50,.75,1) xscale(0,100) yscale(0,1) connect(ssss) ; #delimit cr translate @Graph rm4ch3fig11.wmf, replace *** Page 69: Table 3.5 - Probabilityes by wc and k5 for BPM ** The easy way with -prtab- prtab wc k5, rest(mean) ** Or, use repeated calls to -prvalue- prvalue, x(wc 0 k5 0) rest(mean) prvalue, x(wc 0 k5 1) rest(mean) prvalue, x(wc 0 k5 3) rest(mean) prvalue, x(wc 1 k5 0) rest(mean) prvalue, x(wc 1 k5 1) rest(mean) prvalue, x(wc 1 k5 2) rest(mean) prvalue, x(wc 1 k5 3) rest(mean) *** Page 71: Table 3.6 - Standardized coefficients for BPM listcoef, std help *** Page 74, 78: Tables 3.7 and 3.8 - Partial and discrete change for BPM quietly probit lfp k5 k618 age wc hc lwg inc prchange *** Page 81: Table 3.9 - changes in odds for BLM quietly logit lfp k5 k618 age wc hc lwg inc listcoef, factor help log close