Announcement

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

  • CIF after competing risk regression with imputed data

    Hello,

    I am using a competing risk regression (Fine and Gray) model to understand patient characteristics associated with major cardiac events (MCE) after organ transplantation. The outcome is MCE and I am using non-MCE death as a competing risk. A single variable included in my final (pack-years smoked) contains missing data and I would like to run the model using multiple imputation for this variable. Thus far, my code is:

    Code:
    mi stset cohort_end1, id( study_id) fail( comp_risk ==1 ) origin( cohort_date) enter(cohort_date)
    Code:
    mi estimate, hr: stcrreg i.diabetes i.race i.gender age pack_years i.htn year_transplant, compete(comp_risk==2)
    I would like to plot the CIF by diabetes status:

    Code:
    stcurve, cif at1(diabetes=0)  at2(diabetes=1)  at3(diabetes =2)
    Easy to do in the non-imputed data, but in the imputed data, I receive an error: "last estimates not found r(301);

    Any advice on how to remedy this is appreciated!

    In addition to plotting the CIF, I would love to generate point estimates of CIF with 95% confidence intervals at specific follow up times (ie: 12 months, 60 months and 120 months after organ transplant).

    Finally, is there a way to perform the Gray test to determine if the cumulative incidence of MCE differs among the different exposures (ie: diabetes status)?

    Thank you for any help you can offer.

    Giorgio



  • #2
    I will follow this post.

    Comment


    • #3
      I have the same Problem. found a solution yet?

      Comment


      • #4
        No, unfortunately no solutions yet. My statistician who excels in survival analysis is stumped as well.

        Comment


        • #5
          Hello there, I'm trying to run a similar analysis and am receiving the exact same error when I attempt to get STATA to construct the CIF curves from imputed data. Has any found any solutions or any suggestions?

          Comment


          • #6
            Hi,

            I have the same issue.
            I found this post, and modified it, I think this solved it for me.
            So far I have only calculated the cumulative incidences, not their confidence intervals.


            Code:
            
            snapshot save  //// save dataset in memory
            
            
            clear
            save results, emptyok replace //// create file to hold results
            
            
            snapshot restore 1
            
            mi stset fu_time, fail(deathcause==1) id(id)
            
            mi estimate, shr sav(miestfile, replace): stcrreg i.treatment , compete(deathcause==2)
            
            tempfile d0
            save d0, replace
            
            
            forvalues i = 1/5 {
                        tempfile d`i'
                        use d0, clear
                        mi extract `i' , clear  /* get i-th imputed data set, in this case 5 imputed datasets*/
                        stcrreg i.treatment , compete(deathcause==2)
                        stcurve , cif at1(treatment = 0) at2(treatment = 1) ///
                        outfile(`d`i'', replace)
                        use results, clear
                        append using `d`i''
                        save, replace
            }
            
            
            use results, clear
            collapse (mean) ci2 (mean) ci3, by(_t)
            label variable ci2 "treatment0"
            label variable ci3 "treatment1"
            sort _t
            
            twoway line ci2 ci3 _t, connect(J) sort ytitle(Cumulative Incidence) xtitle(analysis time)
             
            
            snapshot restore 1 /// to get back to original dataset

            Comment

            Working...
            X