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

Title

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

Syntax

stpm2cm using {filename} [, options]

options Description ------------------------------------------------------------------------- at(varlist) specifies covariate pattern for prediction} mergeby(varlist) specifies the variables to merge with the population mortality file. diagage(#) gives age at diagnosis diagyear(#) gives year at diagnosis sex(#) gives coding for sex required in population mortality file attage(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) maxage maxium age in popmort file nobs specifies 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. ci calculate confidence intervals maxt(#) the maximum value of follow up time stub(stub) the stub name for calculation of new variables tgen(newvarname) name of variable for generated follow-up time. mergegen(varname # ...) values of other merge variables required for the population mortality file

Description

stpm2cm calculates crude and net mortality after fitting an stpm2 model. It is a postestimation command and requires that an stpm2 has been fitted. The expected survival/mortality is required for calculation of the crude probabilities of death due to other causes and the strs command is used for this. strs can be obtained from Paul Dickman's webpage (http://www.pauldickman.com/rsmodel/stata_colon/). Note that stpm2cm does a prediction for an individual with a particular covariate pattern (specified with the at() 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 example at(age 60 sex 1)

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

maxage maxium age in population mortality file

nobs specifies 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.

ci calculate 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)

Author

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

References

Lambert 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 Medicine 2010;29:885-895.

Also see

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