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, statalist.org is already up and running.


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

st: FW: how to express time dependent variables in cox regression


From   "Dougie Elder" <d.elder@dundee.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: FW: how to express time dependent variables in cox regression
Date   Tue, 19 Jul 2011 19:39:30 +0100

Dear all,

Apologies for what is likely to be a basic question from a newbie, but I
have hunted everywhere to try to work out the appropriate way to do this.

I am looking at a population of patients and trying to determine the effects
of prescribed drugs after diagnosis (index date) on survival.

I wish to use time-dependent variables to represent the number of days on
treatment, to minimise the potential for survival or immortality time bias
i.e. must survive to get a drug.

I have expanded my data set to create several time points per individual and
used a variable to determine whether drug was prescribed at that time point
(drugYNtime) or not. I also have a variable DrugYN which represents whether
a drugs was ever prescribed. i.e.

ID   age  time  drugYNtime    drugever
1       33   1               0        1
1       33   2              1        1
1       33   3               1        1
1       33   4               1        1
1      33    5               0        1
2      62    1               0        1
2      62    2               1        1

I then used the following command:       stcox age, tvc(drugYNtime)
but would stcox age drugYNtime, tvc(drugYNtime) or even stcox age drugever,
tvc(drugever) be more appropriate ?

I would appreciate any advice / guidance here and apologies if it is a
rather basic question !
PS I have Stata 11.2SE


Dougie


*
*   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/


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