Announcement

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

  • Wald p-values and CIs for stcox

    Can Stata produce P-values and confidence intervals for the hazard ratio based on the Wald statistic from a Cox model rather than likelihood ratio? This can be done in SAS using 'Risk Limits' but I cannot locate a parallel command in Stata. Thanks in advance.

  • #2
    The -test- command produces Wald statistics after -stcox- (and any other Stata estimation command).

    Comment


    • #3
      Thanks. That gives the p-value but not CIs. Any other suggestions?

      Comment


      • #4
        -lincom-

        Comment


        • #5
          With stcox, try the option vce(robust)
          Best regards,

          Marcos

          Comment


          • #6
            Below, using the dataset "drugtr" (available in Stata), an example of what happens with each command.

            First, the LR "ominbus" test with the default command:

            Code:
            . stcox drug age
            
                     failure _d:  died
               analysis time _t:  studytime
            
            Iteration 0:   log likelihood = -99.911448
            Iteration 1:   log likelihood = -83.551879
            Iteration 2:   log likelihood = -83.324009
            Iteration 3:   log likelihood = -83.323546
            Refining estimates:
            Iteration 0:   log likelihood = -83.323546
            
            Cox regression -- Breslow method for ties
            
            No. of subjects =           48                     Number of obs   =        48
            No. of failures =           31
            Time at risk    =          744
                                                               LR chi2(2)      =     33.18
            Log likelihood  =   -83.323546                     Prob > chi2     =    0.0000
            
            ------------------------------------------------------------------------------
                      _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                    drug |   .1048772   .0477017    -4.96   0.000     .0430057    .2557622
                     age |   1.120325   .0417711     3.05   0.002     1.041375     1.20526
            ------------------------------------------------------------------------------
            Then, with "vce(robust)", and now having the Wald "omnibus" test:

            Code:
            . stcox drug age, vce(robust)
            
                     failure _d:  died
               analysis time _t:  studytime
            
            Iteration 0:   log pseudolikelihood = -99.911448
            Iteration 1:   log pseudolikelihood = -83.551879
            Iteration 2:   log pseudolikelihood = -83.324009
            Iteration 3:   log pseudolikelihood = -83.323546
            Refining estimates:
            Iteration 0:   log pseudolikelihood = -83.323546
            
            Cox regression -- Breslow method for ties
            
            No. of subjects      =           48                Number of obs   =        48
            No. of failures      =           31
            Time at risk         =          744
                                                               Wald chi2(2)    =     34.46
            Log pseudolikelihood =   -83.323546                Prob > chi2     =    0.0000
            
            ------------------------------------------------------------------------------
                         |               Robust
                      _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                    drug |   .1048772   .0434523    -5.44   0.000     .0465601     .236237
                     age |   1.120325   .0366286     3.48   0.001     1.050786    1.194465
            ------------------------------------------------------------------------------
            Best regards,

            Marcos

            Comment


            • #7
              A last note, but directly related to the subject: if I understood correctly, no matter the type of omnibus test (Wald or LR), the specific p-values for the predictors (here, drug and age) come from the Wald statistic.
              Best regards,

              Marcos

              Comment

              Working...
              X