Template ID::EndIDUETMPNAME~:prgen & graph prgen , from() to() generate(xx) x() gap() label var xxp1 "SD" label var xxp2 "D" label var xxp3 "A" label var xxp4 "SA" label var xxs1 "SD" label var xxs2 "SD or D" label var xxs3 "SD, D or A" * graph predicted probabilities graph twoway connected xxp1 xxp2 xxp3 xxp4 xxx, /// title("Panel A: Predicted Probabilities") /// xtitle("Age") xlabel(20(10)80) ylabel(0(.25).50) /// yscale(noline) ylabel("") xline(44.93) /// ytitle("") name(tmp1, replace) * graph cumulative probabilities graph twoway connected xxs1 xxs2 xxs3 xxx, /// title("Panel B: Cumulative Probabilities") /// xtitle("Age") xlabel(20(10)80) ylabel(0(.25)1) xline(44.93) /// yscale(noline) ylabel("") name(tmp2, replace) /// ytitle("") * combine graphs graph combine tmp1 tmp2, col(1) iscale(*.9) imargin(small) /// ysize(4.31) xsize(3.287) * save graph graph export .emf, replace :~End Template~:Template ID::EndIDUETMPNAME~:estimates table estimates table _all, stats(N chi2 bic) eform b(%9.3f) t(%6.2f):~End Template~:Template ID::EndIDUETMPNAME~:prcounts & plot prcounts xx, plot max(9) label var xxobeq "Observed" label var xxpreq "xx pdf" label var xxval "# of " list xxval xxobeq xxpreq in 1/10 twoway /// (connected xxobeq xxval, msymbol(circle) /// msize(medium) mcolor(black) clcolor(black) clpat(dot)) /// (connected xxpreq xxval, msymbol(square_hollow) /// msize(small) mcolor(black) clcolor(black) clpat(dot)) /// , ytitle("Pr(y=k)") xtitle("# of xx") /// ylabel(0(.1).4, grid gmax gmin gstyle(dot)) /// xlabel(0(1)9, nogrid) graph export xx_.emf, replace :~End Template~:Template ID::EndIDUETMPNAME~:do long capture log close set more off estimates clear log using [FILE_NAME], replace version 9.1 // pgm: [FILE_NAME].[FILE_EXTENSION] // task: ^ // project: // author: jsl // date: [DATE_USER]ddMMMyyyy[DATE_USER_END] // * #1 * * #2 * * #3 * * #4 * * #5 * log close :~End Template~:Template ID::EndIDUETMPNAME~:do short capture log close set more off estimates clear log using [FILE_NAME], replace version 9.1 // [FILE_NAME].do - ^ // jsl - [DATE_USER]ddMMMyyyy[DATE_USER_END] // ** ** log close :~End Template~:Template ID::EndIDUETMPNAME~:80 0 1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890 :~End Template~:Template ID::EndIDUETMPNAME~:file name [FILE_NAME]:~End Template~:Template ID: :EndIDUETMPNAME~: * # * #^ * :~End Template~:Template ID::EndIDUETMPNAME~:mark missing mark nomissv label var nomissv "1 if no missing" label def nomiss 1 NoMissing 0 Missing label val nomissv nomiss markout nomissv `lhs' `rhs' replace nomissv = . if nomissv==0 keep if nomissv==1 :~End Template~:Template ID: :EndIDUETMPNAME~: header local tag ".do \jsl ." // pgm: .do \jsl . // task: // project: // notes: // :~End Template~: