Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How to draw a smoothed hazard curve with graph twoway


From   "Pyy-Martikainen Marjo" <[email protected]>
To   [email protected]
Subject   st: How to draw a smoothed hazard curve with graph twoway
Date   3 May 2008 15:26:00 +0300

Hi,

how can I reproduce a smoothed hazard curve plotted by stcurve after a Cox ph
model
with graph twoway (my aim is to overlay two smoothed hazard curves based on two
different data sets so I think I need to use the graph twoway command at least
for one of the hazard curves)?. I cannot figure out how the smoothing done by
stcurve
can be replicated with graph twoway.  Can someone please give me a hint
how to modify the code below?

stcox <covariates>, basehc(h)
stcurve, hazard width(1)

graph twoway (line h _t, sort)


Thank you in advance.

Marjo Pyy-Martikainen



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index