*! version 1.1.1 2020-07-15

Title

stpp - Pohar-Perme estimate of marginal relative survival and more...

Syntax

stpp newvar using filename [if] [in],
agediag(varname)
datediag(varname)
[options]

Options
agediag(varname) age at diagnosis (in years)

datediag(varname) date at diagnosis

allcause(newvarlist) calculate all-cause probabilitiesvarlist

by(varlist) calculate separately in groupes defined in varlist

crudeprob(newvarlist) calculate crude probabilitiesvarlist

deathprob calculate probabilities of death rather than survival

ederer2 calculate Ederer II estimate rather than Pohar Perme

fh use Fleming Harrington estimator of survival

frame(framename) save list results to a frame

indweights(varname) individual weights (used for external standardization)

levels(#) level for confidence intervals (default 95)

list(numlist) list of times to view in in output

pmage(varname) name of age variable in popmort file

pmother(varname) name of other variables in popmort file

pmrate(varname) name of rate variable in popmort file

pmyear(varname) name of calendar year variable in popmort file

pmmaxage(#) maximum age in popmort file

pmmaxyear(#) maximum year in popmort file

standstrata(varname) name of standardization variables

standweights(numlist) weights for standardizing

using2(filename, suboptions) incorporate second population mortality file

verbose more detailed output

graph create a graph, with confidence interval

graphname(name [, replace]) name the resulting graph

graphcode(filename) create a do file that contains the code to recreate the graph

Description

stpp calculates the Pohar-Perme non-parametric estimate of marginal relative survival, which under assumptions can be interpreted as marginal net survival. The estimate is a step function and changes at each event time.
This is a different implementation to strs and stnet where the time-scale is split into a number of intervals.

Standardized estimates (usually age standardization) can be obtained in two ways.

1) The traditional method by calculating (marginal) relative survival separately in (age) groups and then forming a weighted average of the (age) group specific estiamtes.
This can done using the standstrata(varname) and standweights(numlist) options.

2) Using individual weights. An individual in a particular (age) group is up or down weighted relative to a reference population (ref Rutherforsd). This is implemented using the indweights(varname) option.

In addition stpp will calculate all-cause and crude probabilities of death, which can also be standardized

The data must be stset before using stpp. There should only be 1 row of data per subject before using stpp. The time units should be years.

using filename specifies a file containing general-population mortality rates typically stratified by age, sex, calendar year and potentially other variables. In the using file, age must be specified in one-year increments and calendar year in one-year intervals.

The using2(filename) option specifies a scecond file containing general-population mortality rates, which enables alternative weights to be used. This includes the methods descibed by Sasieni and Brentnall for net survival and reference adjusted measures for all-cause and crude probabilties. The aim of these methods is to estimate the survival that would be observed in a population with the expected survival defined by the rates in the using2() file.

Confidence intervals are also calculated and named newvar_lci and newvar_uci

Options

agediag(varname) names the variable containing age at diagnosis. This should be in years. Note that if possible it is best to avoid using truncated (integer) age as this assumes that each person was diagnosed on their birthday.

datediag(varname) names the variable containing the date at diagnosis.

allcause(newvarname) calculates all-cause probabilities.

by(varlist) calculates separate estimates of marginal relative survival for the groups defined by varlist.
Note that a missing value is included as a level when using by().

crudeprob(newvarlist) calculates crude probabilities of death. If only one new variable is listed then the crude probabilities of death due to the disease are calculated.
If two variables are listed then both crude probabilties of death due to cancer and other causes are calculated.

deathprob calculates probabilities of death rather than survival. This affects both net and all-cause survival, but has no impact for the crudeprob() option.

ederer2 will lead to calculation of the Ederer II estimate rather than Pohar Perme estimate.

fh will use the Fleming-Harrington estiamtor of survival (the expoential of the negative cumulative (excess) hazard). The default is the product intergral method.

frame(framename) will save the results obtained through using the list() option to a frame. You can use a , replace suboption to overwrite an existing frame.

indweights(varname) incorporates individual level weights to up- or down-weight individuals relative to a reference population. This is useful for external age standardization.

level(#) specifies the confidence level, as a percentage, for confidence intervals. The default is level(95) or as set by set level.

list(numlist) gives times to list estimates of marginal relative survival (and confidence intervals).
For example, list(1 5 10) will list marginal survival at 1, 5 and 10 years.

pmage(varname) gives name of age variable in the population mortality file. The default is _age. This variable cannot exist in the patient data file, but should exist in the population mortality file.

pmyear(varname) name of year variable in the population mortality file. The default is _year. This variable cannot exist in the patient data file, but should exist in the population mortality file.

pmother(varlist) names additional variables in the population mortality file.
Usually this will include sex, but could additionally be, for example, information on region, deprivation etc.
All variables listed should be in both the data and the population mortality file.

pmrate(varname) name of the rate variable in the population mortality file. The default is rate.
The rate should be expressed per person year.
If you only have one year survival probabilities in the population mortality file, then you can obtain the rate using gen rate = -ln(survprob),
where survprob is the one year survival probability.

pmmaxage(#) specifies the maximum age for which general-population mortality rates are provided in the using file.
Rates for individuals older than this value are assumed to be the same as for maximum age #.
The default maximum age is 99.

pmmaxyear(#) specifies the maximum year for which general-population mortality rates are provided in the using file.
Rates for individuals still at risk after this year are assumed to be the same as for maximum year #.

standstrata(varname) gives the variable defining strata across which to average marginal relative survival.
Weights can be specified using the standweights() options.

standweights(numlist) gives the weights for obtaining standardized estimates.
The numlist should be of length equal to the number of levels specified in standstrata(varname)

using2(filename, suboptions) gives the name of a second population mortality file.
This can be incorporated as a second time-dependent weight so that the estimators of Sasieni and Brentnall are incorporated when calculating marginal relative survival. When used when calculating crude probabilities of death or all-cause survival the second popmort file is applied to ensure that crude-probabilities are comparable in that they should only differ due to differences in excess mortality (assuming they have been standardized appropriately).

The following suboptions are available.

pmage2(varname) gives name of age variable in the second population mortality file. The default is the same name
used in the pmage option. This variable must exist in the population mortality file.

pmother2(varname) names additional variables in the second population mortality file. The default is the same name
used in the pmother option. If there are no additional variables in the second population mortality file then
use pmother2(.).

pmrate2(varname) name of the rate variable in the second population mortality file. The default is the same name
used in the pmrate option

pmyear2(varname) gives name of calednar year variable in the second population mortality file. The default is the same name
used in the pmyear option. If population rates do not vary by calendar year in the second population mortality file then
use pmyear2(.).

verbose give some details about the how far the estimation process has proceeded.
This was useful when developing the command, but may bring pleasure to those who like seeing dots appear.

graph creates a plot of the main marginal relative survival estimate with a confidence interval. Really only one of the graph, graphname or graphcode options are required to get a plot.

graphname(name [, replace]) an option to name the graph - can replace an existing graph with the replace suboption.

graphcode(filename) creates a new do file, which contains the code to recreate the standard graph - this allows the option to make changes to the the plot - e.g. titles, whether to have a risktable etc.

Examples

All examples use colon cancer data available with strs. First load and stset the data and then all example are clickable.
You will need to clear data in memory before running.

. use "https://pclambert.net/data/colon.dta"

. stset surv_mm,f(status=1,2) id(id) scale(12) exit(time 120.5)

Example 1:

Estimate marginal relative survival in the study population as a whole.

. stpp R_pp1 using "https://pclambert.net/data/popmort.dta", ///

agediag(age) datediag(dx) ///

pmother(sex) list(1 5 10) graphname(R_pp1, replace)

(click to run)

Example 2:

Estimate marginal relative survival separately for males and females.

. stpp R_pp2 using "https://pclambert.net/data/popmort.dta", ///

agediag(age) datediag(dx) ///

pmother(sex) list(1 5 10) graphname(R_pp2, replace) ///

by(sex)

(click to run)

Example 3:

Estimate age-standardize marginal relative survival separately for males and females.
This uses the ICSS1 age standard with traditional standardiation through obtaining
a weighted average of age group-specific estimates.

. recode age (min/44=1) (45/54=2) (55/64=3) (65/74=4) (75/max=5), gen(ICSSagegrp)

. stpp R_pp3 using "https://pclambert.net/data/popmort.dta", ///

agediag(age) datediag(dx) ///

pmother(sex) list(1 5 10) ///

by(sex) ///

standstrata(ICSSagegrp) ///

standweight(0.07 0.12 0.23 0.29 0.29) graphname(R_pp3, replace)

(click to run)

Example 4:

Estimate age-standardize marginal relative survival separately for males and females.
This uses the ICSS1 age standard which is incorporated using individual weights.
This avoids the need to estimate separately in age groups.

. recode ICSSagegrp (1=0.28) (2=0.17) (3=0.21) (4=0.20) (5=0.14), gen(ICSSwt)

. bysort sex: gen sextotal= _N

. bysort ICSSagegrp sex:gen a_age = _N/sextotal

. gen double wt_age = ICSSwt/a_age

. stpp R_pp4 using "https://pclambert.net/data/popmort.dta", ///

agediag(age) datediag(dx) ///

pmother(sex) list(1 5 10) ///

by(sex) ///

indweights(wt_age) graphname(R_pp4, replace)

(click to run)

Stored results

If the list option is used then the output is saved to matrix.
When using the by() option multiple matrices will be saved as well
as the combined results.

Matrices

r(PP) Pohar Perme estimates and 95% confidence intervals

r(PPk) Pohar Perme estimates and 95% confidence intervals for kth by group

r(AC) All-cause estimates and 95% confidence intervals

r(ACk) All-cause estimates and 95% confidence intervals for kth by group

r(CP_can) Crude probability estimates (cancer) and 95% confidence intervals

r(CP_cank) Crude probability estimates (cancer) and 95% confidence intervals for kth by group

r(CP_oth) Crude probability estimates (other causes) and 95% confidence intervals

r(CP_othk) Crude probability estimates (other causes) and 95% confidence intervals for kth by group

Author

Paul C Lambert, University of Leicester, UK & Karolinska Institutet, Sweden.
(paul.lambert@leicester.ac.uk)
Mark J Rutherford
(mark.rutherford@leicester.ac.uk)

References

E. Coviello, P.W. Dickman, K. Seppä, A. Pokhrel. Estimating net survival using a life table approach.
The Stata Journal 2015;15:173-185

P.W. Dickman, E. Coviello, M.Hills, M. Estimating and modelling relative survival. The Stata Journal 2015;15:186-215

M. Pohar Perme, J. Stare, J. Estève. On estimation in relative survival
Biometrics 2012;68:113-120

P. Sasieni, A.R. Brentnall. On standardized relative Survival
Biometrics 2016;73:473-482