Announcement

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

  • Problems with cumulative incidence graphs after using stcompet

    Hi

    I'm currently working on a project regarding prostate cancer (PC) specific mortality. I want to draw graphs that show the cumulative PC-mortality for 4 different timeperiods, stratified by agegroup and cancer-stage at diagnosis. Because death of other causes than PC is a competing risk to death of PC, I'm using stcompet. The cumulative incidence curves are then drawn using twoway line plots. My problem is, that all of the graphs look almost identical, indicating that the the cumulative PC-mortality is (almost entirely) the same for all agegroups and cancer-stages. (See attached photos. Sorry about the danish axis-titles. The x-axis is time since diagnosis, and the y-axis is the cumulative PC-mortality)

    This simply can't be right - so I must be doing something wrong. Here is the code:

    Code:
    generate Event = 0
    replace Event = 1 if Status == 1
    replace Event = 2 if DeathbyPC == 1
    replace Event = 3 if Status == 2 & DeathbyPC == 0
    replace Event = 4 if Status == 3
    label var Event "Status at 31/12/2013 - with cause of death"
    label define information  ///
      1 "Alive and living in the country 31/12/2013" 2 "Dead. PC cause of death" 3 "Dead by other causes than PC" ///
      4 "Immigrated"
    label value Event information
     
    stset Follow-up-time, failure(Event == 2) scale(365.25) id(PID)
    
    stcompet CumInc = ci, compet1(3) by(Year_diagnosis_cat)
    
    sort _t
    And below is the code that makes the graphs for the 50-64 year olds. The graphs for the two other agegroups were made the same way, changing Age_grp to 2 and 3 instead of 1.

    Code:
    quietly twoway ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 1 & Year_diagnosis_cat == 1960, ///
                      c(J) lpa(solid) lco(green) lpa(l)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 1 & Year_diagnosis_cat == 1990, ///
                      c(J) lpa(solid) lco(orange) lpa(2)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 1 & Year_diagnosis_cat == 1998, ///
                      c(J) lpa(solid) lco(red) lpa(3)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 1 & Year_diagnosis_cat == 2006, ///
                      c(J) lpa(solid) lco(yellow) lpa(4)) ///
     , name(p2_1, replace) nodraw xtitle("Tid siden diagnose") ytitle("Andel døde") title("Lokaliseret") ///
       legend (label(1 "1960-1989") ///                            
       label(2 "1990-1997")   ///                              
       label(3 "1998-2005") ///
       label(4 "2006-2013"))
       
    quietly twoway ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 2 & Year_diagnosis_cat == 1960, ///
                      c(J) lpa(solid) lco(green) lpa(l)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 2 & Year_diagnosis_cat == 1990, ///
                      c(J) lpa(solid) lco(orange) lpa(2)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 2 & Year_diagnosis_cat == 1998, ///
                      c(J) lpa(solid) lco(red) lpa(3)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 2 & Year_diagnosis_cat == 2006, ///
                      c(J) lpa(solid) lco(yellow) lpa(4)) ///
     , name(p2_2, replace) nodraw xtitle("Tid siden diagnose") ytitle("Andel døde") title("Regional") ///
       legend (label(1 "1960-1989") ///                            
       label(2 "1990-1997")   ///                              
       label(3 "1998-2005") ///
       label(4 "2006-2013"))
       
    quietly twoway ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 3 & Year_diagnosis_cat == 1960, ///
                      c(J) lpa(solid) lco(green) lpa(l)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 3 & Year_diagnosis_cat == 1990, ///
                      c(J) lpa(solid) lco(orange) lpa(2)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 3 & Year_diagnosis_cat == 1998, ///
                      c(J) lpa(solid) lco(red) lpa(3)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Stage == 3 & Year_diagnosis_cat == 2006, ///
                      c(J) lpa(solid) lco(yellow) lpa(4)) ///
     , name(p2_3, replace) nodraw xtitle("Tid siden diagnose") ytitle("Andel døde") title("Metastatisk") ///
       legend (label(1 "1960-1989") ///                            
       label(2 "1990-1997")   ///                              
       label(3 "1998-2005") ///
       label(4 "2006-2013"))
       
    quietly twoway ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Year_diagnosis_cat == 1960, ///
                      c(J) lpa(solid) lco(green) lpa(l)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Year_diagnosis_cat == 1960, ///
                      c(J) lpa(solid) lco(orange) lpa(2)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Year_diagnosis_cat == 1960, ///
                      c(J) lpa(solid) lco(red) lpa(3)) ///
     (line CumInc  _t if Event == 2 & _t<=15 & Age_grp == 1 & Year_diagnosis_cat == 1960, ///
                      c(J) lpa(solid) lco(yellow) lpa(4)) ///
     , name(p2_total, replace) nodraw xtitle("Tid siden diagnose") ytitle("Andel døde") title("Total") ///
       legend (label(1 "1960-1989") ///                            
       label(2 "1990-1997")   ///                              
       label(3 "1998-2005") ///
       label(4 "2006-2013"))
       
    grc1leg (p2_1 p2_2 p2_3 p2_total), name(p50_64_2, replace) legendfrom(p2_2)
    Can anyone tell me, whether or not any of the above explains, why the graphs look so similar, and what I'm possibly doing wrong?

    Kind regards,
    Frederik
Working...
X