Statalist


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

Re: st: discrete time-varying covariate in cox models


From   "Daniel O. Koralek" <dkoralek@unc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: discrete time-varying covariate in cox models
Date   Fri, 23 Nov 2007 11:03:33 -0500

Thanks! I was having a brain freeze there!



Re: st: discrete time-varying covariate in cox models
From
"E. Paul Wileyto" <epw@mail.med.upenn.edu>
To
statalist@hsphsun2.harvard.edu
Subject
Re: st: discrete time-varying covariate in cox models
Date
Wed, 21 Nov 2007 19:37:05 -0500
Suppose you had 20 event times, and you stsplit your data using a variable called timept. Timept would take on values from 0 to 19. If you also had a variable for the time at which the screening took place (screentime, also =0..19), then you would simply say:

gen screenstatus=screentime>timepoint.

That should do it.

Paul

Daniel O. Koralek
Department of Epidemiology/Lineberger Comprehensive Cancer Center
The University of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7435
http://www.unc.edu/~dkoralek/
dkoralek@unc.edu




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