Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: survival analysis


From   Hugh Robinson <hugh.robinson@cfc.umt.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: survival analysis
Date   Mon, 24 Aug 2009 18:22:13 -0600

Hi Tina,

It looks like you have told stata that any value in "TimetoEvent" equals a failure, hence your result when you try to set your data.  Changing the failure statement in your stset command to failure(TimetoEvent==1) may work.

HR

________________________________________
From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] On Behalf Of Tina Hernandez-Boussard [boussard@stanford.edu]
Sent: Monday, August 24, 2009 5:56 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: survival analysis

Hi All,

I am having problems viewing the graph I want using stset.

I have a dataset that contains 398 patients with 58 failures

I have the following variables:

followupTime TimetoEvent ID

I have set things up as such (1 row per patient):

stset followupTime , failure(TimetoEvent )

          failure _d:  TimetoEvent
    analysis time _t:  followupTime

I have tried to make TimetoEvent a dummy variable, with 0/1 instead
of time of event.


However, when I get the graphs, I have everyone with an event.  I
should only have 58 events.  Can someone please help on what I have
done wrong with the setup?

Thanks!

Tina

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



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