*********************************** * Example of sub-optimal smoothing near a boundary for stcurve * log using stcurve.log, replace set more on use http://www.stata-press.com/data/r9/drugtr, clear stset tabulate died * * Analysis A * stcox drug, basehc(a) stcurve, hazard outfile(a, replace) more replace died = died & studytime <= 17 replace studytime = min(17, studytime) stset tabulate died * * Analysis B * stcox drug, basehc(b) stcurve, hazard outfile(b, replace) more * * Graph hazard estimates from both analyses together * use b, clear rename haz1 hazcensored merge _t using a, sort sort _t line haz1 hazcensored _t, xlabel(0(5)30) xtick(0(1)33) log close