version 9 set scheme sj capture log close set more off log using ehc3.log, replace use rrdat1, clear gen des = tfin ~= ti /*destination state*/ gen tf = tfin - tstart + 1 /*ending time*/ label define sex 1 "Men" 2 "Women" label value sex sex ltable tf des, intervals(30) su h f by(sex) /*command for life table estimation*/ ltable tf des, intervals(30) by(sex) gr overlay /// ysc(r(1)) ylabel(0(0.2)1) xlabel(0(100)500) xtitle("analysis time") /// saving("Figure 3_1_2",replace) log close