version 9 capture log close set more off log using ehd2.log, replace use rrdat1, clear gen des = tfin ~= ti /*destination state*/ gen tf = tfin - tstart + 1 /*ending time*/ 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*/ stset tf, failure(des) /*define single episode data*/ streg edu coho2 coho3 lfx pnoj pres, dist(e) nohr /*fit parametric survival model*/ display 2*(e(ll)-e(ll_0)) /*likelihood ratio test*/ * percentage change in the rate, given that only one covariate * changes its value display (exp(_b[edu])-1)*100 /*education*/ display (exp(_b[coho2])-1)*100 /*cohort 2*/ display (exp(_b[coho3])-1)*100 /*cohort 3*/ display (exp(_b[lfx])-1)*100 /*labor force experience*/ display (exp(_b[pres])^10-1)*100 /*prestige scale (increase by 10 units)*/ * simultaneous change in covariates: change in prestige score and lfx display (exp(_b[pres])^10*exp(_b[lfx])^12-1)*100 * selected subgroups (edu==13, coho2==0, coho3==0, lfx==0, pnoj==0, pres==60) display exp(_b[_cons]+_b[edu]*13+_b[pres]*60) /*rate*/ display 1/exp(_b[_cons]+_b[edu]*13+_b[pres]*60) /*average job duration*/ log close