Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Hsueh-Sheng Wu <wuh@bgsu.edu> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
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 (http://www.ats.ucla.edu/stat/stata/examples/alda/chapter15/aldastatach15.htm)that 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 [mailto:carlo.lazzaro@tin.it] Sent: Thursday, February 11, 2010 1:49 AM To: statalist@hsphsun2.harvard.edu 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, Carlo -----Messaggio originale----- Da: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Hsueh-Sheng Wu Inviato: mercoledì 10 febbraio 2010 18.42 A: statalist@hsphsun2.harvard.edu Oggetto: st: Setting up time-varying variable data for Cox analysis Hi, 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: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * 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/