If i desire to calculate the cumulative incidence of both outcome (fracture=1/no fracture=0) and death (dead=1/alive=0) in a cohort, using competing risk, does the "status" variable that i am using have to have outcome, death and missing combined (outcome = 1 dead = 2 no outcome/no death=3). I have been trying with the command below, but it wont seem to work:
Code:
gen outcome = had_fracture
gen endpoint = min(first_fracture_date, end_follow_date)
stset endpoint, failure(outcome = 1) scale(365.25) origin(start_follow_date)
stcompet= , compet(dead=1)
It is when using "stcompet= , compet(dead=1)", that i am suspecting that i need to combine outcome and dead into one variabel for it to be correct

And then to depict the (competing) cumulated incidence of fractures and death:
Code:
twoway ///
(line cummort _t if status==1 , c(J)) ///
(line cummort _t if dead==1 , c(J))
I cannot use dataex, because i am working with sensitive data, sorry. Please tell me if more information is needed for better comprehension, thank you