sysuse cancer, clear recode studytime (min/10 = 1 "10 or less months") /// (11/20 = 2 "11 to 20 months") /// (21/30 = 3 "21 to 30 months") /// (31/max = 4 "31 or more months") /// , gen(stime) la var stime "To died or exp. end" tabout stime died using table1.txt, /// cells(freq col cum) format(0 1) clab(No. Col_% Cum_%) /// replace /// style(tex) bt cl1(2-10) cl2(2-4 5-7 8-10) font(bold) /// topf(top.tex) botf(bot.tex) /// topstr(14cm) botstr(cancer.dta)