Announcement

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

  • Estimating life expectancy

    Dear Stata users,

    I'm interested in estimating the life-years remaining for certain attained ages in my population (e.g., 30). I am presently using skew-normal regression, which is great because then the results are directly interpretable in terms of difference in life years remaining, or when using the margins command, life years remaining for specified covariates. However, I wanted to compare my estimates with the Weibull and Gompterz models. The Weibull model comes close to my estimates from the skew-normal results, but as I understand from literature, the Gompterz is usually the best estimation of life expectancy. Therefore, my question, how do I convert the results from the Gompertz regression so that the represent similar results as to that of the Weibull regression? Is there an easy to implement formula for this?

    Code:
    * Comparison with a weibull regression
    streg i.var1 i.var2 i.var3, d(w)
    predict time1, mean // to get the overall estimated remaining life years
    
    * Gompertz regression results
    streg i.var1 i.var2, d(gompertz)
    predict time2, xb
    HTML Code:
    No. of subjects =        1,339  Number of obs    = 1,339
    No. of failures =          254
    Time at risk    =        13084
      LR chi2(3)       = 37.70
    Log likelihood  =   -217.86072  Prob > chi2      = 0.0000
    
       
    _t  Haz. Ratio   Std. Err. z P>z     [95% Conf. Interval]
       
    
    Var1     .6460315   .0867413 -3.25 0.001     .4965518 .8405097
    
    
    Var2     2.365025   .3357735 6.06 0.000     1.790551 3.123811
    
    
    Var3     1.043276   .1442719 0.31 0.759     .7955887 1.368074
    _cons    .0018343   .0004802 -24.07 0.000     .0010981 .003064
       
    /gamma     .069243    .004836 14.32 0.000     .0597645 .0787214

    HTML Code:
    summ time1
    Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
           time1 |      1,410    46.71274     6.07855   33.89783    54.4027
    
    summ time2
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
           time2 |      1,410   -6.267286    .3992502  -6.738017  -5.397956

  • #2
    Hi,

    Were you able to figure it out?

    Priyanka

    Comment


    • #3
      Hi Priyanka,

      I ended up using a different method, but never figured out the answer to my question.

      Best,
      Jonviea

      Comment


      • #4
        Thanks Jonviea for your reply. Can you share what other methods you share?

        Comment


        • #5
          Hi Priyanka,

          I ended up using stpm2 and predicting the life years remaining at various specified ages.

          Comment


          • #6
            My survival analysis is pretty rusty. But, going back to the original question, doesn't margins get you what you want? Admittedly, it seems that you can only predict median survival times after a Gompertz model. The code in the original post used predict rather than margins. An example, keeping just the margins output:

            Code:
            webuse kva
            stset failtime
            streg load i.bearings, dis(weibull)
            est store surv_weibull
            margins, at(load = (15(5)40))
            
            ------------------------------------------------------------------------------
                         |            Delta-method
                         |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     _at |
                      1  |   139.9711   12.43511    11.26   0.000     115.5988    164.3435
                      2  |   103.5083   6.599892    15.68   0.000     90.57271    116.4438
                      3  |   76.54406   3.568829    21.45   0.000     69.54929    83.53884
                      4  |   56.60412    2.66545    21.24   0.000     51.37993    61.82831
                      5  |   41.85859   2.711542    15.44   0.000     36.54406    47.17311
                      6  |   30.95431   2.787683    11.10   0.000     25.49055    36.41807
            ------------------------------------------------------------------------------
            
            
            streg load i.bearings, dis(gompertz)
            est store surv_gompertz
            margins, at(load = (15(5)40))
            
            ------------------------------------------------------------------------------
                         |            Delta-method
                         |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     _at |
                      1  |   127.8613   3.476386    36.78   0.000     121.0478    134.6749
                      2  |   107.2744   2.615282    41.02   0.000     102.1485    112.4002
                      3  |   86.68737   2.038032    42.53   0.000      82.6929    90.68184
                      4  |   66.10044   2.006614    32.94   0.000     62.16754    70.03333
                      5  |   45.51533   2.539063    17.93   0.000     40.53885     50.4918
                      6  |   24.99758   3.317676     7.53   0.000     18.49505    31.50011
            ------------------------------------------------------------------------------
            Those are basically the median survival times with load fixed at 6 values (15 to 40, in increments of 5 units). With margins, the option predict(mean) would get you mean survival time, but this is not available in a Gompertz model.
            Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

            When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

            Comment


            • #7
              Thank you both.

              Comment


              • #8
                Hi Jonviea,

                You mentioned " I ended up using stpm2 and predicting the life years remaining at various specified ages"

                Could you please share how you calculate the life expectancy using stpm2?

                Super appreciate if you could share! Many thanks!

                Comment

                Working...
                X