version 9 capture log close set more off log using ehg7.log, replace use rrdat1, clear gen des = tfin ~= ti /*destination state*/ gen tf = tfin - tstart + 1 /*ending time*/ stset tf, failure(des) /*define single episode data*/ gen coho2 = tb >= 468 & tb <= 504 /*cohort 2*/ gen coho3 = tb >= 588 & tb <= 624 /*cohort 3*/ gen lfx = tstart - te /*labor force experience*/ gen pnoj = noj - 1 /*previous number of jobs*/ streg edu coho2 coho3 lfx pnoj pres, dist(w) time /// ancillary(edu coho2 coho3 lfx pnoj pres) /*fit parametric survival model*/ log close