Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Time-varying covariates
From
Kyleigh Schraeder <[email protected]>
To
[email protected]
Subject
Re: st: Time-varying covariates
Date
Thu, 10 May 2012 17:20:23 -0400
Thank you Tom for your helpful advice!
Kyleigh
On Thu, May 10, 2012 at 4:32 PM, Weichle, Thomas <[email protected]> wrote:
> You may want to look into the command -stplit- for creating time-varying
> covariates for discrete data.
>
> Suppose Waiting_Status is a discrete variable with 0 = still waiting, 1
> = received help. The variable Wait_Time_A is the time from the
> beginning of the study until a person received help. You would split
> the data at the point in which a person received help. Prior to this
> point, in the time spectrum, this person had a Waiting_Status value of
> 0. After this point, this person would have Waiting_Status value of 1
> and would continue to be categorized as 1 until event or censoring.
>
> stsplit Waiting_Status_tvc, at(0) after(time = Wait_Time_A)
> replace Waiting_Status_tvc = Waiting_Status_tvc + 1 if Waiting_Status ==
> 1
>
> Only individuals that received help would be split resulting in multiple
> records for this individual. Waiting_Status_tvc is the new time-varying
> covariate which is created. You might consider examining the effect of
> Waiting_Status_tvc on time to event.
>
> stcox Waiting_Status_tvc
>
> Tom Weichle
> Math Statistician
> VA Information Resource Center (VIReC)
> Edward Hines Jr. VA Hospital, Bldg 18, 202E
> 708-202-8387 ext. 24261
> [email protected]
>
>
>
> *
> * 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/
--
Kyleigh Schraeder, BSc (Hons)
M.Sc. Candidate
Clinical Psychology Program
Department of Psychology
University of Western Ontario
[email protected]
*
* 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/