// SURVIVAL_PERIOD.DO UPDATED 2006-10-08 use colon, clear keep if stage==1 gen id=_n /* stset the data with time since diagnosis as the timescale */ /* restrict person-time at risk to that within the period window (01jan1994-31dec1995) */ stset exit, enter(time mdy(1,1,1994)) exit(time mdy(12,31,1995)) /// origin(dx) f(status==1 2) id(id) scale(365.24) strs using popmort, br(0(1)10) mergeby(_year sex _age) /// by(sex) list(n d w p r cr_e2 se_cp)