Announcement

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

  • Checking proportional hazard assumption

    Dear Statalist Community,

    I am sorry if this post has an obvious solution, but it is something I am not 100% convinced about and that is why I decided to post it here. Thank you very much in advance.

    I am doing a survival analysis study from a cohort of patients, looking if they have a stroke with the aim of finding risk factors. I explained this in detail in some of my previous posts. The time variable is age, to standardise for it.

    One of the important factors, from its clinical relevance, is gender.

    The Kaplan Meyer curve and survival function looks like the following.

    Click image for larger version

Name:	Gender KM.jpg
Views:	2
Size:	25.5 KB
ID:	1611723


    Code:
    sts list, by(sex)
    
             failure _d:  stroketotallong_ == 1
       analysis time _t:  meanageass_
      enter on or after:  time==.
      exit on or before:  stroketotallong_==2
                     id:  id
    
                 At           Net    Survivor      Std.
      Time     Risk   Fail   Lost    Function     Error     [95% Conf. Int.]
    ------------------------------------------------------------------------
    Male 
        17        0      0     -2      1.0000         .          .         .
        18        2      0     -2      1.0000         .          .         .
        19        4      0     -3      1.0000         .          .         .
        20        7      0     -4      1.0000         .          .         .
        21       11      0     -4      1.0000         .          .         .
        22       15      0     -1      1.0000         .          .         .
        23       16      0      2      1.0000         .          .         .
        24       14      0     -1      1.0000         .          .         .
        25       15      0     -2      1.0000         .          .         .
        26       17      1      4      0.9412    0.0571     0.6502    0.9915
        27       12      0      2      0.9412    0.0571     0.6502    0.9915
        29       10      0      1      0.9412    0.0571     0.6502    0.9915
        30        9      0     -1      0.9412    0.0571     0.6502    0.9915
        31       10      0      1      0.9412    0.0571     0.6502    0.9915
        32        9      0     -1      0.9412    0.0571     0.6502    0.9915
        33       10      0     -2      0.9412    0.0571     0.6502    0.9915
        34       12      0      3      0.9412    0.0571     0.6502    0.9915
        35        9      0     -4      0.9412    0.0571     0.6502    0.9915
        36       13      2     -6      0.7964    0.1058     0.4893    0.9300
        37       17      0      1      0.7964    0.1058     0.4893    0.9300
        38       16      1      0      0.7466    0.1103     0.4551    0.8972
        39       15      0      1      0.7466    0.1103     0.4551    0.8972
        40       14      0      1      0.7466    0.1103     0.4551    0.8972
        41       13      2      1      0.6317    0.1196     0.3570    0.8148
        42       10      1     -5      0.5686    0.1232     0.3019    0.7663
        43       14      2     -3      0.4873    0.1182     0.2484    0.6901
        45       15      1      0      0.4549    0.1147     0.2287    0.6566
        46       14      1     -4      0.4224    0.1110     0.2087    0.6225
        47       17      1     -2      0.3975    0.1072     0.1947    0.5945
        48       18      0      3      0.3975    0.1072     0.1947    0.5945
        49       15      1     -5      0.3710    0.1033     0.1792    0.5645
        50       19      2     -4      0.3320    0.0961     0.1581    0.5172
        51       21      1      1      0.3162    0.0928     0.1500    0.4972
        52       19      1      3      0.2995    0.0894     0.1411    0.4761
        53       15      2     -1      0.2596    0.0818     0.1186    0.4261
        54       14      0     -1      0.2596    0.0818     0.1186    0.4261
        55       15      0      1      0.2596    0.0818     0.1186    0.4261
        57       14      0     -2      0.2596    0.0818     0.1186    0.4261
        58       16      1     -3      0.2434    0.0783     0.1100    0.4047
        59       18      2     -1      0.2163    0.0719     0.0961    0.3677
        60       17      0      2      0.2163    0.0719     0.0961    0.3677
        61       15      1     -7      0.2019    0.0685     0.0885    0.3479
        62       21      0      1      0.2019    0.0685     0.0885    0.3479
        63       20      2      0      0.1817    0.0631     0.0787    0.3186
        64       18      1      0      0.1716    0.0604     0.0737    0.3038
        65       17      0     -2      0.1716    0.0604     0.0737    0.3038
        66       19      0      5      0.1716    0.0604     0.0737    0.3038
        68       14      1      0      0.1594    0.0573     0.0674    0.2862
        69       13      1      2      0.1471    0.0542     0.0612    0.2685
        70       10      0      2      0.1471    0.0542     0.0612    0.2685
        72        8      1      1      0.1287    0.0505     0.0507    0.2443
        73        6      0     -1      0.1287    0.0505     0.0507    0.2443
        74        7      0      2      0.1287    0.0505     0.0507    0.2443
        75        5      0     -2      0.1287    0.0505     0.0507    0.2443
        76        7      2     -2      0.0919    0.0422     0.0308    0.1946
        77        7      2      0      0.0657    0.0340     0.0192    0.1532
        78        5      1      3      0.0525    0.0296     0.0137    0.1320
        79        1      0      1      0.0525    0.0296     0.0137    0.1320
        81        0      0     -1      0.0525    0.0296     0.0137    0.1320
        87        1      0      1      0.0525    0.0296     0.0137    0.1320
    Female 
        17        3      0     -8      1.0000         .          .         .
        18       11      0     -5      1.0000         .          .         .
        19       16      0     -2      1.0000         .          .         .
        21       18      0     -3      1.0000         .          .         .
        22       21      0     -4      1.0000         .          .         .
        23       25      0      4      1.0000         .          .         .
        24       21      0      2      1.0000         .          .         .
        25       19      0     -2      1.0000         .          .         .
        26       21      0      1      1.0000         .          .         .
        27       20      0     -5      1.0000         .          .         .
        29       25      0      3      1.0000         .          .         .
        30       22      0      1      1.0000         .          .         .
        31       21      1     -2      0.9524    0.0465     0.7072    0.9932
        32       22      0     -3      0.9524    0.0465     0.7072    0.9932
        33       25      1      6      0.9143    0.0582     0.6975    0.9780
        34       18      0      2      0.9143    0.0582     0.6975    0.9780
        35       16      0     -7      0.9143    0.0582     0.6975    0.9780
        36       23      0     -1      0.9143    0.0582     0.6975    0.9780
        37       24      0      1      0.9143    0.0582     0.6975    0.9780
        38       23      1     -5      0.8745    0.0679     0.6590    0.9578
        39       27      1      2      0.8421    0.0727     0.6314    0.9378
        40       24      1     -5      0.8071    0.0777     0.5965    0.9149
        41       28      1     -2      0.7782    0.0801     0.5710    0.8939
        42       29      1      0      0.7514    0.0817     0.5476    0.8732
        43       28      0      4      0.7514    0.0817     0.5476    0.8732
        44       24      0     -2      0.7514    0.0817     0.5476    0.8732
        45       26      0     -1      0.7514    0.0817     0.5476    0.8732
        46       27      2     -6      0.6957    0.0846     0.4968    0.8285
        47       31      0      7      0.6957    0.0846     0.4968    0.8285
        48       24      1     -1      0.6667    0.0859     0.4697    0.8046
        50       24      0      1      0.6667    0.0859     0.4697    0.8046
        51       23      0     -1      0.6667    0.0859     0.4697    0.8046
        52       24      3     -9      0.5834    0.0876     0.3944    0.7319
        53       30      2     -5      0.5445    0.0860     0.3638    0.6939
        54       33      1      2      0.5280    0.0849     0.3513    0.6772
        55       30      1      0      0.5104    0.0839     0.3376    0.6593
        56       29      1      0      0.4928    0.0828     0.3240    0.6413
        57       28      0      5      0.4928    0.0828     0.3240    0.6413
        58       23      1     -2      0.4714    0.0820     0.3063    0.6200
        59       24      2      2      0.4321    0.0797     0.2750    0.5796
        61       20      1      0      0.4105    0.0786     0.2574    0.5575
        62       19      1     -1      0.3889    0.0774     0.2400    0.5352
        64       19      1      3      0.3684    0.0759     0.2239    0.5136
        65       15      0      1      0.3684    0.0759     0.2239    0.5136
        66       14      1      0      0.3421    0.0749     0.2018    0.4873
        67       13      1      3      0.3158    0.0737     0.1802    0.4606
        69        9      1     -3      0.2807    0.0734     0.1494    0.4279
        70       11      3     -4      0.2041    0.0653     0.0946    0.3428
        71       12      1     -1      0.1871    0.0621     0.0846    0.3207
        72       12      0     -1      0.1871    0.0621     0.0846    0.3207
        73       13      1      0      0.1727    0.0589     0.0766    0.3012
        74       12      1     -1      0.1583    0.0557     0.0686    0.2816
        75       12      2     -1      0.1320    0.0495     0.0544    0.2444
        76       11      0      2      0.1320    0.0495     0.0544    0.2444
        77        9      1      0      0.1173    0.0461     0.0464    0.2240
        78        8      1      0      0.1026    0.0426     0.0386    0.2034
        79        7      0      2      0.1026    0.0426     0.0386    0.2034
        83        5      2     -1      0.0616    0.0340     0.0164    0.1511
        84        4      0      2      0.0616    0.0340     0.0164    0.1511
        86        2      0      1      0.0616    0.0340     0.0164    0.1511
        87        1      0      1      0.0616    0.0340     0.0164    0.1511
    ------------------------------------------------------------------------
    From these results, it seems that males have a higher risk than females at a younger age, and this gets reversed as patients get older.

    Click image for larger version

Name:	sex hazard.jpg
Views:	2
Size:	25.3 KB
ID:	1611724


    This made me think that the variable gender violets the PH assumption, hence, I should stratify for it in the Cox regression, instead of running the regression with sex as a covariable. However, if I run a stcox with sex and test for its PH assumption, I get the results that state that the PH assumption is not violated.

    Code:
     stcox sex 
    
             failure _d:  stroketotallong_ == 1
       analysis time _t:  meanageass_
      enter on or after:  time==.
      exit on or before:  stroketotallong_==2
                     id:  id
    
    Iteration 0:   log likelihood = -250.79081
    Iteration 1:   log likelihood = -250.04182
    Iteration 2:   log likelihood = -250.04144
    Refining estimates:
    Iteration 0:   log likelihood = -250.04144
    
    Cox regression -- Breslow method for ties
    
    No. of subjects =          380                  Number of obs    =       1,849
    No. of failures =           73
    Time at risk    =         2093
                                                    LR chi2(1)       =        1.50
    Log likelihood  =   -250.04144                  Prob > chi2      =      0.2209
    
    ------------------------------------------------------------------------------
              _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             sex |   .7456718   .1779156    -1.23   0.219     .4671464    1.190262
    ------------------------------------------------------------------------------
    
    . estat phtest
    
          Test of proportional-hazards assumption
    
          Time:  Time
          ----------------------------------------------------------------
                      |                      chi2       df       Prob>chi2
          ------------+---------------------------------------------------
          global test |                      2.45        1         0.1172
          ----------------------------------------------------------------
    Click image for larger version

Name:	phtest.jpg
Views:	1
Size:	31.8 KB
ID:	1611725





    Given this, I thought about using sex as a covariable...but every day that goes by makes me feel a bit more insecure about that decision.

    I would be really grateful if you could advise me on this issue.

    Thank you very much.

    David.

  • #2
    David:
    I find strange that -gender- can be the only predictor for a stroke occurrence.
    Untreated high BP, previous strokes and high BMI are the first other independent variables that spring to an amateur's mind,
    That said, I would take a look at the tons of literature on this topic and reconsider the right-hand side of my regression equation accordingly.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Dear Carlo,

      Thank you very much for your reply.

      Indeed, those risk factors you listed are critical in the general population. In my study, we look at the risk of stroke in a rare genetic condition (which is treatable) that affects differently to males than females; hence, the interest in knowing if the risk of stroke was different between them. However, I also have cardiovascular risk factors (diabetes, hypertension, smoking...) as well as other important factors of the disease (heart problems...) My idea was:

      1. Look at the univariate analysis and KM curves
      2. Adjust each possible risk factor by gender and genetic alteration stratifying by no treatment status (this will be done through a stcox regression with gender + genetic alteration + the other risk factor)
      3. Multivariate stcox regression with all the risk factors that are significant in step 2.

      This is why it is so important to me to know if I can put gender in the stcox regression or stratify by it, as it will appear in all the regressions. I hope this clarifies my previous post.

      Once again, thank you very much for your help.

      Best regards,

      David.

      Comment


      • #4
        David:
        1) despite its wide presence in high standing clinical journal, I'm not a big fan of univariate analyses, as the predictors are more informative when they're adjusted by each other. Notwithstanding, sometimes univariate analyses highlight some unexpected predictor as relevant (admittedly, I do not think this is your case, as stroke predictors have been well studied);
        2) I would follow your point 2) and see what happens;
        3) just a sidelight from the pedantry corner: you have a multivariate regression when you have more than one regressand (see for instance -help mvreg-). In your case you have a multiple -stcox-, since you will end up with for than one predictors.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Dear Carlo,

          Thank you very much for your reply.

          I will follow your advice and thank you very much for clarifying the multivariate/multiple stcox. It will be really important when the time to write the paper comes.

          Best regards,

          David.

          Comment


          • #6
            David:
            yes, it is, just like all the trivial mistakes that can unleash reviewers' (bad) reaction to our papers !
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment

            Working...
            X