I'm trying to superimpose Kaplan-Meier curves for two separate outcomes, and I'd like the flip the curves so that they show "failure" instead of survival, as such:
Array
I've tried using addplot and I've tried using the code below, but I'm only able to get superimposed standard survival curves- I'm not able to flip both of them. I've seen another similar example on Statalist that used Nelson-Aalen curves, but I'd like to use Kaplan Meier. Since I have two separate outcomes rather than two separate exposures, I don't think graphing using "by()" would be helpful.
Anyone know how to do this?
Thanks!
-Jenine
Code:
stset followuptime, failure(outcome1==1) id(id) sts graph, failure risktable(0(2)12) sts gen s1 = s stset followuptime, failure(outcome2==1) id(id) sts gen s2 = s twoway line s1 s2 _t, sort connect(step step)
0 Response to Superimposing Kaplan-Meier failure curves for 2 outcomes
Post a Comment