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, 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" <>
To   <>
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 

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index