Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Relative survival and relative excess risk (RER) using imputed data

    Hi everyone,

    Does anyone know how I can calculate relative survival (strs) and relative excess risk (RER) with imputed data (mi set) in Stata version 12.1? When I use the following command I get the error "strs requires that the data are stset with only one observation per individual":

    mi stset fup, failure(vit==1) id(id)
    strs using nedmort, br(0(1)10) mergeby(_year sex _age) by(agecat graad hr) diagage(age) diagyear(incj) attage(_age) attyear(_year) survprob(prob) save(replace)
    use grouped, replace
    xi: mi estimate, hr: glm d i.end i.agecat, family (pois) link (rs d_star) lnoffset (y) eform

    When I try the next command (mi before strs) I get the error "unrecognized subcommand: mi strs"

    mi stset fup, failure(vit==1) id(id)
    mi strs using nedmort, br(0(1)10) mergeby(_year sex _age) by(agecat graad hr) diagage(age) diagyear(incj) attage(_age) attyear(_year) survprob(prob) save(replace)
    use grouped, replace
    xi: mi estimate, hr: glm d i.end i.agecat, family (pois) link (rs d_star) lnoffset (y) eform

    Thanks in advance,

    Anna



  • #2
    Welcome to Statalist, Anna! You can correct the error by adding the cmdok option to mi estimate. See the Manual. Please in future posts put all code and results between CODE delimiters, described in FAQ 12.
    Last edited by Steve Samuels; 27 Nov 2018, 06:26.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      I would suggest using stpm2 to do what you want rather than strs plus glm. There's a recent thread showing how to do this.

      stpm2 allows you to estimate both relative survival and relative excess risks directly from the individual data. The challenge with your approach is that it involves two steps; use strs to prepare the data for modelling and then fit the model. The process is then:

      1. Create n imputed data sets (it seems you have done this)
      2. Use strs to tabulate life tables for each of the n imputed data sets and prepare/save data for modelling
      3. Fit the model to each of the n imputed data sets and combine estimates using Rubin's rules

      You have done step 1. Step 3 is standard.

      Step 2 is the problem; strs is not designed to do this. It's possible you may be able to force a workaround but my guess is it will be frustrating.

      Nur and colleagues (doi:10.1093/ije/dyp309 ) wrote a tutorial paper on multiple imputation of relative survival using a life table approach. They published code but the website has since been restructured. They used strel rather than strs but if you really want to use the life table approach then I would suggest getting their code.

      Falcaro and colleagues (doi: 10.1097/EDE.0000000000000283) wrote a tutorial paper where they instead used a flexible parametric model. This is the approach I would recommend. Look at the code in this thread.

      Comment

      Working...
      X