version 9 set scheme sj capture log close set more off log using ehg8.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*/ streg, dist(logl) /*fit parametric survival model*/ stcurve, hazad ytick(0(0.005)0.02) ylabel(0(0.01)0.02) /*log-logistic transition rate*/ log close