*-------------- 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 <[email protected]> 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/