Thanks to Kit Baum, there is now a new version of stexpect downloadable
from SSC. In Stata, type
ssc desc stexpect
or
findit stexpect
stexpect implements the methods to estimate the expected survival function
described in Therneau and Grambsh's book Modeling Survival Data, section 10.3.
Even if stexpect directly estimates the expected survival function, it is
easy, using stexpect output, to achieve an estimate of the relative
survival function, the preferred measure for the analysis of patient
survival based on data from cancer registries.
Let me briefly illustrate this point with an example:
use colon,clear
de
Contains data from C:\RelativeExample\colon.dta
obs: 15,564
vars: 9 20 Jul 2004 18:02
size: 264,588 (97.5% of memory free)
-------------------------------------------------------------------------------
storage display value
variable name type format label variable label
-------------------------------------------------------------------------------
year int %9.0g Year of diagnosis
dx int %d Date of diagnosis
exit int %d Date of exit
sex byte %9.0g sex Sex
age byte %9.0g Age at diagnosis
stage byte %9.0g stage Clinical stage at diagnosis
status byte %17.0g status Vital status at last date of
contact
year8594 byte %15.0g year8594 Indicator for year of dx 1985-94
id int %9.0g
-------------------------------------------------------------------------------
keep if stage==1 & year8594
stset exit, origin(dx) fail(status==1 2) id(id) scale(365.25)
stsplit fu, at(0(1)10)
preserve
sts gen Observed = s
bysort fu (_t) : keep if _n==_N
keep _t Observed
rename _t t_exp
sort t_exp
save observedsurvival,replace
restore
bysort id (_t) : replace age = age + _n - 1
bysort id (_t) : replace year = year + _n - 1
*popmort is the file with reference rates
sort year sex age
merge year sex age using popmort, keep(rate) nokeep
* Conditional or Ederer II Method estimate using approximate computation
stexpect CondApprox, at(0(1)10) ratevar(rate) output(conditional,replace)
np(100) method(2)
* stexpect output
use conditional, clear
list, noobs abb(12) separator(0)
On demand I can give privately more details (e.g. exact or approximate
estimates, period analysis) on this subject.
Enzo
^^^^^^^^^^^^^^^^
Enzo Coviello
Dipartimento di Prevenzione ASL BA/1
via L. Barbera 27 - 70055 MINERVINO MURGE (BA)
Italy
tel - fax +39 0883 691053
tel (home) +39 0883 695055