capture log close log using cda03a-testing-rev.log, text replace // pgm: cda03a-testing-rev.do // task: Review 3 - Testing & Fit // project: CDA // author: your name // date: today's date * 1 setup version 10 set linesize 80 clear all macro drop _all * 2 load data use sci-review2, clear * 3 select variables and examine keep isfac female fellow phd mcit3 mnas sum isfac female fellow phd mcit3 mnas * 4 compute a z-test logit isfac female fellow phd mcit3 mnas, nolog * 5 single coefficient Wald test test female * 6 multiple coefficients Wald test test mcit3 mnas * 7 equal coefficients Wald test test mcit3 = mnas * 8 the LR test - store the estimation results logit isfac female fellow phd mcit3 mnas eststo base * 9 single coefficient LR test logit isfac fellow phd mcit3 mnas eststo nofemale lrtest base nofemale * 10 multiple coefficient LR test logit isfac female fellow phd eststo nomcit3mnas lrtest base nomcit3mnas * 11 LR test all coefficients are zero logit isfac eststo intercept lrtest base intercept * 12 fit statistics quietly logit isfac female fellow phd mcit3 mnas fitstat, save quietly logit isfac female fellow phd fitstat, dif * 13 plot Cook's distance quietly logit isfac female fellow phd mcit3 mnas predict cook, dbeta sort phd gen index = _n twoway scatter cook index, ysize(1) xsize(2) /// xlabel(0(100)300) ylabel(0(.2)1., grid) /// xscale(range(0, 300)) yscale(range(0, 1.)) /// xtitle("Observation Number") /// msymbol(none) mlabel(index) mlabposition(0) graph export cda03a-testing-rev-fig1.emf, replace * 14 close log file log close exit