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: Put smoothed hazard plots on one graph
From
"D. Diego Torres" <[email protected]>
To
[email protected]
Subject
st: Put smoothed hazard plots on one graph
Date
Fri, 09 Aug 2013 10:33:27 -0500
Hello,
I recently discovered that it's quite easy to put multiple
Nelson-Aalen plots onto one graph. Here's the code I used on the
merged data:
stset cum6, id(pubid) f(assoc6==1)
sts gen s6=na
stset cum8, id(pubid) f(assoc8==1)
sts gen s8=na
stset cum4, id(pubid) f(assoc4==1)
sts graph, cumh addplot(line s6 cum6, sort c(J) || line s8 cum8, sort c(J) ///
ytitle("Cumulative Hazard") ylabel(0(1)3.5) ///
xtitle("Cumulative Months of FTE Enrollment") legend(order(1
"Community College" 2 ///
"Private" 3 "For-Profit"))) saving(AAcumhaz, replace)
Now, in trying to replicate this process for the smoothed hazard,
there seems to be a problem with the hazard that -sts gen- is
calculating and that gotten from -sts graph, hazard-.
Could someone please help me figure out how to get the smoothed hazard
plots onto one graph like I did with the cumulative hazards?
Thanks,
Diego Torres
*
* 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/