Statalist


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

Re: st: Arranging dataset for KM survival rate


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Arranging dataset for KM survival rate
Date   Wed, 23 Jan 2008 22:09:53 +0000 (GMT)

--- Ziad El-Khatib <[email protected]> wrote:
> I am trying to arrange my dataset to keep one record that has the
> failure event or censor data per patient.
> Any tips about command how to delete the other records prior to
> failure/censor record per patient?
> 
> For example
> 
> Record nbre       ID            Time        Event
> 1                      1001           1              0
> 2                      1001           2              0
> 3                      1001           3              1
> 4                      1002           1              0
> 5                      1002           2              1
> 
> 
> How to be able to take away lines 1,2 and 4?

If you are interested in survival analysis than there is no need to do
so. You can just type:
stset Time, failure(Event) id(ID)

In case you have timevarying covariates you won't destroy your analysis
(as you would when you delete the cases you want to delete) and
otherwise it does no harm.

BTW do yourself a favour and loose the capital letters in the variables
names

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

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