Dear Michael,
left truncation (delayed entry) in Stata (9.2 SE in my release) is managed
via nonparametric, semiparametric (please, invoke -help stcox- from within
Stata) and parametric (please, invoke -help streg - from within
Stata)regression models for survival analysis.
Assuming a Weibull regression is a wise choice, you may want to try the
following one:
------------------------begin example----------------------------
set obs 20
g id=_n
g In=0 in 1/19
replace In=2 if In==.
g Out=3 in 10/20
replace Out=2 in 5/9
replace Out=1 if Out==.
g death=1 in 1/5
replace death =1 in 15/19
replace death=0 if death==.
g drug=1 in 10/20
replace drug=0 if drug==.
g Risk_time=Out-In
stset Risk_time, failure(death==1)
streg drug, d(weibull)
stcurve, hazard outfile("C:\Michael_hz.dta" , replace)
----------------------end example---------------------------------
Probably more relevant, but for sure you have already check it yourself in
your textbook, the core of the task is choosing what kind of model fits
better with your dataset and your research aim (and why).
Just to top off what above, for more detail on yours and other topics abou
survival analysis, I would refer you to the following:
Cleves MA, Gould WW, Gutierrez R. An Introduction To Survival Analysis Using
Stata. Revised edition. College Station: StataPress, 2004.
Please note that an updated version of the same textbook has been published
in 2008.
HTH and Kind Regards,
Carlo
-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Schwartz, Michael
Inviato: venerdì 11 settembre 2009 12.53
A: [email protected]
Oggetto: st: Hazard rates with left truncation?
I want to analyze a dataset that includes some observations with delayed
entry (left truncation). Basically, I follow the textbooks and
everything works. I use time0(time to delayed entry). Stata produces the
output with sts list and I do get the values for survivor function or
failure function. However, what I need is the hazard rate, but I have no
idea how Stata produces this output (taking into account the left
truncation!). I have also tried an alternative way using the origin()
and enter() commands. This does not work either.
Thank you for your help!
Michael Schwartz
Halle Insitute for Urban Economic Research
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/