Age-standardised net survival (non-parametric)

Under construction: Stata code and output is shown below. I plan to add additional comments.

The code used in this tutorial, along with links to the data, is available here.

This tutorial illustrates how to use strs to estimate age-standardised net survival with ICSS weights. Both the Ederer II and Pohar Perme estimators are used.

. use http://pauldickman.com/data/colon.dta if stage == 1, clear
(Colon carcinoma, diagnosed 1975-94, follow-up to 1995)

. 
. // Reclassify age groups according to International Cancer Survival Standard 
. drop agegrp

. label drop agegrp

. egen agegrp=cut(age), at(0 15 45 55 65 75 200) icodes

. label variable agegrp "Age group"

. label define agegrp 1 "15-44" 2 "45-54" 3 "55-64" 4 "65-74" 5 "75+" 

. label values agegrp agegrp

. 
. /* Specify weights for each agegroup */
. recode agegrp (1=0.07) (2=0.12) (3=0.23) (4=0.29) (5=0.29), gen(ICSSwt)
(6274 differences between agegrp and ICSSwt)

. 
. stset exit, origin(dx) fail(status==1 2) id(id) scale(365.24)

                id:  id
     failure event:  status == 1 2
obs. time interval:  (exit[_n-1], exit]
 exit on or before:  failure
    t for analysis:  (time-origin)/365.24
            origin:  time dx

------------------------------------------------------------------------------
      6,274  total observations
          0  exclusions
------------------------------------------------------------------------------
      6,274  observations remaining, representing
      6,274  subjects
      3,291  failures in single-failure-per-subject data
 35,607.707  total analysis time at risk and under observation
                                                at risk from t =         0
                                     earliest observed entry t =         0
                                          last observed exit t =  20.96156

Now we call strs.

. strs using http://pauldickman.com/data/popmort [iw=ICSSwt], ///
>     breaks(0(1)10) mergeby(_year sex _age) diagage(age) ///
>     by(sex) standstrata(agegrp) pohar f(%7.5f) 

         failure _d:  status == 1 2
   analysis time _t:  (exit-origin)/365.24
             origin:  time dx
                 id:  id

No late entry detected - p is estimated using the actuarial method

------------------------------------------------------------------------------------------------------------
-> sex = Male, agegrp = 15-44

  +-----------------------------------------------------------------------------------------------------+
  | start   end     n    d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |-----------------------------------------------------------------------------------------------------|
  |     0     1   161    7    0   0.95652   0.99683   0.95957   0.95652   0.95958    0.91244    0.98159 |
  |     1     2   154   15    7   0.90033   0.99663   0.90338   0.86119   0.86691    0.80159    0.91189 |
  |     2     3   132    4    9   0.96863   0.99629   0.97223   0.83417   0.84281    0.77316    0.89255 |
  |     3     4   119    5   10   0.95614   0.99607   0.95991   0.79758   0.80898    0.73387    0.86482 |
  |     4     5   104    3    8   0.97000   0.99578   0.97411   0.77366   0.78820    0.70942    0.84789 |
  |-----------------------------------------------------------------------------------------------------|
  |     5     6    93    4    6   0.95556   0.99544   0.95994   0.73927   0.75652    0.67274    0.82168 |
  |     6     7    83    1    4   0.98765   0.99516   0.99246   0.73014   0.75074    0.66513    0.81745 |
  |     7     8    78    1    8   0.98649   0.99475   0.99169   0.72028   0.74438    0.65662    0.81288 |
  |     8     9    69    2    3   0.97037   0.99445   0.97579   0.69894   0.72606    0.63427    0.79844 |
  |     9    10    64    2    7   0.96694   0.99411   0.97267   0.67583   0.70629    0.61030    0.78281 |
  +-----------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Male, agegrp = 45-54

  +-----------------------------------------------------------------------------------------------------+
  | start   end     n    d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |-----------------------------------------------------------------------------------------------------|
  |     0     1   226   15    0   0.93363   0.99189   0.94126   0.93363   0.94124    0.89809    0.96646 |
  |     1     2   211    6   12   0.97073   0.99147   0.97908   0.90630   0.92162    0.87224    0.95243 |
  |     2     3   193   15   11   0.92000   0.99080   0.92855   0.83380   0.85568    0.79573    0.89915 |
  |     3     4   167    6   14   0.96250   0.98995   0.97228   0.80253   0.83222    0.76764    0.88024 |
  |     4     5   147    6    9   0.95789   0.98909   0.96846   0.76874   0.80623    0.73684    0.85906 |
  |-----------------------------------------------------------------------------------------------------|
  |     5     6   132    5   12   0.96032   0.98828   0.97171   0.73823   0.78317    0.70915    0.84046 |
  |     6     7   115    3   10   0.97273   0.98754   0.98500   0.71810   0.77130    0.69349    0.83174 |
  |     7     8   102    7    5   0.92965   0.98642   0.94245   0.66758   0.72666    0.64223    0.79434 |
  |     8     9    90    2   12   0.97619   0.98514   0.99091   0.65169   0.71964    0.63153    0.79016 |
  |     9    10    76    3   10   0.95775   0.98383   0.97349   0.62415   0.70125    0.60788    0.77646 |
  +-----------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Male, agegrp = 55-64

  +-----------------------------------------------------------------------------------------------------+
  | start   end     n    d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |-----------------------------------------------------------------------------------------------------|
  |     0     1   552   34    0   0.93841   0.98013   0.95743   0.93841   0.95735    0.93128    0.97366 |
  |     1     2   518   33   34   0.93413   0.97885   0.95432   0.87659   0.91362    0.87969    0.93832 |
  |     2     3   451   35   27   0.92000   0.97723   0.94144   0.80647   0.85991    0.81919    0.89206 |
  |     3     4   389   23   29   0.93858   0.97564   0.96202   0.75694   0.82756    0.78216    0.86432 |
  |     4     5   337   22   19   0.93282   0.97369   0.95803   0.70609   0.79241    0.74242    0.83379 |
  |-----------------------------------------------------------------------------------------------------|
  |     5     6   296   16   23   0.94376   0.97207   0.97088   0.66638   0.76948    0.71557    0.81452 |
  |     6     7   257   13   24   0.94694   0.96958   0.97665   0.63102   0.75150    0.69352    0.80011 |
  |     7     8   220    9   22   0.95694   0.96689   0.98971   0.60385   0.74424    0.68214    0.79604 |
  |     8     9   189    7   20   0.96089   0.96476   0.99599   0.58023   0.74029    0.67332    0.79562 |
  |     9    10   162    2   20   0.98684   0.96255   1.02523   0.57260   0.75941    0.68784    0.81676 |
  +-----------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Male, agegrp = 65-74

  +-----------------------------------------------------------------------------------------------------+
  | start   end     n    d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |-----------------------------------------------------------------------------------------------------|
  |     0     1   912   97    0   0.89364   0.95434   0.93640   0.89364   0.93626    0.91163    0.95420 |
  |     1     2   815   83   67   0.89379   0.95128   0.93957   0.79873   0.87921    0.84671    0.90521 |
  |     2     3   665   68   54   0.89342   0.94788   0.94254   0.71360   0.82903    0.79031    0.86123 |
  |     3     4   543   48   42   0.90805   0.94334   0.96258   0.64798   0.79733    0.75317    0.83447 |
  |     4     5   453   51   38   0.88249   0.93970   0.93912   0.57184   0.74831    0.69866    0.79103 |
  |-----------------------------------------------------------------------------------------------------|
  |     5     6   364   36   20   0.89831   0.93502   0.96073   0.51368   0.71800    0.66301    0.76562 |
  |     6     7   308   27   25   0.90863   0.93031   0.97670   0.46675   0.70158    0.64108    0.75387 |
  |     7     8   256   20   25   0.91786   0.92452   0.99280   0.42841   0.69904    0.63215    0.75614 |
  |     8     9   211   20   22   0.90000   0.91821   0.98017   0.38557   0.68555    0.61083    0.74889 |
  |     9    10   169   17   15   0.89474   0.91224   0.98082   0.34498   0.67103    0.58708    0.74168 |
  +-----------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Male, agegrp = 75+

  +------------------------------------------------------------------------------------------------------+
  | start   end     n     d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |------------------------------------------------------------------------------------------------------|
  |     0     1   769   175    0   0.77243   0.89076   0.86716   0.77243   0.86316    0.82589    0.89298 |
  |     1     2   594    92   46   0.83888   0.88959   0.94299   0.64798   0.81437    0.76652    0.85336 |
  |     2     3   456    58   38   0.86728   0.88314   0.98204   0.56198   0.79926    0.74068    0.84598 |
  |     3     4   360    58   24   0.83333   0.87630   0.95097   0.46831   0.76949    0.70046    0.82460 |
  |     4     5   278    31   30   0.88213   0.86623   1.01836   0.41311   0.78994    0.70455    0.85319 |
  |------------------------------------------------------------------------------------------------------|
  |     5     6   217    41   20   0.80193   0.85874   0.93385   0.33129   0.72051    0.61395    0.80232 |
  |     6     7   156    27    8   0.82237   0.85158   0.96570   0.27244   0.68836    0.56464    0.78349 |
  |     7     8   121    22   12   0.80870   0.84395   0.95823   0.22032   0.65488    0.51593    0.76281 |
  |     8     9    87    18    5   0.78698   0.83458   0.94297   0.17339   0.63711    0.48122    0.75741 |
  |     9    10    64     9    6   0.85246   0.82109   1.03820   0.14781   0.65766    0.46069    0.79724 |
  +------------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Female, agegrp = 15-44

  +----------------------------------------------------------------------------------------------------+
  | start   end     n   d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |----------------------------------------------------------------------------------------------------|
  |     0     1   136   5    0   0.96324   0.99883   0.96436   0.96324   0.96437    0.91424    0.98542 |
  |     1     2   131   6    5   0.95331   0.99875   0.95450   0.91826   0.92047    0.85876    0.95590 |
  |     2     3   120   8    3   0.93249   0.99867   0.93373   0.85627   0.85947    0.78642    0.90896 |
  |     3     4   109   6    5   0.94366   0.99856   0.94502   0.80803   0.81229    0.73258    0.87032 |
  |     4     5    98   5    5   0.94764   0.99841   0.94915   0.76572   0.77094    0.68622    0.83551 |
  |----------------------------------------------------------------------------------------------------|
  |     5     6    88   2    4   0.97674   0.99829   0.97841   0.74791   0.75424    0.66740    0.82142 |
  |     6     7    82   1   10   0.98701   0.99818   0.98881   0.73820   0.74582    0.65755    0.81453 |
  |     7     8    71   1    2   0.98571   0.99797   0.98772   0.72766   0.73665    0.64665    0.80711 |
  |     8     9    68   1    7   0.98450   0.99780   0.98667   0.71637   0.72676    0.63477    0.79922 |
  |     9    10    60   0    3   1.00000   0.99757   1.00244   0.71637   0.72853    0.63618    0.80106 |
  +----------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Female, agegrp = 45-54

  +-----------------------------------------------------------------------------------------------------+
  | start   end     n    d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |-----------------------------------------------------------------------------------------------------|
  |     0     1   294   11    1   0.96252   0.99703   0.96538   0.96252   0.96537    0.93531    0.98160 |
  |     1     2   282   17   21   0.93738   0.99686   0.94033   0.90225   0.90776    0.86631    0.93683 |
  |     2     3   244   16   27   0.93059   0.99660   0.93376   0.83962   0.84762    0.79745    0.88624 |
  |     3     4   201    8   13   0.95887   0.99631   0.96242   0.80509   0.81578    0.76129    0.85899 |
  |     4     5   180    7   12   0.95977   0.99610   0.96353   0.77270   0.78602    0.72773    0.83327 |
  |-----------------------------------------------------------------------------------------------------|
  |     5     6   161    9   14   0.94156   0.99578   0.94554   0.72754   0.74316    0.68010    0.79567 |
  |     6     7   138    4   11   0.96981   0.99547   0.97423   0.70558   0.72403    0.65849    0.77912 |
  |     7     8   123    3   11   0.97447   0.99506   0.97931   0.68756   0.70917    0.64139    0.76650 |
  |     8     9   109    0   15   1.00000   0.99461   1.00542   0.68756   0.71303    0.64474    0.77055 |
  |     9    10    94    0    8   1.00000   0.99412   1.00592   0.68756   0.71727    0.64841    0.77500 |
  +-----------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Female, agegrp = 55-64

  +-----------------------------------------------------------------------------------------------------+
  | start   end     n    d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |-----------------------------------------------------------------------------------------------------|
  |     0     1   617   37    0   0.94003   0.99247   0.94716   0.94003   0.94712    0.92459    0.96305 |
  |     1     2   580   31   30   0.94513   0.99195   0.95281   0.88846   0.90243    0.87368    0.92492 |
  |     2     3   519   19   31   0.96226   0.99110   0.97091   0.85493   0.87623    0.84397    0.90222 |
  |     3     4   469   18   32   0.96026   0.99016   0.96980   0.82096   0.84990    0.81434    0.87916 |
  |     4     5   419   19   33   0.95280   0.98915   0.96325   0.78220   0.81885    0.77979    0.85164 |
  |-----------------------------------------------------------------------------------------------------|
  |     5     6   367   18   27   0.94908   0.98793   0.96067   0.74238   0.78645    0.74391    0.82277 |
  |     6     7   322   10   28   0.96753   0.98670   0.98057   0.71827   0.77087    0.72584    0.80950 |
  |     7     8   284    8   28   0.97037   0.98521   0.98494   0.69699   0.75941    0.71191    0.80020 |
  |     8     9   248    3   25   0.98726   0.98346   1.00387   0.68811   0.76238    0.71299    0.80445 |
  |     9    10   220    7   23   0.96643   0.98172   0.98443   0.66501   0.74988    0.69691    0.79498 |
  +-----------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Female, agegrp = 65-74

  +------------------------------------------------------------------------------------------------------+
  | start   end      n    d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |------------------------------------------------------------------------------------------------------|
  |     0     1   1108   93    0   0.91606   0.97715   0.93749   0.91606   0.93744    0.91840    0.95215 |
  |     1     2   1015   94   65   0.90433   0.97497   0.92754   0.82842   0.86917    0.84358    0.89085 |
  |     2     3    856   59   50   0.92900   0.97237   0.95540   0.76960   0.83055    0.80109    0.85604 |
  |     3     4    747   54   59   0.92474   0.96912   0.95421   0.71168   0.79294    0.75993    0.82195 |
  |     4     5    634   36   32   0.94175   0.96553   0.97536   0.67023   0.77261    0.73650    0.80444 |
  |------------------------------------------------------------------------------------------------------|
  |     5     6    566   45   48   0.91697   0.96217   0.95303   0.61458   0.73727    0.69773    0.77250 |
  |     6     7    473   30   42   0.93363   0.95755   0.97502   0.57379   0.71774    0.67466    0.75618 |
  |     7     8    401   22   32   0.94286   0.95303   0.98933   0.54100   0.71149    0.66483    0.75290 |
  |     8     9    347   22   35   0.93323   0.94687   0.98559   0.50488   0.70037    0.64908    0.74567 |
  |     9    10    290   23   30   0.91636   0.94068   0.97415   0.46265   0.68444    0.62789    0.73425 |
  +------------------------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Female, agegrp = 75+

  +-------------------------------------------------------------------------------------------------------+
  | start   end      n     d    w         p    p_star         r        cp    cns_pp   lo_cns~p   hi_cns~p |
  |-------------------------------------------------------------------------------------------------------|
  |     0     1   1499   277    0   0.81521   0.91942   0.88666   0.81521   0.88360    0.86015    0.90334 |
  |     1     2   1222   165   82   0.86029   0.91716   0.93799   0.70132   0.82797    0.79782    0.85403 |
  |     2     3    975   114   67   0.87892   0.91096   0.96482   0.61640   0.80203    0.76615    0.83301 |
  |     3     4    794    85   85   0.88689   0.90298   0.98218   0.54668   0.78767    0.74490    0.82414 |
  |     4     5    624    67   53   0.88787   0.89525   0.99176   0.48538   0.78453    0.73363    0.82686 |
  |-------------------------------------------------------------------------------------------------------|
  |     5     6    504    57   46   0.88150   0.88673   0.99410   0.42786   0.78436    0.72396    0.83306 |
  |     6     7    401    64   37   0.83268   0.87798   0.94841   0.35627   0.74935    0.67824    0.80698 |
  |     7     8    300    39   30   0.86316   0.86708   0.99547   0.30752   0.75559    0.66948    0.82223 |
  |     8     9    231    27   20   0.87783   0.85610   1.02538   0.26995   0.80054    0.68445    0.87763 |
  |     9    10    184    26   18   0.85143   0.84233   1.01080   0.22984   0.80936    0.64265    0.90377 |
  +-------------------------------------------------------------------------------------------------------+


Adjusted survival estimates weighting stratum-specific survival in each group of agegrp by ICSSwt weights.

------------------------------------------------------------------------------------------------------------
-> sex = Male

  +---------------------------------------------------------------------------------------+
  | start   end        cp     cr_e2   lo_cr_e2   hi_cr_e2    cns_pp   lo_cns~p   hi_cns~p |
  |---------------------------------------------------------------------------------------|
  |     0     1   0.87799   0.92336    0.90910    0.93547   0.92214    0.90788    0.93428 |
  |     1     2   0.79020   0.87370    0.85504    0.89012   0.87255    0.85384    0.88903 |
  |     2     3   0.71385   0.83289    0.81042    0.85294   0.83166    0.80898    0.85190 |
  |     3     4   0.64996   0.79975    0.77392    0.82297   0.80121    0.77508    0.82466 |
  |     4     5   0.59444   0.77712    0.74763    0.80362   0.78027    0.74999    0.80736 |
  |---------------------------------------------------------------------------------------|
  |     5     6   0.53865   0.74341    0.71013    0.77349   0.74109    0.70486    0.77360 |
  |     6     7   0.49678   0.72537    0.68799    0.75908   0.72103    0.67986    0.75788 |
  |     7     8   0.45755   0.70787    0.66583    0.74565   0.70312    0.65708    0.74421 |
  |     8     9   0.42268   0.69000    0.64278    0.73230   0.69102    0.63969    0.73657 |
  |     9    10   0.39681   0.69383    0.63927    0.74183   0.69357    0.63227    0.74675 |
  +---------------------------------------------------------------------------------------+

------------------------------------------------------------------------------------------------------------
-> sex = Female

  +---------------------------------------------------------------------------------------+
  | start   end        cp     cr_e2   lo_cr_e2   hi_cr_e2    cns_pp   lo_cns~p   hi_cns~p |
  |---------------------------------------------------------------------------------------|
  |     0     1   0.90121   0.93020    0.91992    0.93921   0.92929    0.91899    0.93832 |
  |     1     2   0.82052   0.87429    0.86049    0.88682   0.87309    0.85923    0.88569 |
  |     2     3   0.75927   0.83703    0.82075    0.85198   0.83686    0.82046    0.85190 |
  |     3     4   0.70692   0.80864    0.79020    0.82564   0.80861    0.78986    0.82587 |
  |     4     5   0.66136   0.78745    0.76686    0.80646   0.78819    0.76702    0.80769 |
  |---------------------------------------------------------------------------------------|
  |     5     6   0.61271   0.76188    0.73891    0.78313   0.76413    0.74030    0.78610 |
  |     6     7   0.57126   0.73851    0.71318    0.76199   0.74185    0.71510    0.76651 |
  |     7     8   0.53982   0.73021    0.70213    0.75611   0.73679    0.70651    0.76447 |
  |     8     9   0.51562   0.73308    0.70167    0.76177   0.74705    0.71117    0.77918 |
  |     9    10   0.48643   0.72809    0.69236    0.76040   0.74274    0.69747    0.78232 |
  +---------------------------------------------------------------------------------------+

Note: The cumulative relative/net survival exceeds 1 or is greater 
      than the estimate in the previous interval for at least one 
      level of agegrp. The CI is set to missing.
Paul Dickman
Paul Dickman
Professor of Biostatistics

Biostatistician working with register-based cancer epidemiology.