Hello,

So I used a cox proportional regression model and I am pretty sure the assumptions have been violated mainly due to my Kaplan Meier curve showing a protective effect for the curve with the lowest survival. I researched STATA's stcrreg command which will probably work for me. However, I do not see any information on how to set-up the data first. For example, my data as death and transplant and the competing events but these are two separate variables as shown in my data example below. Do I recode death=2 if a patient had transplant? Or better yet, how do I know which variable is the competing risk variable. Thank you in advance.



----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float id str1(transplant cancer) float(died time)
 1 "Y" "N" 1 2.3
 2 "Y" "Y" 1 4.8
 3 "Y" "N" 0   7
 4 "N" "N" 1 3.3
 5 "Y" "Y" 0   7
 6 "N" "Y" 1 2.8
 7 "Y" "N" 1 2.2
 8 "Y" "Y" 0   5
 9 "N" "Y" 1 2.5
10 "N" "N" 0   5
end