{smcl} {* 12sep2007}{...} {.-} help for {cmd:strs} {.-} {title:Estimating relative survival} {p 4 10 4} {cmd:strs} {cmdab:u:sing} {it:filename} [{cmd:if} {it:exp}] [{cmd:in} {it:range}] [{cmdab:iw:eight}{it:=varname}] , {cmdab:br:eaks}{cmd:(}{it:numlist ascending}{cmd:)} {cmdab:m:ergeby}{cmd:(}{it:varlist}{cmd:)} [{cmdab:by}{cmd:(}{it:varlist}{cmd:)} {cmdab:diagage}{cmd:(}{it:varname}{cmd:)} {cmdab:diagyear}{cmd:(}{it:varname}{cmd:)} {cmdab:attage}{cmd:(}{it:newvar}{cmd:)} {cmdab:attyear}{cmd:(}{it:newvar}{cmd:)} {cmdab:survprob}{cmd:(}{it:varname}{cmd:)} {cmdab:maxage}{cmd:(}{it:int 99}{cmd:)} {cmdab:pot:fu}{cmd:(}{it:varname}{cmd:)} {cmdab:ed:erer1} {cmd:cuminc} {cmdab:stand:strata}{cmd:(}{it:varname}{cmd:)} {cmdab:brenner} {cmdab:li:st}{cmd:(}{it:varlist}{cmd:)} {cmdab:keep}{cmd:(}{it:varlist}{cmd:)} {cmdab:f:ormat:(%}{it:fmt}{cmd:)} {cmdab:notab:les} {cmdab:l:evel}{cmd:(}{it:int}{cmd:)} {cmd:save}[{cmd:(}{it:replace}{cmd:)}] {cmdab:savst:and(}{it:filename}[{cmd:,replace}]{cmd:)} {cmdab:savin:d(}{it:filename}[{cmd:,replace}]{cmd:)} {cmdab:savgr:oup(}{it:filename}[{cmd:,replace}]{cmd:)} ] {p}{cmd:strs} is for use with survival-time data; see help {help st}. You must {cmd:stset} your data using the {cmd:id()} option with time since entry in years as the timescale before using {cmd:strs}; see help {help stset}. {p}{cmdab:iw:eight}s are allowed; see help {help weights} and see example using weights below. Weights must be specified as [{cmd:iweight}{it:=varname}]. {title:Description} {p}{cmd:strs} estimates relative survival using actuarial methods and displays the results in life tables stratified by the variables specified in the {cmd:by} option. Expected survival can be calculated using the Ederer I, Ederer II, or Hakulinen methods. This command may be used also for period analysis and to compute adjusted (weighted) estimates. {p}{cmdab:u:sing} {it:filename} specifies a file containing general population survival probabilities (conditional probabilities of surviving one year), typically stratified by age, sex, and calendar year. Age must be specified in one year increments (typically from 0 to 99) and calendar year in one year intervals. {p}The data must be sorted by the variables specified in {cmd:mergeby()}. Default names for variables in this file are {it:prob} for the survival probabilities (see the {cmd:survprob()} option), {it:_age} for age (see the {cmd:attage()} option), and {it:_year} for calendar year (see the {cmd:attyear()} option). {p}The maximum age is specified using the {cmd:maxage()} option (default is 99). {title:Options} {p 0 4}{cmdab:br:eaks}{cmd:(}{it:numlist ascending}{cmd:)} specifies the cutpoints for the lifetable intervals as an ascending {help numlist} commencing at zero. {p 0 4}{cmdab:m:ergeby}{cmd:(}{it:varlist}{cmd:)} specifies the variables by which the file of general population survival probabilities is sorted. {p 0 4}{cmdab:by}{cmd:(}{it:varlist}{cmd:)} specifies the life table stratification variables. One life table is estimated for each combination of these variables. {p 0 4}{cmdab:diagage}{cmd:(}{it:varname}{cmd:)} specifies the variable containing age at diagnosis in years. Does not have to contain integer values. Default is {it:age}. {p 0 4}{cmdab:diagyear}{cmd:(}{it:varname}{cmd:)} specifies the variable containing calendar year of diagnosis. Default is {it:yydx}. {p 0 4}{cmdab:attage}{cmd:(}{it:newvar}{cmd:)} specifies the variable containing attained age (i.e., age at the time of follow-up). This variable cannot exist in the patient data file (it is created as the integer part of age at diagnosis plus follow-up time) but must exist in the using file. Default is {it:_age}. {p 0 4}{cmdab:attyear}{cmd:(}{it:newvar}{cmd:)} specifies the variable containing attained calendar year (i.e. calendar year at the time of follow-up). This variable cannot exist in the patient data file (it is created as the integer part of year of diagnosis plus follow-up time) but must exist in the using file. Default is {it:_year}. {p 0 4}{cmdab:survprob}{cmd:(}{it:varname}{cmd:)} specifies the variable in the using file that contains the general population survival probabilities. Default is {it:prob}. {p 0 4}{cmdab:maxage}{cmd:(}{it:int 99}{cmd:)} specifies the maximum age for which general population survival probabilities are provided in the using file. Probabilities for individuals older than this value are assumed to be the same as for the maximum age. {p 0 4}{cmdab:pot:fu}{cmd:(}{it:varname}{cmd:)} specifies a variable containing the last time of potential follow-up. This is required for calculating Hakulinen estimates of expected survival and causes {cmd:strs} to report Hakulinen estimates by default. This variable must be in the same time units as the exit time and a variable containing the time origin must be specified; in practice, it is recommended that potfu() specify a variable containing a date and that the data be stset by specifying the dates of entry and exit with the entry date as the time origin. For example: {p 2 6 4}{cmd:. stset exit, origin(dx) fail(status==1 2) id(id) scale(365.24)} {p 2 6 4}{cmd:. gen long potfu = date("31/12/1995","dmy")} {p 2 6 4}{cmd:. strs using popmort, br(0(1)20) mergeby(_year sex _age) potfu(potfu)} {p 0 4}{cmdab:ed:erer1} specifies that Ederer I estimates be calculated and causes {cmd:strs} to report these by default (unless {cmd:potfu()} is also specified). {p 0 4}{cmd:cuminc} specifies that cumulative incidence of death due to cancer (ci_dc) and cumulative incidence of death due to other causes (ci_dc) be calculated using the method of Cronin and Feuer (2000). Note that the cumulative incidence of death due to cancer is estimated in the presence of competing risks so will be lower than (1-relative survival) since the latter is assumed to be in the absence of competing risks. {p 0 4}{cmdab:list}{cmd:(}{it:varlist}{cmd:)} specifies the variables to be listed in the life tables. The variables start and end are included by default, but if only one of these is specified in the list option then the other is suppressed. {p 0 4}{cmdab:keep}{cmd:(}{it:varlist}{cmd:)} restricts the variables to be written to the individual-level output data set (named {cmd:individ.dta} by default). Requires {cmd:save()} or {cmd:saveind()}. {p 0 4}{cmdab:stand:strata}{cmd:(}{it:varname}{cmd:)} specifies a variable defining strata across which to average the cumulative survival estimate. Weights must be given by [{cmd:iweight}{it:=varname}]. {p 0 4}{cmdab:brenner} specifies that the (age) adjustment be performed using the approach proposed by Brenner et al (2004). This option requires that [{cmd:iweight}] and {cmd:standstrata()} are also specified. {p 0 4}{cmdab:f:ormat:(%}{it:fmt}{cmd:)} specifies the {help format} for variables containing survival estimates. Default is %6.4f. {p 0 4}{cmdab:notab:les} suppresses display of the life tables. {p 0 4}{cmdab:l:evel}{cmd:(}{it:int}{cmd:)} sets the confidence level; default is based on the value of the global macro S_level which, by default, takes the value 95. {p 0 4}{cmd:save}[{cmd:(}{it:replace}{cmd:)}] creates two output data sets, {cmd:individ.dta} contains one observation for each patient for each life table interval and {cmd:grouped.dta} contains one observation for each life table interval. Type {cmd:save}{cmd:(}{it:replace}{cmd:)} to overwrite these files. Excess mortality (relative survival) may be modelled using these data. {p 0 4}{cmdab:savin:d(}{it:filename}[{it:,replace}]{cmd:)} {cmdab:savgr:oup(}{it:filename}[{it:,replace}]{cmd:)} can be used to specify alternative filenames for the individual and grouped output data sets. {p 0 4}{cmdab:savst:and(}{it:filename}[{it:,replace}]{cmd:)} {cmdab:savgr:oup(}{it:filename}[{it:,replace}]{cmd:)} species that standardised estimates be saved to an output data set. {title:Example: Ederer II estimates (the default) by sex} {p 4 8 2}{cmd:. strs using popmort, br(0(1)10) mergeby(_year sex _age) by(sex)} {title:Example: Ederer I estimates by sex} {p 4 8 2}{cmd:. strs using popmort, br(0(0.5)10) mergeby(_year sex _age) by(sex) ederer1} {title:Example: Hakulinen estimates by sex} {p 4 8 2}{cmd:. strs using popmort, br(0(0.5)2 3(1)10) mergeby(_year sex _age) by(sex) potfu(potfu)} {title:Example: Ederer I, Ederer II, and Hakulinen estimates in the same life table} {p 4 8 2}{cmd:. strs using popmort, br(0(1)21) mergeby(_year sex _age) by(sex) potfu(potfu) ederer1 list(n d w cp cp_e1 cr_e1 cp_e2 cr_e2 cp_hak cr_hak d_star) f(%7.5f)} {title:Example: Estimation using a period approach} {p} The approach is to first {help stset} the data with calendar time as the timescale. For example, we might be interested in the time at risk between 1 January 1994 and 31 December 1995. {p 4 8 2}{cmd:. stset exit, origin(dx) enter(time mdy(1,1,1994)) fail(status==1 2) id(id) scale(365.25)} {p} Note that if an individual has died before the start of the window, his record is marked with {it:_st=0} and he does not contribute to the analysis in the case of Ederer II estimate. However he does contribute to the analysis when Hakulinen estimate is required. So the records marked with {it:_st=0} must not be dropped from the dataset. We then can use {cmd:strs} in the usual manner to get Ederer II estimates {p 4 8 2}{cmd:. strs using popmort, br(0(1)10) mergeby(_year sex _age) by(sex)} or to get Hakulinen estimates {p 4 8 2}{cmd:. strs using popmort, br(0(1)10) mergeby(_year sex _age) by(sex) potfu(potfu)} {title:Example: Cumulative incidence of death in the presence of competing risks} {p 4 8 2}{cmd:. strs using popmort, br(0(1)10) mergeby(_year sex _age) by(sex) cuminc} {title:Example: Age-standardised estimates of relative survival} {p}To age-standardise using traditional direct standardisation we could specify the following command {p 0}{cmd:. strs using popmort [iw=standwei], br(0(1)10) mergeby(_year sex _age) by(sex) standstrata(agegroup)} {p}{cmd:strs} first constructs life tables for each level of sex and agegroup then calculates age-standardised estimates for each sex by weighting the age-specific estimates using the weights specified in the variable {it:standwei}. The strata across which to average are defined using the {cmdab:standstrata(}{it:varname}{cmd:)} option; a variable containing the weights (which must be less than 1) must exist in the data set and be specified using the {cmdab:iweight=} option. {p}We can also apply the traditional standardisation to the estimates of the cumulative probabilities of death {p 0}{cmd:. strs using popmort [iw=standwei], br(0(1)10) mergeby(_year sex _age) by(sex) standstrata(agegroup) cuminc} {p}Brenner et al. (2004) proposed an alternative approach to age-standardisation of cancer survival rates. Weights are individually assigned to all patients and a weighted life table constructed. For example, if a patient has weight 1.8 then this patient contributes 1.8 units to the 'at risk' column at entry and 1.8 units to the deaths column at death (or the withdrawal column at censoring). Weights are higher than 1 in age groups underrepresented in the study population compared with the standard population and vice versa. For example, let {cmd:s} be the proportion of patients in each age group of the standard population and {cmd:r} the corresponding proportion in the study population, weights are computed as follows: {center: {cmd:weights}} {center:Age Groups {cmd:s} {cmd:r} {cmd: s/r}} {center:{hline 40}} {center: 0-44 {cmd:0.164 0.047 3.46}} {center:45-54 {cmd:0.143 0.083 1.73}} {center:55-64 {cmd:0.202 0.186 1.08}} {center:65-74 {cmd:0.208 0.322 0.65}} {center: 75+ {cmd:0.283 0.362 0.51}} {center:{hline 40}} If the weights {cmd:s} are stored in the variable {it:standwei} then specifying the {cmdab:brenner} option leads {cmd:strs} to calculate and assign the individual weights to all patients and construct a weighted life table. {p 4 8 2}{cmd:. strs using popmort [iw=standwei], br(0(1)10) mergeby(_year sex _age) by(sex) potfu(potfu) brenner stand(agegroup)} {p}Note that in this case {cmd:strs} does not compute crude estimates for each level of agegroup; only standardized estimates for each sex are tabulated. {title:Example: Modelling excess mortality} {p}Excess mortality can be modelled using a range of approaches (Dickman et al. 2004). A life table must first be estimated for all combinations of explanatory variables (only categorical variables are supported). The following example shows how we can estimate a Poisson regression model for excess mortality adjusting for follow-up time (in five annual intervals), gender, period of diagnosis, and age at diagnosis. {p 4 8 2}{cmd:. strs using popmort, br(0(1)5) mergeby(_year sex _age) by(sex year8594 agegrp) save(replace)} {p 4 8 2}{cmd:. use grouped, clear} {p 4 8 2}{cmd:. xi: glm d i.end i.sex i.year8594 i.agegrp, fam(pois) link(rs d_star) lnoffset(y) eform} {p}The parameter estimates are interpreted as log excess hazard ratios. The Hakulinen-Tenkanen (1987) model can be fitted to the same data as follows {p 4 8 2}{cmd:. xi: glm d i.end i.sex i.year8594 i.agegrp, fam(bin n_prime) link(ht p_star) eform} {p}To estimate the model using the Esteve et al (1990) full likelihood approach we use the individual, rather than grouped, data. {p 4 8 2}{cmd:. use individ, clear} {p 4 8 2}{cmd:. xi: ml model lf esteve (d=i.end i.sex i.year8594 i.agegrp)} {p 4 8 2}{cmd:. ml maximize, eform("RER")} {title:Authors} {p} Paul Dickman ({browse "mailto:paul.dickman@ki.se":paul.dickman@ki.se}), Enzo Coviello, and Michael Hills. {title:References} {p} Dickman PW, Sloggett A, Hills M, Hakulinen T. {browse "http://www.ncbi.nlm.nih.gov/pubmed/14695639":Regression models for relative survival}, {it:Statistics in Medicine} 2004;23:51-64. {p} Brenner H., Arndt V., Gefeller O., Hakulinen T. {browse "http://www.ncbi.nlm.nih.gov/pubmed/15454258":An alternative approach to age adjustment of cancer survival rates}, {it:European Journal of Cancer} 2004;40:2317-2322. {p} Cronin KA, Feuer EJ. {browse "http://www.ncbi.nlm.nih.gov/pubmed/10861774":Cumulative cause-specific mortality for cancer patients in the presence of other causes: a crude analogue of relative survival}, {it:Statistics in Medicine} 2000;19:1729-40. {p} Dickman PW, Adami HO. {browse "http://www.ncbi.nlm.nih.gov/pubmed/16882274":Interpreting trends in cancer patient survival}, {it:Journal of Internal Medicine} 2006;260:103-117. {p 0 19}On-line: help for {help stset}, {help stexpect}, {help ltable}