Announcement

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

  • Competing risks regression stcrreg stratified baseline hazards

    Hi,
    Just wondering if anyone knows of Stata implementation of this extension of Fine-Gray:
    http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3431205/

    Which as best I can tell would allow for stratified baseline hazards in competing risks regresssion.

    In a nutshell I'd like to have an option to stcrreg to allow for stratification, e.g.
    stcrreg x1 x2 , compete(event==2) strat(z)

    But cannot locate such an extension with findit ... perhaps someone more powerful than I would like to do it... there is even R code in the Supplementary Material of the article above...

    Or if anyone has suggestions for other methods, I'd love to hear it. I have a situation where competing risks makes sense but also there are variables that are certainly going to violate the PH assumption.
    Thanks,
    Scott

  • #2
    Hi Scott,
    Regrettably, the extension for stratification has never been written for -stcrreg- I myself had hoped for it in Stata 13 and then in Stata 14 but it did not arrive. The same problem is with plotting non-parametric CIF curves, which needs to be done manually.
    At present you would need to use R to run the model according to the paper by Zhou et al. you cited. In some settings you can try a time-varying covariate to account for the non-proportional hazard.
    Adam Olszewski

    Comment


    • #3
      Thanks Adam, for the confirmation that the function is not available.
      Sadly the stratification variable is not time-varying-- it's subtypes of a disease that have pretty different baseline hazards so that it's not really sane to just adjust for "subtype". It is reasonable model each subtype completely separately, but it's more interesting to stratify (probably more power too), and it seems stratification facilitates evaluation of effect modification by subtype.
      Perhaps there is not enough consensus that this is the right approach for StataCorp to implement the method, but one can keep hoping.
      Scott

      Comment


      • #4
        Scott,

        You can fit a Fine and Gray model using data expansion and incorporating appropriate time-dependent weights and then using stcox. This is based on work by Geskus (Cause-specific cumulative incidence estimation and the Fine and Gray model under both left truncation and right censoring. Biometrics 2011, 67, 39-49).

        If you install stcrprep from SSC this will do the data expansion and calculate the weights for you. stcrprep is based on the R function crprep available as part of the mstate package.

        The code below gives an example. Note that to get robust standard errors (as you do in stcrreg) then you need to pweights together with vce(cluster id). However, Geskus argues against the need to do this, so I generally use iweights and model-based standard errors. In a reasonably sized data set the difference should be negligible.

        First I fit the same model using stcox as when using stcrreg to show the estimates are the same, then create and include a stratification variable.

        Code:
        use http://www.stata-press.com/data/r14/hiv_si, clear
        stset time, failure(status == 1)
         
         
        stcrreg ccr5, compete(status==2)
        estimates store stcrreg
        
        stset time, failure(status == 1,2) id(patnr)
        
        stcrprep, event(status) keep(ccr5)
        gen event = failcode == status
        
        // using pweights to get robust standard errors
        stset tstop if failcode == 1 [pw=weight_c], failure(event==1) enter(tstart)
        stcox  ccr5,  vce(cluster patnr)
        estimates store stcox_pw
        
        
        // using iweights
        stset tstop if failcode == 1 [iw=weight_c], failure(event==1) enter(tstart)
        stcox ccr5,  
        estimates store stcox_iw
        
        // compare estimats from stcox and stcrprep
        estimates table stcrreg stcox_iw stcox_pw, b(%6.5f) se(%6.5f) eq(1)
        
        // extend to stratified model
        gen teststrata = runiform()<0.5
        stcox ccr5 ,  strata(teststrata)
        Note that the Zhou paper discusses the possibility of calculating separate weights within strata. This can be done using the -byg()- option of stcrprep.

        If your dataset is large then you find the stcrprep/stcox approach much faster than using stcrreg.

        Comment


        • #5
          Paul.
          If dealing with matched case-control data and wanting to perform a competing risks regression, would this approach be preferred, or would it be better to specify a shared frailty model?

          Comment


          • #6
            Oops, sorry. I think I have worked it out for myself. A shared frailty model is analogous to a random effects model, and a stratified model is analogous to a within regression (i.e. fixed effects) model (unless I hear different through this forum).

            Comment

            Working...
            X