Announcement

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

  • Stcomlist - stcompet : Difference between cif curve and table values

    Dear Statalisters,
    I have issues with stcomlist and stcompet since I found differences between curves (from stcompet) and tables values (from stcomlist)
    Here the code I am using to get the tables:

    Code:
    . stset dEv, fail(Ev==1) scale(365.25) origin(ddiag) exit(time mdy(12,31,2015))
    
         failure event:  Ev == 1
    obs. time interval:  (origin, dEv]
     exit on or before:  time mdy(12,31,2015)
        t for analysis:  (time-origin)/365.25
                origin:  time ddiag
    
    ------------------------------------------------------------------------------
            776  total observations
              2  observations end on or before enter()
    ------------------------------------------------------------------------------
            774  observations remaining, representing
             67  failures in single-record/single-failure data
      6,305.235  total analysis time at risk and under observation
                                                    at risk from t =         0
                                         earliest observed entry t =         0
                                              last observed exit t =  20.98836
    
    . stcomlist,compet1(2) compet2(3) compet3(4) at(1 5 10 15) saving("Tables\CR_AllPatients.dta",replace)
    
                failure:  Ev == 1
     competing failures:  Ev == 2 3 4
    
        Time       CIF         SE     [95% Conf. Int.]
    --------------------------------------------------
           1    0.0104     0.0037     0.0050    0.0198
           5    0.0541     0.0085     0.0392    0.0724
          10    0.0928     0.0120     0.0711    0.1180
          15    0.1327     0.0181     0.0996    0.1705
    
    
                failure:  Ev == 2
     competing failures:  Ev == 1 3 4
    
        Time       CIF         SE     [95% Conf. Int.]
    --------------------------------------------------
           1    0.0078     0.0032     0.0033    0.0163
           5    0.0640     0.0092     0.0477    0.0836
          10    0.1079     0.0129     0.0843    0.1347
          15    0.1357     0.0170     0.1044    0.1710
    
    
                failure:  Ev == 3
     competing failures:  Ev == 1 2 4
    
        Time       CIF         SE     [95% Conf. Int.]
    --------------------------------------------------
           1    0.0091     0.0034     0.0041    0.0179
           5    0.0175     0.0048     0.0098    0.0290
          10    0.0449     0.0089     0.0297    0.0647
          15    0.0635     0.0130     0.0413    0.0921
    
    
                failure:  Ev == 4
     competing failures:  Ev == 1 2 3
    
        Time       CIF         SE     [95% Conf. Int.]
    --------------------------------------------------
           1    0.0026     0.0018     0.0005    0.0089
           5    0.0068     0.0030     0.0026    0.0151
          10    0.0128     0.0046     0.0060    0.0245
          15    0.0256     0.0091     0.0119    0.0484
    Then I derive my graph and add lines corresponding to the values found in the table above.

    Code:
    stset dEv, fail(Ev==1) scale(365.25) origin(ddiag) exit(time mdy(12,31,2015))
    cap drop CIFEv1
    stcompet CIFEv1=ci,compet1(2) compet2(3) compet3(4)
    cap drop _tEv1
    rename _t _tEv1
    
    stset dEv, fail(Ev==2) scale(365.25) origin(ddiag) exit(time mdy(12,31,2015))
    cap drop CIFEv2
    stcompet CIFEv2=ci,compet1(1) compet2(3) compet3(4)
    cap drop _tEv2
    rename _t _tEv2
    
    stset dEv, fail(Ev==3) scale(365.25) origin(ddiag) exit(time mdy(12,31,2015))
    cap drop CIFEv3
    stcompet CIFEv3=ci,compet1(2) compet2(1) compet3(4)
    cap drop _tEv3
    rename _t _tEv3
    
    stset dEv, fail(Ev==4) scale(365.25) origin(ddiag) exit(time mdy(12,31,2015))
    cap drop CIFEv4
    stcompet CIFEv4=ci,compet1(2) compet2(3) compet3(1)
    cap drop _tEv4
    rename _t _tEv4
    
    twoway (line CIFEv1 _tEv1 if Ev==1&_tEv1<=30,sort lcolor(gs0) connect(step)) ///
    (line CIFEv2 _tEv2 if Ev==2&_tEv2<=30,sort lcolor(gs3) lp(dash) connect(step)) ///
    (line CIFEv3 _tEv3 if Ev==3&_tEv3<=30,sort lcolor(gs6) lp(dot) connect(step)) ///
    (line CIFEv4 _tEv4 if Ev==4&_tEv4<=30,sort lcolor(gs9) connect(step)), ///
    xline(10) yline(0.0449 0.1079 0.0928 0.0128) ///
    ytitle("Cumulative incidence") xtitle("Time since diagnosis (years)") ///
    xscale(r(0 20)) ///
    title("Competing risk analysis.") ///
    legend(rows(2) symxsize(5) subtitle("Competing events") ///
    label(1 "Local relapse") label(2 "Distant relapse") label(3 "Second BC") label(4 "Deaths")) graphregion(fcolor(white)) ///
    saving("Figures\3_Competingk_Risk_AllPatients",replace)
    Click image for larger version

Name:	Competingk_Risk_AllPatients.png
Views:	1
Size:	46.3 KB
ID:	1559312



    We can see that there is a discordance since the curves do not pass through the points. With some other data, the gap is even more important.
    Would someone have an explanation?

    Many thanks!

  • #2
    Hi- were you able to find a resolution to this discrepancy? I am having a similar issue, but am using stcomlist and stcurve.

    . stset duration_ac, fail(vte_event=1)

    failure event: vte_event == 1
    obs. time interval: (0, duration_ac]
    exit on or before: failure

    ------------------------------------------------------------------------------
    111 total observations
    0 exclusions
    ------------------------------------------------------------------------------
    111 observations remaining, representing
    6 failures in single-record/single-failure data
    1,018.74 total analysis time at risk and under observation
    at risk from t = 0
    earliest observed entry t = 0
    last observed exit t = 56.40604

    . stcrreg doacorlmwh, compete(vte_event=2)

    failure _d: vte_event == 1
    analysis time _t: duration_ac

    Iteration 0: log pseudolikelihood = -25.355546
    Iteration 1: log pseudolikelihood = -25.355026
    Iteration 2: log pseudolikelihood = -25.355026

    Competing-risks regression No. of obs = 111
    No. of subjects = 111
    Failure event : vte_event == 1 No. failed = 6
    Competing event: vte_event == 2 No. competing = 13
    No. censored = 92

    Wald chi2(1) = 0.00
    Log pseudolikelihood = -25.355026 Prob > chi2 = 0.9895

    ------------------------------------------------------------------------------
    | Robust
    _t | SHR Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    doacorlmwh | .9895018 .7964889 -0.01 0.990 .2042918 4.792721
    ------------------------------------------------------------------------------

    . stcomlist, compet1(2) by(doacorlmwh) at(6)

    failure: vte_event == 1
    competing failures: vte_event == 2

    Time CIF SE [95% Conf. Int.]
    --------------------------------------------------
    doacorlmwh=0
    6 0.0471 0.0325 0.0086 0.1407
    doacorlmwh=DOAC
    6 0.0563 0.0316 0.0148 0.1405

    . stcurve, cif at1(doacorlmwh=0) at2(doacorlmwh=1) range (0 6) title("Cumulative Incidence of VTE Events")

    The curves for LMWH and DOAC do not intersect at 5.6% and 4.7% respectively that stcomlist expresses. Instead it seems like its displaying cumulative incidence w/o competing risk (see below, 5.5% and 5.4% respectively)

    . cs vte_event doacorlmwh

    | Exposed Unexposed | Total
    -----------------+------------------------+------------
    Cases | 3 3 | 6
    Noncases | 52 53 | 105
    -----------------+------------------------+------------
    Total | 55 56 | 111
    | |
    Risk | .0545455 .0535714 | .0540541
    | |
    | Point estimate | [95% Conf. Interval]
    |------------------------+------------------------
    Risk difference | .000974 | -.0831682 .0851162
    Risk ratio | 1.018182 | .2147181 4.828165
    Attr. frac. ex. | .0178571 | -3.65727 .792882
    Attr. frac. pop | .0089286 |
    +-------------------------------------------------
    1-sided Fisher's exact P = 0.6520
    2-sided Fisher's exact P = 1.0000

    Would appreciate any insight to this issue! Thanks
    Last edited by Ange Lee; 08 Jul 2020, 14:55.

    Comment

    Working...
    X