Bookmark and Share

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]

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


From   "Dougie Elder" <[email protected]>
To   <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index