Announcement

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

  • Hazard assumption not met in STATA

    Dear Statalist,

    I have categorized participants into 4 groups based on two baseline parameters to compare the mortality among groups. I tested the proportional hazard assumption using estat phtest, detail command, but the PH assumption is not met.

    Here is what I got:
    PHP Code:
             stptimeper(1000by(gr)
     
             
    failure _d:  event == 1
       analysis time _t
    :  t_eventyears
                     id
    :  ID
     
     Group 
    |  person-time    failures     rate             [95ConfInterval]
    -----------+-----------------------------------------------------------
     
    GR_1 |    30375.285        150    4.9382252   4.20795    5.795237]
     
    GR_2 |     12924.76         99    7.6597168     [6.29019    9.327423]
     
    GR_3 |    1523.6044        29    19.033812     [13.22701    27.38987]
     
    GR_4|    2167.1376          7     3.2300672     [1.539883    6.775409]
    -----------+-----------------------------------------------------------
         
    total |    46990.787     285   6.0650186    [5.400218     6.81166]
     
    stcox i.grnolog
     
             failure _d
    :  event == 1
       analysis time _t
    :  t_eventyears
                     id
    :  ID
     
    Cox regression 
    -- Breslow method for ties
     
    No
    of subjects =       10,111                  Number of obs    =      10,111
    No
    of failures =          285
    Time at risk    
    =  46990.78722
                                                    LR chi2
    (3)       =       42.49
    Log likelihood  
    =   -2509.9229                  Prob chi2      =      0.0000
     
     
     
     
    -------------------------------------------------------------------------------------------------------
                  
    _t HazRatio     StdErr.       Z      P>|z|            [95ConfInterval]
    --------------------------------------+----------------------------------------------------------------
                   
    gr |
            
    GR_2  |   1.553045   .2011129     3.40   0.001          [1.204917    2.001756]
            
    GR_3  |   3.885477   .7882809     6.69   0.000          [2.61068    5.782759]
            
    GR_4  |   .6511265   .2517825    -1.11   0.267          [.3051521    1.389359]
    -------------------------------------------------------------------------------------------------------





                    
    Test of proportional-hazards assumption
                    Time
    :  Time
                    
    ----------------------------------------------------------------
                                    
    rho            chi2           df        Prob>chi2
                    
    ------------+---------------------------------------------------
                    
    1b.gr            .            .                  1             .
                    
    2.gr      0.09032         2.33           1         0.1272
                    3.gr      0.21086        12.71          1         0.0004
                    4. gr     0.22599        14.52          1         0.0001
                    
    ------------+---------------------------------------------------
                global 
    test                   25.16          3         0.0000
                    
    ---------------------------------------------------------------- 
    What would you suggest?

    Thank you in advance.

  • #2
    Your stcox model estimated that at every point in time the hazard in group 4 is 0.65 times the hazard in group 1, that is the hazard in group 4 is (0.65-1)*100%= - 35% smaller in group 4 than group 1. Notice that in interpreting I did not specify the time point at which I looked to compare group 1 and group 4. I don't have to, because stcox assumes that this ratio is always the same. That is an assumption, which could be wrong. You tested that assumption using estat phtest. If that assumption is not met, than you need to relax that assumption. In this case, that means allowing the effects of gr to change with time. To allow the effect of one variable to change with another variable, is adding an interaction effect. This interaction effect is best added using the tvc() and texp() options, in stcox.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank for your answer.

      Comment

      Working...
      X