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]

st: RE: Setting up time-varying variable data for Cox analysis

From   Hsueh-Sheng Wu <>
To   "" <>
Subject   st: RE: Setting up time-varying variable data for Cox analysis
Date   Thu, 18 Feb 2010 14:56:41 -0500

Hi Carlo,
 Thanks for your suggestion. tvc option is very useful for testing if the effects of an variable change over time.  To supplement your suggestion, I also found a webpage at UCLA  ( provides examples of how to set up Stata data file for time-vary variables in event history analysis. Hsueh-Sheng

-----Original Message-----
From: Carlo Lazzaro [] 
Sent: Thursday, February 11, 2010 1:49 AM
Cc: Hsueh-Sheng Wu
Subject: R: Setting up time-varying variable data for Cox analysis

Hsueh-Sheng may want to take a look at - help stcox - file (flag: Stata 9/2
SE) for -tvc- and -texp- options in Cox regression:

Time varying

    tvc(varlist) specifies those variables that vary continuously with
respect to time, i.e., time-varying covariates.  This is a
        convenience option used to speed up calculations and to avoid having
to stsplit the data over many failure times.

    texp(exp) is used in conjunction with tvc(varlist) to specify the
function of analysis time should be multiplied by the time-varying
        covariates. For example, specifying texp(ln(_t)) would cause the
time-varying covariates to be multiplied by the logarithm of
        analysis time. If tvc(varlist) is used without texp(exp), Stata
understands that you mean texp(_t), and thus multiplies the
        time-varying covariates by the analysis time.

        See [ST] stcox for more information on the tvc() and texp() options.
HTH and Kind Regards,

-----Messaggio originale-----
[] Per conto di Hsueh-Sheng Wu
Inviato: mercoledì 10 febbraio 2010 18.42
Oggetto: st: Setting up time-varying variable data for Cox analysis

   I  am trying to include time-varying variables in the Cox model and
discrete time survival analysis.  I know how to set up such a data file for
discrete time survival analysis, but could not figure out how to do so for
the Cox model.   Could anyone point me to some examples of setting such data
sets? Thanks much, Hsueh-Sheng

*   For searches and help try:

*   For searches and help try:

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