Statalist The Stata Listserver


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

Re: st: Hazard function and twoway


From   Enzo Coviello <[email protected]>
To   [email protected]
Subject   Re: st: Hazard function and twoway
Date   Wed, 30 May 2007 20:24:00 +0200

At 00.44 29/05/2007, you wrote:
Dear all,

I am trying to plot hazard functions based on the Kaplan-Meier estimators. I
understand that the easy way to do this is to use :
sts graph, hazard kernel(gaussian)

I wonder how I can use twoway to do what sts graph, hazard does?

Any suggestion is welcome

Maybe you can find useful -stkerhaz-

Search on SSC Archive.

-stkerhaz- can save the hazard estimates in a file. You can then use it and plot the estimates by twoway.

The command works on a previous Cumulative Hazard estimate, e.g.:

-sts gen H = na, by(varname)

-stkerhaz , bw(#) basecha(H) outfile(namefile)


Note that in the tails of time axis -stkerhaz- use different kernel from the official command. So in this region you can see some different shape of the hazard function.

Hope this help.

Enzo








Thanks,
Nikos

*
*   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/
*
*   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