Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: survival analysis with time varying covariates


From   "Weichle, Thomas" <Thomas.Weichle@va.gov>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: survival analysis with time varying covariates
Date   Wed, 3 Aug 2011 09:15:43 -0500

Hi Megan,
Assuming you have stset the data with the id option which is required to
use the -stsplit- command:
Suppose you have a dichotomous variable for an event and a count of the
time to this particular event starting from the beginning of the study
follow-up, then you can create a time-varying covariate by splitting the
episode.

* Splitting records at chemo events to treat them as time-varying
covariates
stsplit chemo_tvc, at(0) after(time = dx_to_chemo_day)
replace chemo_tvc = chemo_tvc + 1 if chemo_dx_6mth == 1

See for episode splitting:
http://user.demogr.mpg.de/kreyenfeld/Lehre/2009W_MP301/Materials/lecture
s/Lecture10.pdf

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261
Thomas.Weichle@va.gov 

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