Statalist


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

Re: st: finding the last observation in a survival dataset


From   Michael McCulloch <mm@pinest.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: finding the last observation in a survival dataset
Date   Mon, 28 Apr 2008 10:52:16 -0700

Thanks to Maarten Buis and Sven Juul for excelletn suggestions on my question!

*-------------- begin example ------------------
sysuse cancer, clear
gen id = _n
stset studytime, failure(died) id(id)
stsplit tband, at(5 10(10)39)
bys id (tband) : gen byte died2 = died[_N]
list id tband died died2
*--------------- end example -------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )

--- Michael McCulloch <mm@pinest.org> wrote:
 Sorry Maarten that I didn't fully explain my question. I will be
 estimating the probability of being censored using a Cox regression,
 with dependent variable: C==0/1 in the last observation time for
 each subject predictor variables: baseline covariates. It's for the
 method by Robins, 2000 called "Inverse Probability of Censoring
 Weighting." That's why I want to find the last observation time for
 each subject.

-----------------------------------------
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 Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index