*! version 0.0.4 **Jun2020
help stnet
also see: strs stpp

Title

stnet -- Estimating net survival

Syntax

stnet
using filename
[if exp]
[in range]
[iweight=varname]
,
mergeby(varlist)
diagdate(varname)
birthdate(varname)
[breaks(range)
unique
by(varlist)
attage(newvar)
attyear(newvar)
survprob(varname)
maxage(int 99)
ederer2
standstrata(varname)
brenner
indweight(varname)
list(varlist)
at(#|numlist)
listyearly
format:(%fmt)
notables
level(int)
saving(filename[,replace])
savstand(filename[,replace])

stnet is for use with survival-time data; see help st.
You must stset your data with time since entry in years as the timescale before using stnet; see help stset.

iweights are allowed; see help weights and see example using weights below. Weights must be specified as
[iweight=varname]

.

Description

stnet estimates net survival as proposed by Pohar Perme, Stare and Estève (Biometrics 2011) by using a life tables approach.
The command displays the results in life tables stratified by the variables specified in the by option.
Optionally relative survival using the Ederer II method can be calculated.
This command may be used also for period or hybrid analysis and to compute adjusted (weighted) estimates.

using 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.
The file must be sorted by the variables specified in mergeby(). Default names for variables in this
file are prob for the survival probabilities (see the survprob() option), _age for age
(see the attage() option), and _year for calendar year (see the attyear() option).
The maximum age is specified using the maxage() option (default is 99).

Options

mergeby(varlist) specifies the variables which uniquely determine the records
in the file of general population survival probabilities. This file must also be sorted by these variables.

diagdate(varname) specifies the variable containing the date of diagnosis.

birthdate(varname) specifies the variable containing the date of birth.

breaks(range) specifies the cutpoints for the lifetable intervals as
range in the forvalues command. The units must be years, e.g., use breaks(0(0.08333333)5)
for monthly intervals up to 5 years.

unique specifies that cutpoints for the lifetable intervals must correspond to each observed survival time.

by(varlist) specifies the life table stratification variables. One life table is
estimated for each combination of these variables.

attage(newvar) 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 from the difference between date of diagnosis and
date of birth plus follow-up time) but must exist in the using file. Default is _age.

attyear(newvar) 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 form the date of diagnosis plus follow-up time) but must
exist in the using file. Default is _year.

survprob(varname) specifies the variable in the using file that contains
the g.eneral population survival probabilities. Default is prob.

maxage(int 99) 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.

ederer2 specifies that Ederer II relative survival estimates be calculated. Note that stnet
calculates the observed survival by transforming the interval specific cumulative hazard (Dickman). Therefore the results
are not exactly equal to those obtained by using ltable.

list(varlist) 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.

at(#|numlist) reports estimated net survival at specified times.

listyearly display the net survival estimates at the end of each year of the time of the follow-up.

standstrata(varname) specifies a variable defining strata across which
to average the cumulative survival estimate. Weights must be given by [iweight=varname].

brenner specifies that the age adjustment be performed using the approach proposed by Brenner et al (2004).
This option requires that [iweight] and standstrata() are also specified.

indweight(varname) specifies a variable where individual weights are defined.
This option allows the user to pass any kind of weights.
When weights are supplied this way, standstrata(varname) and brenner cannot be used.

format:(%fmt) specifies the format for variables containing
survival estimates. Default is %6.4f.

notables suppresses display of the life tables.

level(int) sets the confidence level; default is based on
the value of the global macro S_level which, by default, takes the value 95.

saving((filename[replace)] saves in filename a data sets containing one
observation for each life table interval.

savstand(filename[,replace]) saves in filename standardised estimates.

Example: Net survival (Pohar Perme and coll.) by sex using 1 month as length of interval in the life table

. stnet using lifetab, br(0(.083333333)10) mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex)

Example: Net survival (Pohar Perme and coll.) by sex where cutpoints of interval in the life table correspond to each observed survival time

. stnet using lifetab, unique mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex) at(1(1)10)

When using unique, results shown may be very long. Therefore, we also specifies at(numlist) to show results only at specified (numlist)

Note that, when unique is specified, the time-scale is still split into a number of intervals and our life table approach is applied for the estimation of net survival.
This is a different implementation to stpp and stns. In our experience results of both approaches are very close.

Example: Ederer II estimates by sex

. stnet using lifetab, br(0(0.083333333)10) mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex) ederer2

Example: Estimation using a period approach

The approach is to first stset the data with calendar time as the timescale.
For example, we might be interested in the time at risk between 1 January 2005 and 31 December 2007.

. stset datafu, fail(status==1 2) origin(dx) enter(time mdy(1,1,2005)) exit(time mdy(12,31,2007)) scale(365.241)

We then can use stnet in the usual manner to get net survival and Ederer II estimates

. stnet using lifetab, br(0(0.083333334)10) mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex) ederer2

Example: Age-standardised estimates of net survival

To age-standardise using traditional direct standardisation we could specify the following command

. stnet using lifetab [iw=standwei], br(0(.083333334)10) mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex) standstrata(agegroup)

stnet 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 standwei.
The strata across which to average are defined using the standstrata(varname) option; a variable
containing the weights (which must be less than 1) must exist in the data set and be specified using the iweight= option.

Standard errors are estimated using the approach described by Corazziari et al (2004).

Example: Age-adjusted estimates of net survival according to Brenner and Hakulinen approach

When data are sparse the traditional age-standardisation can fail to produce age-adjusted net survival estimates.
Rather than weighting based on the age distribution at the start, Brenner and Hakulinen (2004) propose using weights that change throughout follow-up time.
This approach allows to produce comparable net survival estimates even when data are sparse by assigning individual weights to each patient
and constructing a weighted life table.

. stnet using lifetab [iw=standwei], br(0(.083333334)10) mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex) standstrata(agegroup) brenner

We can assign other user-defined individual weights by specifying indweight(varname). For example, we can reproduce the above age-adjusted
net survival estimates by the following commands

. local total = _N

. bysort agegroup: gen a_age = _N/`total'

. gen wt = (standwei/a_age)

. stnet using lifetab , br(0(.083333334)10) mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex) indweight(wt)

When indweight(varname) are specified standstrata(agegroup) and [iw=standwei] no longer need.

Example: Saving estimates

Saving estimates is needed to graph net survival estimates

. stnet using lifetab, br(0(.083333334)10) mergeby(_year sex _age) diagdate(dx) birthdate(bdate) by(sex) saving(colonnetsurv,replace)

Remarks

Net survival is the function of interest for cancer registries because it is the survival that we can measure
if cancer is the only cause of death. Therefore it is suitable to compare cancer survival among different populations and
to analyze survival trends. Pohar Perme and coll. shown that the correlation between cancer survival and other causes survival
must be taken into account to properly estimate the net survival. They propose a method based on the inverse probability weights.
For each individual weights are given by the inverse of its expected survival probability computed from the survival probabilities
of the general population supplied in the using file.
Danieli and coll. proven that the method proposed by Pohar Perme and coll. actually estimates the net survival.

In stnet we apply a life table approach for the estimation of the net survival. First we compute for each interval the cumulative
weighted excess hazard given by

Hw = k x (dw - d_hatw) / pyw .

where k is the length of the interval, dw is the weighted number of deaths, d_hatw is the weighted
number of the expected deaths and pyw are the weighted person-years at risk. Then we transform it in the interval specific net survival
by

NS = exp(-Hw)

Finally the cumulative net survival is obtained by the product of the interval specific estimates.

Since this approach assumes that hazard and weights are constant within the interval, stnet is
sensitive to the choice of interval length. In our checks by specifying one month as interval length the NS computed by
stnet is usually very close to the results obtained by using the rs.surv function, available within the relsurv package
on R software, that calculates NS at each time deaths and censorings happen in the data set. Longer intervals usually
cause stnet underestimates NS computed by rs.surv.

Authors

Enzo Coviello (enzocovi@gmail.com), Paul Dickman, Karri Seppa, and Arun Pokhrel.

Aknowledgments

I wish to thank Mark Rutherford for making available the code for the simulations of relative survival data and other tests of the command.
Also thanks to Mark Rutherford and Paul Lambert for drawing attention to the usefulness of Brenner age-standardisation.

References

Pohar Perme M, Stare J, Estève J
On estimation in relative survival,
Biometrics 2012 Mar;68(1):113-20.

Danieli C, Remontet L, Bossard N, Roche L, Belot A.
Estimating net survival: the importance of allowing for informative censoring
Statistics in Medicine 2012 Apr 13;31(8):775-86

Dickman P.
Standard errors of observed and relative survival in strs.

Corazziari I, Quinn M, Capocaccia R.
Standard cancer patient population for age standardising survival ratios,
European Journal of Cancer 2004;40:2307-16.

Brenner H., Arndt V., Gefeller O., Hakulinen T.
An alternative approach to age adjustment of cancer survival rates,
{it:European Journal of Cancer 2004;40:2317-2322.

Sasieni P, Brentnall A.R.
On Standardized Relative Survival,
Biometrics 2017;73:473-482.

On-line: help for stset, strs, ltable