version 9 set scheme sj capture log close set more off log using ehc6.log, replace use rrdat1, clear gen des = tfin ~= ti /*destination state*/ gen tf = tfin - tstart + 1 /*ending time*/ stset tf, f(des) /*define single episode data*/ sts graph, title("Product-Limit Survivor Function") saving("Figure 3_2_1", replace) log close