help stpm2cm-------------------------------------------------------------------------------

Title

stpm2cm- Postestimation command forstpm2models to estimate crude and net mortality after fitting a relative survival model

Syntax

stpm2cmusing {filename} [,options]

optionsDescription -------------------------------------------------------------------------at(varlist)specifies covariate pattern for prediction}mergeby(varlist)specifies the variables to merge with the population mortality file.diagage(#)gives age at diagnosisdiagyear(#)gives year at diagnosissex(#)gives coding for sex required in population mortality fileattage(varname)specifies the variable containing attained age (i.e., age at the time of follow-up)attyear(varname)specifies the variable containing attained year (i.e., year at the time of follow-up)maxagemaxium age in popmort filenobsspecifies the number of observations (of time) to predict for (default 1000). Observations are evenly spread between the minimum and maximum value of follow-up time.cicalculate confidence intervalsmaxt(#)the maximum value of follow up timestub(stub)the stub name for calculation of new variablestgen(newvarname)name of variable for generated follow-up time.mergegen(varname #...)values of other merge variables required for the population mortality file

Description

stpm2cmcalculates crude and net mortality after fitting anstpm2model. It is a postestimation command and requires that anstpm2has been fitted. The expected survival/mortality is required for calculation of the crude probabilities of death due to other causes and thestrscommand is used for this.strscan be obtained from Paul Dickman's webpage (http://www.pauldickman.com/rsmodel/stata_colon/). Note thatstpm2cmdoes a prediction for an individual with a particular covariate pattern (specified with theat()option). You must also specify the age, sex and calendar year the prediction is for in the population mortality file.

Options

at(varlist)gives the covariates values for the prediction. All covariates in the model must be specified. For exampleat(age 60 sex1)

mergby(varlist)specifies the variables by which the file of general population survival probabilities is sorted. See strs

diagage(#)age of subject at diagnosis for prediction. Note that this must be specified even if age has been modelled as a categorical covariate.

diagyear(#)year of diagnosis of subject.

sex(#)coding for sex prediction is for. This needs to match that in the population mortality file.

attage(varname)specifies the variable containing attained age (i.e., age at the time of follow-up). This needs to match the variable in the population mortality file

attyear(varname)specifies the variable containing attained calendar year. This needs to match the variable in the population mortality file

maxagemaxium age in population mortality file

nobsspecifies the number of observations (of time) to predict for (default 1000). Observations are evenly spread between the minimum and maximum value of follow-up time.

cicalculate confidence intervals

maxt(#)the maximum value of follow up time

stub(stub)the stub name for calculation of the new variables. The following variables are created:stub_d- crude probability of death due to disease,stub_o- crude probability of death due to other causes,stub_all- probability of death (all causes),stub_lambda- excess mortality rate,stub_lambda- expected mortality rate,stub_St_star- Expected survival,stub_s_all- overall survival.

tgen(newvarname)name of variable for generated follow-up time.

mergegen(varname #...)values of other merge variables required for the population mortality file. This is used when there are additional variables in the population mortality file. For example, region or socio-economic group.

-------------------------------------------------------------------------------

Example

stpm2 agegrp2-agegrp4, scale(hazard) bhazard(rate) df(5) ///tvc(agegrp2-agegrp4) dftvc(3)stpm2cm using popmort, at(agegrp2 0 agegrp3 0 agegrp4 0) ///mergeby(_year sex _age) ///diagage(40) diagyear(1985) ///sex(1) stub(cm1) nobs(1000) ///tgen(cm1_t)

AuthorPaul Lambert, University of Leicester, UK. paul.lambert@leicester.ac.uk

ReferencesLambert PC, Dickman PW, Nelson CP, Royston P. Estimating the crude probability > of death due to cancer and other causes using relative survival models.

Statistics> in Medicine2010;29:885-895.

Also seeOnline:

[ST] stpm2 postestimation;[ST] stset, stpm