0

I have done a competing risk survival analysis both with R and Stata. I have two cohorts of patients. However when plotting the curves I obtained very different results.

For R I used the command cuminc(ftime,fstatus,group,cencode=0) and then plot. For Stata I used the commands stcrreg i.cohort_num, compete(thrombosis_competing_analysis == 2) and stcurve, cif at1(cohort_num = 1) at2(cohort_num = 2).

The curves generated with Stata have 4 “steps”, while the curves generated with R have 2 "steps", and I was wondering whether I made some mistakes.

Many thanks in advance and kind regards

Curves obtained with R Curves obtained with Stata

Nico
  • 1
  • 1
    I think this needs a reproducible data example for anyone to comment usefully, – Nick Cox Apr 28 '20 at 08:17
  • The first question to me is: Why does the number of groups differ? In the R plot there are 4 groups and in Stata there are 2. Do you have 2 or 4 groups? –  Apr 28 '20 at 08:38
  • @Nick: thanks for your interest. I have posted the same question and an extract of my dataset on the StataList forum a few days ago, but unfortunately I did not get any feedback yet https://www.statalist.org/forums/forum/general-stata-discussion/general/1549235-stcurve-after-stcrreg – Nico Apr 28 '20 at 13:18
  • @Machine: thanks. The standard plot in R has also the two curves for mortality – Nico Apr 28 '20 at 13:19

0 Answers0