Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: survival analysis with time varying covariates

From   "Weichle, Thomas" <[email protected]>
To   <[email protected]>
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

* Splitting records at chemo events to treat them as time-varying
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:

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261
[email protected] 

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index