Announcement

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

  • stcurve after stcrreg, plotting 3 cif curves in the same graph

    Hi statalisters !

    I am doing a competing risk analysis using stcrreg, which is successful. Outcomes taken into account are death (1), a treatment (2) or a surgery (3).

    However, I would like to plot on the same graph the 3 cif curves coming from 3 different analysis : each one coming from each model below :

    stset delay, failure (event_comp_ =1)
    stcrreg variable1 variable2 variable3 , compete(event_comp_ == 2 3)

    and

    stset delay, failure (event_comp_ =2)
    stcrreg variable1 variable2 variable3 , compete(event_comp_ == 1 3)

    and

    stset delay, failure (event_comp_ =3)
    stcrreg variable1 variable2 variable3 , compete(event_comp_ == 1 2)

    I tried stcurve, two-way or add plot but I didn't found how to perform that.

    Thank you
    Charlotte

  • #2
    See the -outfile- option of stcurve which allows you to save the data used to generate the plots. Then you can use twoway.

    Code:
    help stcurve
    If you face problems, create a reproducible example, e.g., from

    Code:
    use http://www.stata-press.com/data/r13/hypoxia
    stset dftime, fail(failtype==1)
    stcrreg ifp tumsize pelnode, compete(failtype==2)
    showing separate graphs that you want to combine.

    Comment

    Working...
    X