Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: twoway line graph after stcompet by group
From
Florian Posch <[email protected]>
To
[email protected]
Subject
st: twoway line graph after stcompet by group
Date
Tue, 30 Jul 2013 07:30:44 +0200
Dear Statalisters,
I'd kindly appreciate your help regarding an issue with a competing risk
analysis:
I want to produce a graph showing the cumulative incidence functions for
two groups using stcompet and twoway (accounting for death as a
competing risk):
stset time_to_event, fail(outcome=1)
stcompet cuminc_xvar=ci, by(xvar) compet1(2)
separate cuminc_xvar if outcome==1, by(xvar) veryshortlabel
twoway ///
(line cuminc_xvar0 time_to_event, sort c(J)) ///
(line cuminc_xvar1 time_to_event, sort c(J))
Now my problem is that - when graphing the twoway plot - the cumulative
incidence functions stop at the last event, but do not continue
horizontally to the right of the graph (in parallel to the x-axis) as a
stairstep function like in Kaplan-Meier normally does until the end of
follow-up. If I produce the analogous graph using the Kaplan-Meier
failure estimator followed by twoway line..., the curves continue nicely
to the right until the end of follow-up (as expected).
Any suggestions how to fix the cumulative incidence functions so they
look analogous to the KM failure functions?
Thx guys,
Florian Posch
Dept. of Hematology
Medical University of Vienna, Austria
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/